New color system!!!
[eco.git] / config.h
blob222c657f457d0f00a2b9fe0ec516b1377a148ea6
1 /*
2 * Copyright (C) 2008 Diego Hernan Borghetti.
3 * Eco
4 */
6 #ifndef _ECO_CONFIG_H
7 #define _ECO_CONFIG_H
9 typedef struct _E_Config {
10 struct _E_Config *next;
12 /* key, name ... */
13 char *key;
15 /* value, function, name ... */
16 char *value;
17 } E_Config;
19 typedef struct _E_Section {
20 struct _E_Section *next;
22 /* section name. */
23 char *name;
25 /* list of key/value pair. */
26 E_Config *list;
27 E_Config *last;
28 } E_Section;
30 void e_config_init(void);
31 void e_config_parse(char *file);
33 E_Section *e_config_find_section(char *name);
34 E_Config *e_config_find_config(E_Section *sc, char *key);
36 char *e_config_get(char *name, char *key);
37 char e_config_get_char(char *name, char *key);
38 int e_config_get_int(char *name, char *key);
40 #endif /* _ECO_CONFIG_H */