diff options
| author | arf20 <aruizfernandez05@gmail.com> | 2025-12-02 21:36:03 +0100 |
|---|---|---|
| committer | arf20 <aruizfernandez05@gmail.com> | 2025-12-02 21:36:03 +0100 |
| commit | e3fd95c7a599aedb8798ab27813d2457d99be3b3 (patch) | |
| tree | 1a31c4ecc5072e90e84b4c90097f25fc4d28ce64 /config.c | |
| parent | f982fb95044581435e31c765487b45d5ee963519 (diff) | |
| download | arfnet2-search-e3fd95c7a599aedb8798ab27813d2457d99be3b3.tar.gz arfnet2-search-e3fd95c7a599aedb8798ab27813d2457d99be3b3.zip | |
generating results
Diffstat (limited to 'config.c')
| -rw-r--r-- | config.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -28,7 +28,7 @@ #include <errno.h> 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; |
