aboutsummaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-17 08:12:14 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-17 08:12:14 +0000
commitde575ac58efa65180c3c22e427de612dbdc26706 (patch)
tree0a640f952051748e7581cce82a73d4fa165dc81b /config.h
parentmain: allow user to override shell on the command line (diff)
conf: improve configuration file parsing
* Strip whitespaces from keys and values * Detect (and ignore) comments * Detect syntax errors (no value specified etc) * Error out on syntax errors and invalid keys
Diffstat (limited to 'config.h')
-rw-r--r--config.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/config.h b/config.h
index dffa2998..aa96a49b 100644
--- a/config.h
+++ b/config.h
@@ -1,9 +1,11 @@
#pragma once
+#include <stdbool.h>
+
struct config {
char *shell;
char *font;
};
-struct config config_load(void);
+bool config_load(struct config *conf);
void config_free(struct config conf);