summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-05-03 02:42:49 +0000
committerJim Meyering <jim@meyering.net>1999-05-03 02:42:49 +0000
commit99571c629e1c4b58bdb5071c54c897d3d239e685 (patch)
tree06ea5c5fb7e9d8e71fcd8936e737ed2c38c5682c
parent4f40ac7422749e474c0ce7489848d7f6d5afa260 (diff)
downloadcoreutils-99571c629e1c4b58bdb5071c54c897d3d239e685.tar.xz
(main): Manually handle `--', since we no longer call getopt.
-rw-r--r--src/factor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/factor.c b/src/factor.c
index dd696e5e4..9cf96c647 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -183,6 +183,13 @@ main (int argc, char **argv)
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
AUTHORS, usage);
+ /* The above handles --help and --version.
+ Since there is no other invocation of getopt, handle `--' here. */
+ if (argc > 1 && STREQ (argv[1], "--"))
+ {
+ --argc;
+ ++argv;
+ }
fail = 0;
if (argc == 1)