diff options
author | Jim Meyering <jim@meyering.net> | 1995-04-27 06:06:46 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1995-04-27 06:06:46 +0000 |
commit | 732fb15b45aa8daf9d98d92aabc2d2b79d2e2c03 (patch) | |
tree | 4f9795253f617ddd6c42fdfdf29eb75f25552d6d /lib/getopt.c | |
parent | 00c3a48bd73ca6f8f43932572e2ffee290ff3b8a (diff) | |
download | coreutils-732fb15b45aa8daf9d98d92aabc2d2b79d2e2c03.tar.xz |
merge with 1.11.f
Diffstat (limited to 'lib/getopt.c')
-rw-r--r-- | lib/getopt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/getopt.c b/lib/getopt.c index 57fd398ef..de30ec79f 100644 --- a/lib/getopt.c +++ b/lib/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 + Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -383,7 +383,10 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) optarg = NULL; if (optind == 0) - optstring = _getopt_initialize (optstring); + { + optstring = _getopt_initialize (optstring); + optind = 1; /* Don't scan ARGV[0], the program name. */ + } if (nextchar == NULL || *nextchar == '\0') { |