From: Miles Bader Date: Thu, 29 Feb 1996 01:05:13 +0000 (+0000) Subject: Updated from ../gpl2lgpl.sed /home/gd/gnu/lib/getopt.c X-Git-Tag: cvs/libc-960229 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1c57d0c4077126635e2905ff01686ea9c5d939f;p=thirdparty%2Fglibc.git Updated from ../gpl2lgpl.sed /home/gd/gnu/lib/getopt.c --- diff --git a/posix/getopt.c b/posix/getopt.c index 24da4d3aa9f..fdc19c5a7f8 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 '?'; } }