X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=miscutil.c;h=5167546d30ef0cbd081c0a13ecc1840ec09546aa;hp=1e40c986441fa10cf810606865cc671c3d830a18;hb=1ec73e0ea959e24fecfea2e5cbd00518f5d582d1;hpb=e1cac5061a4803568a8dc86932fe6013aad8178c diff --git a/miscutil.c b/miscutil.c index 1e40c986..5167546d 100644 --- a/miscutil.c +++ b/miscutil.c @@ -1,4 +1,4 @@ -const char miscutil_rcs[] = "$Id: miscutil.c,v 1.40 2006/08/17 17:15:10 fabiankeil Exp $"; +const char miscutil_rcs[] = "$Id: miscutil.c,v 1.43 2006/09/23 13:26:38 roro Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/miscutil.c,v $ @@ -36,6 +36,17 @@ const char miscutil_rcs[] = "$Id: miscutil.c,v 1.40 2006/08/17 17:15:10 fabianke * * Revisions : * $Log: miscutil.c,v $ + * Revision 1.43 2006/09/23 13:26:38 roro + * Replace TABs by spaces in source code. + * + * Revision 1.42 2006/09/09 14:01:45 fabiankeil + * Integrated Oliver Yeoh's domain pattern fix + * to make sure *x matches xx. Closes Patch 1217393 + * and Bug 1170767. + * + * Revision 1.41 2006/08/18 16:03:17 david__schmidt + * Tweak for OS/2 build happiness. + * * Revision 1.40 2006/08/17 17:15:10 fabiankeil * - Back to timegm() using GnuPG's replacement if necessary. * Using mktime() and localtime() could add a on hour offset if @@ -759,7 +770,7 @@ char *string_toupper(const char *string) while (*q != '\0') { - *p++ = toupper(*q++); + *p++ = toupper((int) *q++); } return result; @@ -877,10 +888,21 @@ int simplematch(char *pattern, char *text) } else if (pat != fallback) { + /* + * Increment text pointer if in char range matching + */ + if (*pat == ']') + { + txt++; + } /* * Wildcard mode && nonmatch beyond fallback: Rewind pattern */ pat = fallback; + /* + * Restart matching from current text pointer + */ + continue; } txt++; } @@ -1116,7 +1138,7 @@ time_t timegm(struct tm *tm) { strcpy(old_zone,"TZ="); strcat(old_zone,zone); - putenv(old_zone); + putenv(old_zone); } } else