-const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.64 2011/11/06 11:41:05 fabiankeil Exp $";
+const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.69 2012/03/09 16:24:36 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
/* map to lower case */
for (p = http->dbuffer; *p ; p++)
{
- *p = (char)tolower((int)(unsigned char)*p);
+ *p = (char)privoxy_tolower(*p);
}
/* split the domain name into components */
*/
if (*http->url == '*')
{
- if ( NULL == (http->path = strdup("*"))
- || NULL == (http->hostport = strdup("")) )
+ if (NULL == (http->path = strdup("*"))
+ || NULL == (http->hostport = strdup("")))
{
return JB_ERR_MEMORY;
}
freez(buf);
- if ( (http->path == NULL)
- || (http->hostport == NULL))
+ if ((http->path == NULL)
+ || (http->hostport == NULL))
{
return JB_ERR_MEMORY;
}
if ( (http->cmd == NULL)
|| (http->gpc == NULL)
- || (http->ver == NULL) )
+ || (http->ver == NULL))
{
return JB_ERR_MEMORY;
}
*
* Function : compile_host_pattern
*
- * Description : Parses and compiles a host pattern..
+ * Description : Parses and compiles a host pattern.
*
* Parameters :
* 1 : url = Target url_spec to be filled in.
*/
for (p = url->dbuffer; *p ; p++)
{
- *p = (char)tolower((int)(unsigned char)*p);
+ *p = (char)privoxy_tolower(*p);
}
/*
/*
* Char match, or char range match?
*/
- if ( (*pat == *txt)
- || (*pat == '?')
- || ((*pat == ']') && (charmap[*txt / 8] & (1 << (*txt % 8)))) )
+ if ((*pat == *txt)
+ || (*pat == '?')
+ || ((*pat == ']') && (charmap[*txt / 8] & (1 << (*txt % 8)))))
{
/*
* Success: Go ahead
}
/* Cut off extra '*'s */
- if(*pat == '*') pat++;
+ if (*pat == '*') pat++;
/* If this is the pattern's end, fine! */
return(*pat);
* or, if max was omitted, between min and 65K
*/
*max++ = '\0';
- if(port >= atoi(min) && port <= (atoi(max) ? atoi(max) : 65535))
+ if (port >= atoi(min) && port <= (atoi(max) ? atoi(max) : 65535))
{
freez(portlist_copy);
return(1);