]> git.lizzy.rs Git - dragonblocks_alpha.git/blob - src/config.h
Include pthread_time on windows for clock_gettime
[dragonblocks_alpha.git] / src / config.h
1 #ifndef _CONFIG_H_
2 #define _CONFIG_H_
3
4 #include <stddef.h>
5
6 typedef enum {
7         CONFIG_STRING,
8         CONFIG_INT,
9         CONFIG_UINT,
10         CONFIG_FLOAT,
11         CONFIG_BOOL,
12 } ConfigType;
13
14 typedef struct {
15         ConfigType type;
16         char *key;
17         void *value;
18 } ConfigEntry;
19
20 void config_read(char *path, ConfigEntry *entries, size_t num_entries);
21 void config_free(ConfigEntry *entries, size_t num_entires);
22
23 #endif // _CONFIG_H_