HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a328579
)
(sort_args): Don't rearrange any args that follow "--".
author
Richard M. Stallman
<rms@gnu.org>
Tue, 3 Sep 1996 21:48:13 +0000
(21:48 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Tue, 3 Sep 1996 21:48:13 +0000
(21:48 +0000)
src/emacs.c
patch
|
blob
|
blame
|
history
diff --git
a/src/emacs.c
b/src/emacs.c
index
57e581d
..
5d7dd72
100644
(file)
--- a/
src/emacs.c
+++ b/
src/emacs.c
@@
-1114,6
+1114,7
@@
sort_args (argc, argv)
int to = 1;
int from;
int i;
int to = 1;
int from;
int i;
+ int end_of_options = argc;
/* Categorize all the options,
and figure out which argv elts are option arguments. */
/* Categorize all the options,
and figure out which argv elts are option arguments. */
@@
-1126,6
+1127,19
@@
sort_args (argc, argv)
int match, thislen;
char *equals;
int match, thislen;
char *equals;
+ /* If we have found "--", don't consider
+ any more arguments as options. */
+ if (argv[from][1] == '-')
+ {
+ /* Leave the "--", and everything following it, at the end. */
+ for (; from < argc; from++)
+ {
+ priority[from] = -100;
+ options[from] = -1;
+ }
+ break;
+ }
+
/* Look for a match with a known old-fashioned option. */
for (i = 0; i < sizeof (standard_args) / sizeof (standard_args[0]); i++)
if (!strcmp (argv[from], standard_args[i].name))
/* Look for a match with a known old-fashioned option. */
for (i = 0; i < sizeof (standard_args) / sizeof (standard_args[0]); i++)
if (!strcmp (argv[from], standard_args[i].name))