summaryrefslogtreecommitdiffstats
path: root/src/config-ini.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-12-29 13:30:53 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-12-29 13:30:53 +0100
commitf4881eb5e2892e75723b8cd26749b735741b52c4 (patch)
treea03eed85d1a67f9ce4f2ee4cd0bed925f6bc10c0 /src/config-ini.h
downloadneco-f4881eb5e2892e75723b8cd26749b735741b52c4.tar
neco-f4881eb5e2892e75723b8cd26749b735741b52c4.zip
Build system, ini file loading
Diffstat (limited to 'src/config-ini.h')
-rw-r--r--src/config-ini.h22
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);