4 typedef struct m_config_option m_config_option_t
;
5 typedef struct m_config_save_slot m_config_save_slot_t
;
9 struct m_config_save_slot
{
10 m_config_save_slot_t
* prev
;
12 unsigned char data
[0];
15 struct m_config_option
{
16 m_config_option_t
* next
;
17 char* name
; // Full name (ie option:subopt)
19 m_config_save_slot_t
* slots
;
20 unsigned int flags
; // currently it only tell if the option was set
23 typedef struct m_config
{
24 m_config_option_t
* opts
;
25 int lvl
; // Current stack level
29 #define M_CFG_OPT_SET (1<<0)
30 #define M_CFG_OPT_ALIAS (1<<1)
33 //////////////////////////// Functions ///////////////////////////////////
39 m_config_free(m_config_t
* config
);
42 m_config_push(m_config_t
* config
);
45 m_config_pop(m_config_t
* config
);
48 m_config_register_options(m_config_t
*config
, struct m_option
*args
);
51 m_config_set_option(m_config_t
*config
, char* arg
, char* param
);
54 m_config_check_option(m_config_t
*config
, char* arg
, char* param
);
57 m_config_get_option(m_config_t
*config
, char* arg
);
60 m_config_print_option_list(m_config_t
*config
);
62 #endif /* _M_CONFIG_H */