From fdec3afa89da0c6dd91671f1ae0ba9bdb07118b5 Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Sun, 30 Apr 2023 00:24:29 +0900 Subject: [PATCH] util: Delete unused argconfig help function Signed-off-by: Tokunori Ikegami --- util/argconfig.c | 15 --------------- util/argconfig.h | 3 --- 2 files changed, 18 deletions(-) diff --git a/util/argconfig.c b/util/argconfig.c index a48a1c4b..06dde3cf 100644 --- a/util/argconfig.c +++ b/util/argconfig.c @@ -48,8 +48,6 @@ #define fallthrough do {} while (0) #endif -static argconfig_help_func *help_funcs[MAX_HELP_FUNC] = { NULL }; - static char END_DEFAULT[] = "__end_default__"; static const char *append_usage_str = ""; @@ -596,19 +594,6 @@ int argconfig_parse_comma_sep_array_long(char *string, } } -void argconfig_register_help_func(argconfig_help_func * f) -{ - int i; - for (i = 0; i < MAX_HELP_FUNC; i++) { - if (help_funcs[i] == NULL) { - help_funcs[i] = f; - if (i < MAX_HELP_FUNC - 1) - help_funcs[i + 1] = NULL; - break; - } - } -} - bool argconfig_parse_seen(struct argconfig_commandline_options *s, const char *option) { diff --git a/util/argconfig.h b/util/argconfig.h index 81eaaf40..b7169478 100644 --- a/util/argconfig.h +++ b/util/argconfig.h @@ -114,9 +114,7 @@ struct argconfig_commandline_options { }; #define CFG_MAX_SUBOPTS 500 -#define MAX_HELP_FUNC 20 -typedef void argconfig_help_func(); void argconfig_append_usage(const char *str); void argconfig_print_help(const char *program_desc, struct argconfig_commandline_options *options); @@ -132,7 +130,6 @@ int argconfig_parse_comma_sep_array_long(char *string, unsigned long long *ret, unsigned max_length); int argconfig_parse_byte(const char *opt, const char *str, unsigned char *val); -void argconfig_register_help_func(argconfig_help_func * f); void print_word_wrapped(const char *s, int indent, int start, FILE *stream); bool argconfig_parse_seen(struct argconfig_commandline_options *options, -- 2.49.0