mirror of
https://github.com/tinyproxy/tinyproxy.git
synced 2026-01-07 09:53:07 +08:00
conf: remove trailing whitespace via C code, not regex
This commit is contained in:
@@ -333,6 +333,9 @@ static int config_parse (struct config_s *conf, FILE * f)
|
||||
e = config_directive_find(p, strlen(p));
|
||||
++q;
|
||||
while(isspace(*q))++q;
|
||||
p = q;
|
||||
while(*p && *p != '\n') ++p;
|
||||
while(isspace(*p)) *(p--) = 0;
|
||||
if (!e || e->value == CD_NIL || check_match (conf, q, lineno, e->value)) {
|
||||
fprintf (stderr, "ERROR: Syntax error on line %lu\n", lineno);
|
||||
return 1;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#define IPV6MASK "(" IPV6 "(/" DIGIT "+)?)"
|
||||
#define BEGIN "^"
|
||||
#define END SPACE "*$"
|
||||
#define END "$"
|
||||
|
||||
|
||||
STDCONF (logfile, STR, handle_logfile),
|
||||
|
||||
Reference in New Issue
Block a user