From b362c17daa3cf44f6b62648e1b0fe0175c7a01e6 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 15 Jul 2011 18:08:58 +0200 Subject: Skip indentation and comments in io_extract_data() We actually only use this function to parse configuration data. Currently, this probably is the best way to do some common preprocessing. Signed-off-by: Lukas Fleischer --- src/io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/io.c b/src/io.c index 860d7ee..234fc14 100644 --- a/src/io.c +++ b/src/io.c @@ -806,9 +806,10 @@ io_extract_data (char *dst_data, const char *org, int len) { int i; + for (; *org == ' ' || *org == '\t'; org++); for (i = 0; i < len - 1; i++) { - if (*org == '\n' || *org == '\0') + if (*org == '\n' || *org == '\0' || *org == '#') break; *dst_data++ = *org++; } -- cgit v1.2.3-70-g09d2