From a1c55be85e8054f78d1ee34af33284b07f9adaa3 Mon Sep 17 00:00:00 2001 From: Olaf Rempel Date: Sat, 26 Aug 2006 14:07:45 +0200 Subject: [PATCH] configfile: multiple tuple per line --- configfile.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configfile.c b/configfile.c index 72aa088..6246619 100644 --- a/configfile.c +++ b/configfile.c @@ -123,9 +123,12 @@ int config_parse(char *config) break; } - if ((tok = strtok(row, " \n")) && (tok2 = strtok(NULL, " \n"))) - if (!config_add_tupel(section, tok, tok2)) - log_print(LOG_WARN, "config_parse(): invalid row %d", i); + if ((tok = strtok(row, " \n"))) { + while ((tok2 = strtok(NULL, " \n"))) { + if (!config_add_tupel(section, tok, tok2)) + log_print(LOG_WARN, "config_parse(): invalid row %d", i); + } + } } fclose(fz);