diff options
author | Miles Bader <miles@gnu.org> | 1996-02-29 01:05:13 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-02-29 01:05:13 +0000 |
commit | d1c57d0c4077126635e2905ff01686ea9c5d939f (patch) | |
tree | b1eaa7c55f6548d6acfb3a7f7f648f88bd5c6b7e | |
parent | Tue Feb 27 12:14:59 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> (diff) | |
download | glibc-cvs/libc-960229.tar.gz glibc-cvs/libc-960229.tar.bz2 glibc-cvs/libc-960229.zip |
Updated from ../gpl2lgpl.sed /home/gd/gnu/lib/getopt.ccvs/libc-960229
-rw-r--r-- | posix/getopt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/posix/getopt.c b/posix/getopt.c index 24da4d3aa9..fdc19c5a7f 100644 --- a/posix/getopt.c +++ b/posix/getopt.c @@ -569,6 +569,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; + optopt = 0; return '?'; } @@ -597,6 +598,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) argv[0], argv[optind - 1][0], pfound->name); nextchar += strlen (nextchar); + + optopt = pfound->val; return '?'; } } @@ -611,6 +614,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); + optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } @@ -645,6 +649,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) } nextchar = (char *) ""; optind++; + optopt = 0; return '?'; } } |