Merge branch 'ab/parse-options-cleanup'

Last minute fix to the update already in 'master'.

* ab/parse-options-cleanup:
  parse-options.[ch]: revert use of "enum" for parse_options()
This commit is contained in:
Junio C Hamano
2021-11-09 13:19:06 -08:00
2 changed files with 9 additions and 10 deletions

View File

@ -860,11 +860,11 @@ int parse_options_end(struct parse_opt_ctx_t *ctx)
return ctx->cpidx + ctx->argc; return ctx->cpidx + ctx->argc;
} }
enum parse_opt_result parse_options(int argc, const char **argv, int parse_options(int argc, const char **argv,
const char *prefix, const char *prefix,
const struct option *options, const struct option *options,
const char * const usagestr[], const char * const usagestr[],
enum parse_opt_flags flags) enum parse_opt_flags flags)
{ {
struct parse_opt_ctx_t ctx; struct parse_opt_ctx_t ctx;
struct option *real_options; struct option *real_options;

View File

@ -213,11 +213,10 @@ struct option {
* untouched and parse_options() returns the number of options * untouched and parse_options() returns the number of options
* processed. * processed.
*/ */
enum parse_opt_result parse_options(int argc, const char **argv, int parse_options(int argc, const char **argv, const char *prefix,
const char *prefix, const struct option *options,
const struct option *options, const char * const usagestr[],
const char * const usagestr[], enum parse_opt_flags flags);
enum parse_opt_flags flags);
NORETURN void usage_with_options(const char * const *usagestr, NORETURN void usage_with_options(const char * const *usagestr,
const struct option *options); const struct option *options);