From fbfb057e8bed90f73850d8e871e4d70e8fa705ce Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sat, 28 Jan 2006 00:17:38 +0000 Subject: Standardize the string functions and search for them properly when configuring on different OSs. --- daemon/config.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'daemon/config.c') 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 #include -#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) -- cgit v1.2.3