diff options
Diffstat (limited to 'src/config-ini.h')
-rw-r--r-- | src/config-ini.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/config-ini.h b/src/config-ini.h new file mode 100644 index 0000000..802195d --- /dev/null +++ b/src/config-ini.h @@ -0,0 +1,22 @@ +#pragma once + +#include <libubox/list.h> + +typedef struct { + struct list_head node; + char *key; + char *value; +} ini_field_t; + +typedef struct { + struct list_head node; + struct list_head fields; + char *name; +} ini_section_t; + +typedef struct { + struct list_head sections; +} ini_file_t; + +ini_file_t * read_ini_file(const char *filename); +void free_ini_file(ini_file_t *file); |