Commit fce71c8d authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Allow trailing whitespace in config file.

parent f853a225
......@@ -273,7 +273,7 @@ parse_filter(gnc_t gnc, void *closure)
while(c >= 0 && c != '\n') {
c = skip_whitespace(c, gnc, closure);
if(c == '#') {
if(c == '\n' || c == '#') {
c = skip_to_eol(c, gnc, closure);
break;
}
......@@ -378,7 +378,7 @@ parse_nconf(gnc_t gnc, void *closure)
goto error;
c = skip_whitespace(c, gnc, closure);
if(c < -1 || c == '#')
if(c < -1 || c == '\n' || c == '#')
goto error;
c = getstring(c, &token, gnc, closure);
......@@ -389,8 +389,7 @@ parse_nconf(gnc_t gnc, void *closure)
while(c >= 0 && c != '\n') {
c = skip_whitespace(c, gnc, closure);
if(c == '#') {
if(c == '\n' || c == '#') {
c = skip_to_eol(c, gnc, closure);
break;
}
......@@ -503,14 +502,10 @@ parse_config(gnc_t gnc, void *closure)
while(c >= 0) {
c = skip_whitespace(c, gnc, closure);
if(c == '#') {
if(c == '\n' || c == '#') {
c = skip_to_eol(c, gnc, closure);
continue;
}
if(c == '\n') {
c = gnc(closure);
continue;
}
if(c < 0)
break;
c = getword(c, &token, gnc, closure);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment