From e3fd95c7a599aedb8798ab27813d2457d99be3b3 Mon Sep 17 00:00:00 2001 From: arf20 Date: Tue, 2 Dec 2025 21:36:03 +0100 Subject: generating results --- config.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'config.c') diff --git a/config.c b/config.c index bc9eed6..d99cc2c 100644 --- a/config.c +++ b/config.c @@ -28,7 +28,7 @@ #include unsigned short port = 0; -char *tmpl_path = NULL, *root = NULL; +char *tmpl_path = NULL, *root = NULL, *subdir = NULL; int config_load(const char *conf_path) @@ -39,10 +39,6 @@ config_load(const char *conf_path) return -1; } - //fseek(cfgf , 0, SEEK_END); - //size_t cfgsize = ftell(cfgf); - //rewind(cfgf); - printf("config:\n"); char line[256]; @@ -75,6 +71,10 @@ config_load(const char *conf_path) value[strlen(value) - 1] = '\0'; root = strdup(value); printf("\troot: %s\n", root); + } else if (strcmp(line, "subdir") == 0) { + value[strlen(value) - 1] = '\0'; + subdir = strdup(value); + printf("\tsubdir: %s\n", subdir); } else { fprintf(stderr, "[config] unknown key: %s\n", line); continue; -- cgit v1.2.3