actube/src/cw/cfg.h

26 lines
478 B
C
Raw Normal View History

2022-07-31 01:22:11 +02:00
#ifndef _CFG_H
#define _CFG_H
#include <mavl.h>
2022-07-31 09:49:14 +02:00
#define CW_CFG_MAX_KEY_LEN 1024
2022-07-31 01:22:11 +02:00
typedef struct mavl cw_Cfg_t;
2022-07-31 09:49:14 +02:00
cw_Cfg_t * cw_cfg_create();
int cw_cfg_set(cw_Cfg_t *cfg,const char *key, const char *val);
void cw_cfg_dump(cw_Cfg_t *cfg);
int cw_cfg_read_from_file(FILE * file, cw_Cfg_t * cfg);
int cw_cfg_load(const char *filename,cw_Cfg_t * cfg);
struct cw_Cfg_entry{
char *key;
char *val;
};
const char * cw_cfg_get(cw_Cfg_t * cfg, char *key, const char *def);
2022-07-31 01:22:11 +02:00
#endif