Allow to configure options

This commit is contained in:
Kamil Trzcinski
2022-04-07 23:01:58 +02:00
parent 31a1f91e72
commit 386ad37b40
6 changed files with 136 additions and 21 deletions

View File

@ -8,8 +8,6 @@
static int option_handler_print(option_t *option, char *data);
static int option_handler_set(option_t *option, char *data);
#define OPTION_VALUE_LIST_SEP ","
static void print_help(option_t *options)
{
for (int i = 0; options[i].name; i++) {

View File

@ -31,6 +31,8 @@ typedef struct options_s {
__fn__; \
})
#define OPTION_VALUE_LIST_SEP ","
#define OPTION_FORMAT_uint "%d"
#define OPTION_FORMAT_hex "%08x"
#define OPTION_FORMAT_bool "%d"