From 4285e8859353c31b39fa9539a89e58dc3a020264 Mon Sep 17 00:00:00 2001 From: Lars Henriksen Date: Fri, 17 Aug 2018 21:49:39 +0200 Subject: Rewrite of io_init() The introduction of the "-C " option is an opportunity to review the initialization of data paths. It lead to a rewrite. Two "root" directories are used (data and configuration files); by default they are identical. The statically allocated path buffers are turned into dynamically allocated buffers. Missing files/directories now include hooks. Signed-off-by: Lars Henriksen Signed-off-by: Lukas Fleischer --- src/vars.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/vars.c') diff --git a/src/vars.c b/src/vars.c index 0ebac8f..4e51b98 100644 --- a/src/vars.c +++ b/src/vars.c @@ -79,17 +79,17 @@ int days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; * variables to store data path names, which are initialized in * io_init() */ -char path_dir[] = ""; -char path_conf_dir[] = ""; -char path_todo[] = ""; -char path_apts[] = ""; -char path_conf[] = ""; -char path_notes[] = ""; -char path_keys[] = ""; -char path_cpid[] = ""; -char path_dpid[] = ""; -char path_dmon_log[] = ""; -char path_hooks[] = ""; +char *path_ddir = NULL; +char *path_cdir = NULL; +char *path_todo = NULL; +char *path_apts = NULL; +char *path_conf = NULL; +char *path_notes = NULL; +char *path_keys = NULL; +char *path_cpid = NULL; +char *path_dpid = NULL; +char *path_dmon_log = NULL; +char *path_hooks = NULL; /* Variable to store global configuration. */ struct conf conf; -- cgit v1.2.3-54-g00ecf