Some kind of shell is now there in act
This commit is contained in:
14
src/cw/cfg.c
14
src/cw/cfg.c
@ -186,6 +186,20 @@ void cw_cfg_dump(cw_Cfg_t * cfg)
|
||||
}
|
||||
}
|
||||
|
||||
void cw_cfg_fdump(FILE *f, cw_Cfg_t * cfg)
|
||||
{
|
||||
mavliter_t it;
|
||||
struct cw_Cfg_entry *e;
|
||||
mavliter_init(&it, cfg->cfg);
|
||||
mavliter_foreach(&it) {
|
||||
|
||||
e = mavliter_get(&it);
|
||||
fprintf(f,"%s: '%s'\n", e->key, e->val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
struct parser {
|
||||
int line;
|
||||
|
@ -56,6 +56,7 @@ int cw_cfg_base_exists_l(cw_Cfg_t ** cfgs, const char *key);
|
||||
int cw_cfg_save(const char *filename, cw_Cfg_t *cfg, const char *format, ...);
|
||||
|
||||
uint16_t cw_cfg_get_word_l(cw_Cfg_t ** cfg, char *key, uint16_t def);
|
||||
void cw_cfg_fdump(FILE *f, cw_Cfg_t * cfg);
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user