initial upload
This commit is contained in:
37
smmapdfw/config.h
Normal file
37
smmapdfw/config.h
Normal file
@ -0,0 +1,37 @@
|
||||
#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_ */
|
||||
|
||||
|
Reference in New Issue
Block a user