grapes / include / grapes_config.h @ master
History | View | Annotate | Download (835 Bytes)
1 | 176b8de8 | Luca Baldesi | #ifndef GRAPES_CONFIG_H
|
---|---|---|---|
2 | #define GRAPES_CONFIG_H
|
||
3 | struct tag;
|
||
4 | |||
5 | /*
|
||
6 | * earlier name-value pairs in the config string take precedence
|
||
7 | */
|
||
8 | |||
9 | struct tag *grapes_config_parse(const char *cfg); |
||
10 | int grapes_config_value_int(const struct tag *cfg_values, const char *value, int *res); |
||
11 | int grapes_config_value_int_default(const struct tag *cfg_values, const char *value, int *res, int default_value); |
||
12 | int grapes_config_value_double(const struct tag *cfg_values, const char *value, double *res); |
||
13 | int grapes_config_value_double_default(const struct tag *cfg_values, const char *value, double *res, double default_value); |
||
14 | const char *grapes_config_value_str(const struct tag *cfg_values, const char *value); |
||
15 | const char *grapes_config_value_str_default(const struct tag *cfg_values, const char *value, const char *default_value); |
||
16 | |||
17 | #endif /* CONFIG_H */ |