From: hno <> Date: Fri, 15 Nov 2002 20:09:31 +0000 (+0000) Subject: Support lines with spaces in them in included acl files X-Git-Tag: SQUID_3_0_PRE1~528 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40a59db9e82e2c168862ec244c6c78a4517169f8;p=thirdparty%2Fsquid.git Support lines with spaces in them in included acl files --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 4b7524ea02..adc7efe4e2 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.420 2002/10/17 02:11:23 hno Exp $ + * $Id: cache_cf.cc,v 1.421 2002/11/15 13:09:31 hno Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -2513,10 +2513,17 @@ strtokFile(void) fromFile = 0; goto strtok_again; } else { + char *t2, *t3; t = buf; /* skip leading and trailing white space */ t += strspn(buf, w_space); - t[strcspn(t, w_space)] = '\0'; + t2 = t + strcspn(t, w_space); + t3 = t2 + strspn(t2, w_space); + while (*t3 && *t3 != '#') { + t2 = t3 + strcspn(t3, w_space); + t3 = t2 + strspn(t2, w_space); + } + *t2 = '\0'; /* skip comments */ if (*t == '#') goto strtok_again;