From: Jim Meyering Date: Mon, 3 May 1999 02:42:49 +0000 (+0000) Subject: (main): Manually handle `--', since we no longer call getopt. X-Git-Tag: SH-UTILS-1_16h~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=99571c629e1c4b58bdb5071c54c897d3d239e685;p=thirdparty%2Fcoreutils.git (main): Manually handle `--', since we no longer call getopt. --- diff --git a/src/factor.c b/src/factor.c index dd696e5e40..9cf96c6477 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)