From e598a2372179812389a702b78d5f8537eb6827d9 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 12 Jul 2005 03:55:23 +0000 Subject: Language and Option Names --- src/opt.h | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'src/opt.h') diff --git a/src/opt.h b/src/opt.h index 297c679..322c25c 100644 --- a/src/opt.h +++ b/src/opt.h @@ -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 */ -- cgit v1.2.3