diff options
Diffstat (limited to 'src/opt.h')
-rw-r--r-- | src/opt.h | 27 |
1 files changed, 11 insertions, 16 deletions
@@ -1,30 +1,25 @@ #ifndef _RCC_OPT_H #define _RCC_OPT_H -struct rcc_option_defval_t { - rcc_option option; - rcc_option_value value; -}; -typedef struct rcc_option_defval_t rcc_option_defval; +#include "internal.h" -enum rcc_option_type_t { - RCC_OPTION_TYPE_BOOLEAN = 0, - RCC_OPTION_TYPE_RANGE, - RCC_OPTION_TYPE_FLAGS, - RCC_OPTION_TYPE_MENU, - RCC_OPTION_TYPE_MAX -}; -typedef enum rcc_option_type_t rcc_option_type; +typedef const char *rcc_option_value_name; +typedef const rcc_option_value_name *rcc_option_value_names; struct rcc_option_description_t { rcc_option option; + rcc_option_value value; + rcc_option_range range; + rcc_option_type type; const char *sn; - rcc_option_type; - rcc_option_value min; - rcc_option_value max; + rcc_option_value_names vsn; }; typedef struct rcc_option_description_t rcc_option_description; +const char *rccOptionDescriptionGetName(rcc_option_description *desc); +rcc_option rccOptionDescriptionGetOption(rcc_option_description *desc); +const char *rccOptionDescriptionGetValueName(rcc_option_description *desc, rcc_option_value value); +rcc_option_value rccOptionDescriptionGetValueByName(rcc_option_description *desc, const char *name); #endif /* _RCC_OPT_H */ |