summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-10-11 00:08:23 +0000
committerMiles Bader <miles@gnu.org>1995-10-11 00:08:23 +0000
commitd9e9ef2e36a14f4bf61e35b72241873bb3960ebe (patch)
tree4096eef5495ca010e2ab9e89b6b149bf674d47d9
parent8b8bd74b8f258cc8067ef17ca0e9a0048b497eb4 (diff)
(struct argp_state): Get rid of the PROCESSED_ARG field.
-rw-r--r--libshouldbeinlibc/argp.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/libshouldbeinlibc/argp.h b/libshouldbeinlibc/argp.h
index 67d5ab16..ee562885 100644
--- a/libshouldbeinlibc/argp.h
+++ b/libshouldbeinlibc/argp.h
@@ -82,9 +82,11 @@ typedef error_t (*argp_parser_t)(int key, char *arg, struct argp_state *state);
/* There are no more command line arguments at all. */
#define ARGP_KEY_END 1
/* Because it's common to want to do some special processing if there aren't
- any non-option args, user parsers are called with this key if there
- weren't any non-option arguments, before calling it again with
- ARGP_KEY_END. */
+ any non-option args, user parsers are called with this key if there they
+ didn't get a chance to process any non-option arguments; note that having
+ been given a non-option arg and returned EINVAL counts. Called just
+ before ARGP_KEY_END (where more general validity checks on previously
+ parsed arguments can take place). */
#define ARGP_KEY_NO_ARGS 2
/* An argp structure contains a set of getopt options declarations, a
@@ -140,11 +142,6 @@ struct argp_state
/* The flags supplied to argp_parse. May be modified. */
unsigned flags;
-
- /* Set to true after a non-option arg has been processed successfully and
- used to decide whether to call user parsers with ARGP_KEY_NO_ARGS (which
- see). May be modified. */
- int processed_arg;
};
/* Flags for argp_parse (note that the defaults are those that are