aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-09-03 21:48:13 +0000
committerRichard M. Stallman1996-09-03 21:48:13 +0000
commitc96f26f4b5ddc7920e25aae7847fa8eb8c70a8c1 (patch)
tree7f75de67e2b5eb6c889f73b70c34dca0f52578a6 /src
parenta32857951d9123d003d67922758bdda5905b10ba (diff)
downloademacs-c96f26f4b5ddc7920e25aae7847fa8eb8c70a8c1.tar.gz
emacs-c96f26f4b5ddc7920e25aae7847fa8eb8c70a8c1.zip
(sort_args): Don't rearrange any args that follow "--".
Diffstat (limited to 'src')
-rw-r--r--src/emacs.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 57e581d142d..5d7dd7202f0 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1114,6 +1114,7 @@ sort_args (argc, argv)
1114 int to = 1; 1114 int to = 1;
1115 int from; 1115 int from;
1116 int i; 1116 int i;
1117 int end_of_options = argc;
1117 1118
1118 /* Categorize all the options, 1119 /* Categorize all the options,
1119 and figure out which argv elts are option arguments. */ 1120 and figure out which argv elts are option arguments. */
@@ -1126,6 +1127,19 @@ sort_args (argc, argv)
1126 int match, thislen; 1127 int match, thislen;
1127 char *equals; 1128 char *equals;
1128 1129
1130 /* If we have found "--", don't consider
1131 any more arguments as options. */
1132 if (argv[from][1] == '-')
1133 {
1134 /* Leave the "--", and everything following it, at the end. */
1135 for (; from < argc; from++)
1136 {
1137 priority[from] = -100;
1138 options[from] = -1;
1139 }
1140 break;
1141 }
1142
1129 /* Look for a match with a known old-fashioned option. */ 1143 /* Look for a match with a known old-fashioned option. */
1130 for (i = 0; i < sizeof (standard_args) / sizeof (standard_args[0]); i++) 1144 for (i = 0; i < sizeof (standard_args) / sizeof (standard_args[0]); i++)
1131 if (!strcmp (argv[from], standard_args[i].name)) 1145 if (!strcmp (argv[from], standard_args[i].name))