| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This can be used if we care about junk, such as empty lines and
comments. Currently unused since we skip these when parsing
configuration settings. This makes sense if we want to make slight
modifications to the configuration file without losing formatting and
comments, though.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
We used different naming schemes in versions prior to 1.8. Given that
calcurse 1.8 has been released more than 4.5 years ago, remove the
legacy code that still handles these. Users upgrading from <1.8 to 3.0.0
might need to convert the appropriate config file variable manually.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
This patch kind of reverts what we did in commit
6377582841118688aee13aff98c9216403582e45. We were a tad off-base there
since using a map doesn't improve maintainability, really. Using
strcmp() at a central location seems perfectly fine and doesn't have the
overhead of the map scanning algorithm.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
We used custom_load_conf() to load the configuration file and
io_save_conf() to save configuration. Move these functions, including
all helpers, to a central location.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|