From 40a728c08a2bb02b36d04c3cf30e740b7029fa9c Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 20 Apr 2015 23:58:11 +0200 Subject: [PATCH] Let the comment character be a constant --- src/config.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 33235a0..fcc2540 100644 --- a/src/config.c +++ b/src/config.c @@ -26,6 +26,9 @@ #include "System/mutator.h" #include "System/config.h" +/* constants */ +#define CONFIG_COMMENT '#' + /* Config */ /* private */ @@ -215,7 +218,7 @@ int config_load(Config * config, char const * filename) } /* FIXME unescape backslashes (eg allow multiple lines) */ for(line = 0; (c = fgetc(fp)) != EOF; line++) - if(c == '#') + if(c == CONFIG_COMMENT) /* skip the comment */ while((c = fgetc(fp)) != EOF && c != '\n'); else if(c == '[')