projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95143d6
)
(main): Handle a leading "--" option as POSIX requires.
author
Jim Meyering
<jim@meyering.net>
Sat, 18 Aug 2001 17:10:32 +0000
(17:10 +0000)
committer
Jim Meyering
<jim@meyering.net>
Sat, 18 Aug 2001 17:10:32 +0000
(17:10 +0000)
src/expr.c
patch
|
blob
|
history
diff --git
a/src/expr.c
b/src/expr.c
index 8702dd19cf1f239c27f8ddedc141034e70ab43d8..31966629b4562a83062e7e07a683b86c78773b1e 100644
(file)
--- a/
src/expr.c
+++ b/
src/expr.c
@@
-165,6
+165,13
@@
main (int argc, char **argv)
if (!posixly_correct)
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;
+ }
if (argc == 1)
{