summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-02-29 01:05:13 +0000
committerMiles Bader <miles@gnu.org>1996-02-29 01:05:13 +0000
commitd1c57d0c4077126635e2905ff01686ea9c5d939f (patch)
treeb1eaa7c55f6548d6acfb3a7f7f648f88bd5c6b7e
parentb7459e56bd36389bab3dbcc06418b94a256e0138 (diff)
Updated from ../gpl2lgpl.sed /home/gd/gnu/lib/getopt.ccvs/libc-960229
-rw-r--r--posix/getopt.c5
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 '?';
}
}