diff options
author | peter <peter@FreeBSD.org> | 1997-03-11 11:29:42 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-03-11 11:29:42 +0000 |
commit | e0e06d68d52707cbac25844a417ab6919613e9eb (patch) | |
tree | 21479b686e8fe46544082e319ecfa70f9bd25fc6 /lib/libc/stdlib/getopt.c | |
parent | 53b81178e2d0aa56f51f680543678a3d7ef8aecd (diff) | |
download | FreeBSD-src-e0e06d68d52707cbac25844a417ab6919613e9eb.zip FreeBSD-src-e0e06d68d52707cbac25844a417ab6919613e9eb.tar.gz |
Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branch
Diffstat (limited to 'lib/libc/stdlib/getopt.c')
-rw-r--r-- | lib/libc/stdlib/getopt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/stdlib/getopt.c b/lib/libc/stdlib/getopt.c index 994d757..5dddf86 100644 --- a/lib/libc/stdlib/getopt.c +++ b/lib/libc/stdlib/getopt.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)getopt.c 8.2 (Berkeley) 4/2/94"; +static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> @@ -67,22 +67,22 @@ getopt(nargc, nargv, ostr) optreset = 0; if (optind >= nargc || *(place = nargv[optind]) != '-') { place = EMSG; - return (EOF); + return (-1); } if (place[1] && *++place == '-') { /* found "--" */ ++optind; place = EMSG; - return (EOF); + return (-1); } } /* option letter okay? */ if ((optopt = (int)*place++) == (int)':' || !(oli = strchr(ostr, optopt))) { /* * if the user didn't specify '-' as an option, - * assume it means EOF. + * assume it means -1. */ if (optopt == (int)'-') - return (EOF); + return (-1); if (!*place) ++optind; if (opterr && *ostr != ':') |