diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-02-17 09:02:20 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-02-17 10:06:49 +0100 |
commit | 8aba3be1e8c460879b8be5706f599d184cd328a3 (patch) | |
tree | 1e7ef17af5a688752042bc7f449a3e0c156c8668 /AUTHORS | |
parent | fcd2c69dd4a7aab9d7e467f044af99dad8099db4 (diff) | |
download | calcurse-8aba3be1e8c460879b8be5706f599d184cd328a3.tar.gz calcurse-8aba3be1e8c460879b8be5706f599d184cd328a3.zip |
src/config.c: Revamp configuration file parsing
Reintroduce a map for configuration variable parsing. We use a different
approach this time: Each map entry contains
* a key,
* a callback that can be used to parse that variable,
* a callback that can be used to serialize that variable and
* a target buffer that the parsed value is written to/read from.
Commits 4f4891bdb88410ae04225f3d6acfa31d73a3901a and
6377582841118688aee13aff98c9216403582e45 show that we are pretty
undecided on using a map or not. However, now that we use parser and
serialization wrappers for every variable, having a central map makes
everything much cleaner. The runtimes of config_load() and config_save()
are slightly increased (by a constant factor). This will also allow us
for implementing proper detection of missing configuration variables in
the configuration file.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'AUTHORS')
0 files changed, 0 insertions, 0 deletions