Commit c96f26f4 authored by Richard M. Stallman's avatar Richard M. Stallman

(sort_args): Don't rearrange any args that follow "--".

parent a3285795
......@@ -1114,6 +1114,7 @@ sort_args (argc, argv)
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. */
......@@ -1126,6 +1127,19 @@ sort_args (argc, argv)
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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment