Files
smmapdfw/smmapdfw/config.h
2004-09-20 19:34:09 +00:00

38 lines
851 B
C

#ifndef _CONFIG_H_
#define _CONFIG_H_
struct config_item_s {
char *name;
char *value;
struct config_item_s *next;
};
typedef struct config_item_s config_item_t;
struct config_section_s {
char *name;
config_item_t *item;
struct config_section_s *next;
};
typedef struct config_section_s config_section_t;
typedef config_section_t cfg_t;
typedef config_item_t cfgl_t;
config_section_t *readcfg(char *cfgfile);
void freecfg(config_section_t *cfg);
char *findcfg(config_section_t *cfg, char *section, char *name);
char *findcfgx(config_section_t *cfg, char *section, char *name, char *default_value);
config_item_t *findcfgsection(config_section_t *cfg, char *section);
extern char *findcfgl(config_item_t *cfg, char *name);
extern char *findcfglx(config_item_t *cfg, char *name, char *default_value);
#endif /* _CONFIG_H_ */