diff options
-rw-r--r-- | parse-options.c | 11 | ||||
-rw-r--r-- | parse-options.h | 8 |
2 files changed, 12 insertions, 7 deletions
diff --git a/parse-options.c b/parse-options.c index 55c5821b08..9c8ba96340 100644 --- a/parse-options.c +++ b/parse-options.c @@ -481,7 +481,8 @@ static void parse_options_check(const struct option *opts) static void parse_options_start_1(struct parse_opt_ctx_t *ctx, int argc, const char **argv, const char *prefix, - const struct option *options, int flags) + const struct option *options, + enum parse_opt_flags flags) { ctx->argc = argc; ctx->argv = argv; @@ -506,7 +507,8 @@ static void parse_options_start_1(struct parse_opt_ctx_t *ctx, void parse_options_start(struct parse_opt_ctx_t *ctx, int argc, const char **argv, const char *prefix, - const struct option *options, int flags) + const struct option *options, + enum parse_opt_flags flags) { memset(ctx, 0, sizeof(*ctx)); parse_options_start_1(ctx, argc, argv, prefix, options, flags); @@ -838,8 +840,9 @@ int parse_options_end(struct parse_opt_ctx_t *ctx) } int parse_options(int argc, const char **argv, const char *prefix, - const struct option *options, const char * const usagestr[], - int flags) + const struct option *options, + const char * const usagestr[], + enum parse_opt_flags flags) { struct parse_opt_ctx_t ctx; struct option *real_options; diff --git a/parse-options.h b/parse-options.h index 3a3176ae65..2e8798d874 100644 --- a/parse-options.h +++ b/parse-options.h @@ -213,7 +213,8 @@ struct option { */ int parse_options(int argc, const char **argv, const char *prefix, const struct option *options, - const char * const usagestr[], int flags); + const char * const usagestr[], + enum parse_opt_flags flags); NORETURN void usage_with_options(const char * const *usagestr, const struct option *options); @@ -262,7 +263,7 @@ struct parse_opt_ctx_t { const char **out; int argc, cpidx, total; const char *opt; - int flags; + enum parse_opt_flags flags; const char *prefix; const char **alias_groups; /* must be in groups of 3 elements! */ struct option *updated_options; @@ -270,7 +271,8 @@ struct parse_opt_ctx_t { void parse_options_start(struct parse_opt_ctx_t *ctx, int argc, const char **argv, const char *prefix, - const struct option *options, int flags); + const struct option *options, + enum parse_opt_flags flags); int parse_options_step(struct parse_opt_ctx_t *ctx, const struct option *options, |