diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-17 08:12:14 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-17 08:12:14 +0000 |
| commit | de575ac58efa65180c3c22e427de612dbdc26706 (patch) | |
| tree | 0a640f952051748e7581cce82a73d4fa165dc81b /config.h | |
| parent | main: 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.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |
