diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-04-03 08:17:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-04-03 08:17:38 +0000 |
commit | d57675fc67455faf7c68d4003a1ce884779e2c7c (patch) | |
tree | 3becd19ea8eda8827e45bf9e627d580fe614be64 /util/argconfig.h | |
parent | Releasing debian version 2.4-1. (diff) | |
download | nvme-cli-d57675fc67455faf7c68d4003a1ce884779e2c7c.tar.xz nvme-cli-d57675fc67455faf7c68d4003a1ce884779e2c7c.zip |
Merging upstream version 2.4+really2.3.
This reverts commit f42531334c05b7f49ae43c0a27e347a487fb2667.
Diffstat (limited to 'util/argconfig.h')
-rw-r--r-- | util/argconfig.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/util/argconfig.h b/util/argconfig.h index 81eaaf4..6ef3b6a 100644 --- a/util/argconfig.h +++ b/util/argconfig.h @@ -38,7 +38,6 @@ #include <getopt.h> #include <stdarg.h> #include <stdio.h> -#include <stdbool.h> enum argconfig_types { CFG_FLAG, @@ -63,7 +62,7 @@ enum argconfig_types { }; #define OPT_ARGS(n) \ - struct argconfig_commandline_options n[] + const struct argconfig_commandline_options n[] #define OPT_END() { NULL } @@ -110,7 +109,6 @@ struct argconfig_commandline_options { void *default_value; int argument_type; const char *help; - bool seen; }; #define CFG_MAX_SUBOPTS 500 @@ -119,9 +117,9 @@ struct argconfig_commandline_options { 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); + const struct argconfig_commandline_options *options); int argconfig_parse(int argc, char *argv[], const char *program_desc, - struct argconfig_commandline_options *options); + const struct argconfig_commandline_options *options); int argconfig_parse_subopt_string(char *string, char **options, size_t max_options); int argconfig_parse_comma_sep_array(char *string, int *ret, @@ -135,7 +133,4 @@ 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, - const char *option); -bool argconfig_output_format_json(bool set); #endif |