summaryrefslogtreecommitdiff
path: root/daemon/config.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2006-01-28 00:17:38 +0000
committerStef Walter <stef@memberwebs.com>2006-01-28 00:17:38 +0000
commitfbfb057e8bed90f73850d8e871e4d70e8fa705ce (patch)
tree920c2a626ddd185176d1d8c14be7b1d7497451d1 /daemon/config.c
parentae2e52d578ca1dd78e31beed4c63a9b17ce3bb60 (diff)
Standardize the string functions and search for them properly when configuring on different OSs.
Diffstat (limited to 'daemon/config.c')
-rw-r--r--daemon/config.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/daemon/config.c b/daemon/config.c
index 39c5a37..9b38bcb 100644
--- a/daemon/config.c
+++ b/daemon/config.c
@@ -42,7 +42,6 @@
#include <syslog.h>
#include <dirent.h>
-#include "stringx.h"
#include "rrdbotd.h"
/*
@@ -410,7 +409,7 @@ read_config_file(const char* configfile)
config[len + 1] = 0;
/* Remove nasty dos line endings */
- remove_cr(config);
+ strcln(config, '\r');
rb_messagex(LOG_DEBUG, "read config file: %s", configfile);
return config;
@@ -439,7 +438,7 @@ parse_config_file(const char* configfile, config_ctx *ctx)
p = next; /* Do this before cleaning below */
next = t + 1;
- t = trim_start(p);
+ t = strbtrim(p);
/* Continuation line (had spaces at start) */
if(p < t && *t)
@@ -482,7 +481,7 @@ parse_config_file(const char* configfile, config_ctx *ctx)
errx(2, "%s: invalid config header: %s", ctx->confname, p);
*t = 0;
- header = trim_space(p + 1);
+ header = strtrim(p + 1);
continue;
}
@@ -495,8 +494,8 @@ parse_config_file(const char* configfile, config_ctx *ctx)
*t = 0;
t++;
- name = trim_space(p);
- value = trim_space(t);
+ name = strtrim(p);
+ value = strtrim(t);
}
if(name && value)