diff options
author | Miles Bader <miles@gnu.org> | 1996-02-13 18:28:59 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-02-13 18:28:59 +0000 |
commit | e335fa388a21fbce18e5b19c6b5a4f3e5d25f762 (patch) | |
tree | f515c80743654289e1638227f92ee1f752891867 /posix/getopt.c | |
parent | c6de69687174638ad7e94fca30b352521ba8bed8 (diff) | |
download | glibc-e335fa388a21fbce18e5b19c6b5a4f3e5d25f762.tar.gz |
Updated from ../gpl2lgpl.sed /home/gd/gnu/lib/getopt.c
Diffstat (limited to 'posix/getopt.c')
-rw-r--r-- | posix/getopt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/posix/getopt.c b/posix/getopt.c index 4e11744db8..24da4d3aa9 100644 --- a/posix/getopt.c +++ b/posix/getopt.c @@ -3,7 +3,7 @@ "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu before changing it! - Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95 + Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. Its master source is NOT part of @@ -435,6 +435,13 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) { /* Advance to the next ARGV-element. */ + /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (last_nonopt > optind) + last_nonopt = optind; + if (first_nonopt > optind) + first_nonopt = optind; + if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, |