diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-02-16 09:29:52 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-02-16 10:39:14 +0100 |
commit | 4c5d6fe612f8e80dbc6279b1b1cdf6eb568dd4da (patch) | |
tree | 8ac3c547bfc715986f3e8db6ecfd8c778f9a5835 /src/vars.c | |
parent | f73f50055987a5ba644ab9721741ef1b9861b079 (diff) | |
download | calcurse-4c5d6fe612f8e80dbc6279b1b1cdf6eb568dd4da.tar.gz calcurse-4c5d6fe612f8e80dbc6279b1b1cdf6eb568dd4da.zip |
src/config.c: Make config file reading more flexible
This adds one level of abstraction to config_load() by splitting out the
actual reading routine and the variable setter into two separate
functions. config_file_walk() can be used to read the configuration
file, strip comments and pass every key/value pair to a callback.
config_load_cb() is the new callback used in config_load().
Rationale: It makes sense to reuse the key/value parser to allow for a
much saner config_save() routine that changes single values only instead
of rewriting (and overwriting) the whole configuration file every time.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/vars.c')
0 files changed, 0 insertions, 0 deletions