]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Manually handle `--', since we no longer call getopt.
authorJim Meyering <jim@meyering.net>
Mon, 3 May 1999 02:42:49 +0000 (02:42 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 3 May 1999 02:42:49 +0000 (02:42 +0000)
src/factor.c

index dd696e5e405002b76b7bf28204367479ade893f1..9cf96c64774c73d7d4c5ec4f53d428edff0e4d2e 100644 (file)
@@ -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)