aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2018-08-15 21:14:26 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2018-08-19 09:10:06 +0200
commitddc3fda5f1ecc9cb7adeb616df820d9e629ac5b2 (patch)
tree871bd771be631ae14b9f2c43413fbc5b264691d0
parente9611ce3a6c8e1d7f53bf5fe6102bf6def0d31e0 (diff)
downloadcalcurse-ddc3fda5f1ecc9cb7adeb616df820d9e629ac5b2.tar.gz
calcurse-ddc3fda5f1ecc9cb7adeb616df820d9e629ac5b2.zip
Initialize variables in non-interactive mode in all cases
The changed handling of thread ids implies that they must be initialized before exit of calcurse where they are used. Hence the function vars_init() is now called irrespective of command line arguments. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r--src/args.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/args.c b/src/args.c
index bd4fb73..60de7da 100644
--- a/src/args.c
+++ b/src/args.c
@@ -730,13 +730,13 @@ int parse_args(int argc, char **argv)
io_check_dir(path_dir);
io_check_dir(path_notes);
+ vars_init();
if (status) {
status_arg();
} else if (grep) {
io_check_file(path_apts);
io_check_file(path_todo);
io_check_file(path_conf);
- vars_init();
config_load(); /* To get output date format. */
io_load_data(&filter);
if (grep_filter) {
@@ -759,7 +759,6 @@ int parse_args(int argc, char **argv)
io_check_file(path_apts);
io_check_file(path_todo);
io_check_file(path_conf);
- vars_init();
config_load(); /* To get output date format. */
io_load_data(&filter);
@@ -786,7 +785,6 @@ int parse_args(int argc, char **argv)
io_check_file(path_apts);
io_check_file(path_todo);
/* Get default pager in case we need to show a log file. */
- vars_init();
io_load_data(NULL);
if (dump_imported) {
/*