aboutsummaryrefslogtreecommitdiffstats
path: root/src/vars.c
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2018-08-17 21:49:39 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2018-12-14 10:35:11 +0100
commit4285e8859353c31b39fa9539a89e58dc3a020264 (patch)
tree099e93aa2103026f88666799b2bd297993d71d1c /src/vars.c
parent6f22e99ad5187f1c80717bfbe0d84d7dd12a2dba (diff)
downloadcalcurse-4285e8859353c31b39fa9539a89e58dc3a020264.tar.gz
calcurse-4285e8859353c31b39fa9539a89e58dc3a020264.zip
Rewrite of io_init()
The introduction of the "-C <confdir>" 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 <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/vars.c')
-rw-r--r--src/vars.c22
1 files changed, 11 insertions, 11 deletions
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;