summaryrefslogtreecommitdiff
path: root/test/cli.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2022-12-31 16:53:39 +0000
committerMichael Drake <mdrake.unique@gmail.com>2023-01-01 18:02:44 +0000
commitfde3d979ace97bd109fce443b49cbbfa5a9307a2 (patch)
tree3f17d6003d90f4321ad721bffdaf4eeae45cf184 /test/cli.h
parentd63e9e479c63f8f0a1579ea58205862047297f1a (diff)
downloadlibnsgif-fde3d979ace97bd109fce443b49cbbfa5a9307a2.tar.gz
cli: Improve help output for enum arguments
Diffstat (limited to 'test/cli.h')
-rw-r--r--test/cli.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/cli.h b/test/cli.h
index ec14d1e..d7493e4 100644
--- a/test/cli.h
+++ b/test/cli.h
@@ -34,13 +34,16 @@ enum cli_arg_type {
CLI_STRING, /**< Has string value. */
};
+/** Enum value descriptor. */
struct cli_str_val {
- const char *str;
- int64_t val;
+ const char *str; /**< String for the enum value name. */
+ int64_t val; /**< The value for this string. */
+ const char *d; /**< Description of this value for help output. */
};
+/** Enum data. */
struct cli_enum {
- const struct cli_str_val *desc;
+ const struct cli_str_val *desc; /**< Array describing enum values. */
int64_t *e; /**< Location to store \ref CLI_ENUM value. */
};
@@ -58,9 +61,9 @@ struct cli_table_entry {
int64_t *i; /**< Location to store \ref CLI_INT value. */
uint64_t *u; /**< Location to store \ref CLI_UINT value. */
const char **s; /**< Location to store \ref CLI_STRING value. */
- struct cli_enum e;
+ struct cli_enum e; /**< \ref CLI_ENUM value details. */
} v; /**< Where to store type-specific values. */
- const char *d; /**< Description. */
+ const char *d; /**< Description of this argument for help output. */
};
/**