1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-30 21:49:25 +00:00
freebsd-ports/www/webalizer-2/files/patch-ac
2000-10-25 00:42:37 +00:00

63 lines
2.4 KiB
Plaintext

--- webalizer.c.orig Fri Oct 6 11:59:08 2000
+++ webalizer.c Sat Oct 14 17:17:29 2000
@@ -569,7 +569,7 @@
/* convert month name to lowercase */
for (i=4;i<7;i++)
- log_rec.datetime[i]=tolower(log_rec.datetime[i]);
+ log_rec.datetime[i]=tolower((unsigned char)log_rec.datetime[i]);
/* get year/month/day/hour/min/sec values */
for (i=0;i<12;i++)
@@ -1459,19 +1459,19 @@
while ( (fgets(buffer,BUFSIZE,fp)) != NULL)
{
/* skip comments and blank lines */
- if ( (buffer[0]=='#') || isspace((int)buffer[0]) ) continue;
+ if ( (buffer[0]=='#') || isspace((unsigned char)buffer[0]) ) continue;
/* Get keyword */
cp1=buffer;cp2=keyword;
- while ( isalnum((int)*cp1) ) *cp2++ = *cp1++;
+ while ( isalnum((unsigned char)*cp1) ) *cp2++ = *cp1++;
*cp2='\0';
/* Get value */
cp2=value;
- while ( (*cp1!='\n')&&(*cp1!='\0')&&(isspace((int)*cp1)) ) cp1++;
+ while ( (*cp1!='\n')&&(*cp1!='\0')&&(isspace((unsigned char)*cp1)) ) cp1++;
while ( (*cp1!='\n')&&(*cp1!='\0') ) *cp2++ = *cp1++;
*cp2--='\0';
- while ( (isspace((int)*cp2)) && (cp2 != value) ) *cp2--='\0';
+ while ( (isspace((unsigned char)*cp2)) && (cp2 != value) ) *cp2--='\0';
/* check if blank keyword/value */
if ( (keyword[0]=='\0') || (value[0]=='\0') ) continue;
@@ -1720,7 +1720,7 @@
int isurlchar(char ch)
{
- if (isalnum((int)ch)) return 1; /* allow letters, numbers... */
+ if (isalnum((unsigned char)ch)) return 1; /* allow letters, numbers... */
return (strchr(":/\\.,' *-+_@~()[]",ch)!=NULL); /* and a few special ones */
}
@@ -1813,7 +1813,7 @@
if (*cp1=='+') *cp1=' '; /* change + to space */
if (sp_flg && *cp1==' ') { cp1++; continue; } /* compress spaces */
if (*cp1==' ') sp_flg=1; else sp_flg=0; /* (flag spaces here) */
- *cp2++=tolower(*cp1); /* normal character */
+ *cp2++= *cp1; /* normal character */
cp1++;
}
}
@@ -1848,7 +1848,7 @@
int i=group_domains+1;
cp = str+strlen(str)-1;
- if (isdigit((int)*cp)) return NULL; /* ignore IP addresses */
+ if (isdigit((unsigned char)*cp)) return NULL; /* ignore IP addresses */
while (cp!=str)
{