Commit 02a4a8b3 authored by Niels Möller's avatar Niels Möller
Browse files

* src/argp/argp-parse.c (parser_init): Use

(parser_parse_next): Removed old permutation handling code.

Rev: src/argp/argp-parse.c:1.15
parent 4e0b2453
......@@ -196,12 +196,6 @@ struct group
/* Which argp this group is from. */
const struct argp *argp;
#if 0
/* Points to the point in SHORT_OPTS corresponding to the end of the short
options for this group. We use it to determine from which group a
particular short options is from. */
char *short_end;
/* The number of non-option args sucessfully handled by this parser. */
unsigned args_processed;
......@@ -644,18 +638,7 @@ parser_init (struct parser *parser, const struct argp *argp,
parser-> = 1;
parser-> = program_invocation_short_name;
parser-> = __argp_basename(program_invocation_name);
/* FIXME: What now? Miles suggests that it is better to use NULL,
but currently the value is passed on directly to
fputs_unlocked(), so that requires more changes. */
parser-> = "";
parser-> = __argp_short_program_name(NULL);
return 0;
......@@ -942,8 +925,9 @@ parser_parse_next (struct parser *parser, int *arg_ebadkey)
if (parser->state.quoted && parser-> < parser->state.quoted)
/* The next argument pointer has been moved to before the quoted
region, so pretend we never saw the quoting `--', and start looking for options again. If the `--' is still there
we'lljust process it one more time. */
region, so pretend we never saw the quoting `--', and start
looking for options again. If the `--' is still there we'll just
process it one more time. */
parser->state.quoted = parser->args_only = 0;
/* Give FIRST_NONOPT & LAST_NONOPT rational values if NEXT has been
......@@ -1028,30 +1012,6 @@ parser_parse_next (struct parser *parser, int *arg_ebadkey)
#if 0
/* FIXME: This doesn't seem right. It would be cleaner not to exhange any
* arguments until we get a new non-option argument in the input. */
if (parser->ordering == PERMUTE)
if ( (parser->first_nonopt != parser->last_nonopt)
&& (parser->last_nonopt != parser-> )
else if (parser->last_nonopt != parser->
parser->first_nonopt = parser->;
/* Skip any additional non-options
and extend the range of non-options previously skipped. */
while ( (parser-> < parser->state.argc)
&& (classify_arg(parser,
parser->last_nonopt = parser->;
if (parser-> >= parser->state.argc)
/* Almost done. If there are non-options that we skipped
previously, we should process them now. */
Supports Markdown
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