parse-options: inline parse_options_usage() at its only remaining caller
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net>
This commit is contained in:
parent
ac20ff6daa
commit
d3d1f8c46f
@ -5,10 +5,6 @@
|
|||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include "utf8.h"
|
#include "utf8.h"
|
||||||
|
|
||||||
static int parse_options_usage(struct parse_opt_ctx_t *ctx,
|
|
||||||
const char * const *usagestr,
|
|
||||||
const struct option *opts, int err);
|
|
||||||
|
|
||||||
#define OPT_SHORT 1
|
#define OPT_SHORT 1
|
||||||
#define OPT_UNSET 2
|
#define OPT_UNSET 2
|
||||||
|
|
||||||
@ -516,7 +512,7 @@ unknown:
|
|||||||
show_usage_error:
|
show_usage_error:
|
||||||
err = 1;
|
err = 1;
|
||||||
show_usage:
|
show_usage:
|
||||||
return parse_options_usage(ctx, usagestr, options, err);
|
return usage_with_options_internal(ctx, usagestr, options, 0, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
int parse_options_end(struct parse_opt_ctx_t *ctx)
|
int parse_options_end(struct parse_opt_ctx_t *ctx)
|
||||||
@ -662,13 +658,6 @@ void NORETURN usage_msg_opt(const char *msg,
|
|||||||
usage_with_options(usagestr, options);
|
usage_with_options(usagestr, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int parse_options_usage(struct parse_opt_ctx_t *ctx,
|
|
||||||
const char * const *usagestr,
|
|
||||||
const struct option *opts, int err)
|
|
||||||
{
|
|
||||||
return usage_with_options_internal(ctx, usagestr, opts, 0, err);
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef opterror
|
#undef opterror
|
||||||
int opterror(const struct option *opt, const char *reason, int flags)
|
int opterror(const struct option *opt, const char *reason, int flags)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user