summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-05-09 19:58:01 +0000
committerMiles Bader <miles@gnu.org>1997-05-09 19:58:01 +0000
commit3f77c307a83545d6374366fbe3a54674acf8a19c (patch)
tree986163a477866f8b9dda4055c6babfffa47cda08
parentb9c534add123ffe57e3f4cc313d7fb3aaa375c70 (diff)
(parser_finalize): Always set *END_INDEX if supplied.
-rw-r--r--libshouldbeinlibc/argp-parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libshouldbeinlibc/argp-parse.c b/libshouldbeinlibc/argp-parse.c
index 58e5576c..a80f9871 100644
--- a/libshouldbeinlibc/argp-parse.c
+++ b/libshouldbeinlibc/argp-parse.c
@@ -612,6 +612,10 @@ parser_finalize (struct parser *parser,
if (err == EBADKEY)
err = 0; /* Some parser didn't understand. */
+
+ /* Tell the user that all arguments are parsed. */
+ if (end_index)
+ *end_index = parser->state.next;
}
else if (end_index)
/* Return any remaining arguments to the user. */