9047ade2a9
framework for the installation of the configuration files. Fixed compile warning message due to implicit casting
63 lines
2.6 KiB
Text
63 lines
2.6 KiB
Text
$NetBSD: patch-ar,v 1.1 2006/04/21 02:07:54 wulf Exp $
|
|
|
|
--- box_scan.c.orig 2006-04-14 12:01:07.000000000 +0930
|
|
+++ box_scan.c 2006-04-14 12:03:25.000000000 +0930
|
|
@@ -275,17 +275,17 @@
|
|
short l;
|
|
|
|
if (rdate[6] != '/') {
|
|
- if (rdate[7] == '/' && rdate[0] == '1' && isdigit(rdate[1]) && isdigit(rdate[2])) { /* fbb 5.15 y2k-bug */
|
|
+ if (rdate[7] == '/' && rdate[0] == '1' && isdigit((u_char) rdate[1]) && isdigit((u_char) rdate[2])) { /* fbb 5.15 y2k-bug */
|
|
rdate++;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
l = strlen(rdate);
|
|
- if (l != 11 && (!(l == 12 && isalpha(rdate[11])))) return false;
|
|
- if ( !isdigit(rdate[0]) || !isdigit(rdate[1]) || !isdigit(rdate[2]) || !isdigit(rdate[3])
|
|
- || !isdigit(rdate[4]) || !isdigit(rdate[5]) || !isdigit(rdate[7]) || !isdigit(rdate[8])
|
|
- || !isdigit(rdate[9]) || !isdigit(rdate[10])) return false;
|
|
+ if (l != 11 && (!(l == 12 && isalpha((u_char) rdate[11])))) return false;
|
|
+ if ( !isdigit((u_char) rdate[0]) || !isdigit((u_char) rdate[1]) || !isdigit((u_char) rdate[2]) || !isdigit((u_char) rdate[3])
|
|
+ || !isdigit((u_char) rdate[4]) || !isdigit((u_char) rdate[5]) || !isdigit((u_char) rdate[7]) || !isdigit((u_char) rdate[8])
|
|
+ || !isdigit((u_char) rdate[9]) || !isdigit((u_char) rdate[10])) return false;
|
|
l = double_val(rdate, 0); /* year */
|
|
if (l < 70 && l > 38) return false;
|
|
l = double_val(rdate, 2); /* month */
|
|
@@ -313,7 +313,7 @@
|
|
l = strlen(timestr);
|
|
if (l < 10 || !check_rdate(×tr[2])) return 0;
|
|
/* fbb515 y2k bug? */
|
|
- if (timestr[2] == '1' && isdigit(timestr[3]) && isdigit(timestr[4])) fbby2kbug = 1;
|
|
+ if (timestr[2] == '1' && isdigit((u_char) timestr[3]) && isdigit((u_char) timestr[4])) fbby2kbug = 1;
|
|
if ((l > 13+fbby2kbug) && (timestr[13+fbby2kbug] != ' ') && (upcase_(timestr[13+fbby2kbug]) != 'Z'))
|
|
only_date = true;
|
|
if (!only_date) {
|
|
@@ -362,7 +362,7 @@
|
|
*para = '\0';
|
|
p = strchr(rline, '@');
|
|
if (p != NULL) {
|
|
- if (p > rline && isdigit(p[-1])) {
|
|
+ if (p > rline && isdigit((u_char) p[-1])) {
|
|
p++;
|
|
nstrcpy(para, p, LEN_MBX);
|
|
del_comment(para, ' ');
|
|
@@ -405,7 +405,7 @@
|
|
char *p;
|
|
|
|
p = s;
|
|
- while (*s) if (isalnum(*s)) *p++ = *s++; else s++;
|
|
+ while (*s) if (isalnum((u_char) *s)) *p++ = *s++; else s++;
|
|
*p = '\0';
|
|
return p == s;
|
|
}
|
|
@@ -872,7 +872,7 @@
|
|
}
|
|
}
|
|
|
|
- if (wprotupdate && isxdigit(hs[0]) && isxdigit(hs[1]) && hs[2] == ' ') {
|
|
+ if (wprotupdate && isxdigit((u_char) hs[0]) && isxdigit((u_char) hs[1]) && hs[2] == ' ') {
|
|
if (process_wprotline(hs, actwpfilesender, true) == -2) wprotupdate = false;
|
|
continue;
|
|
}
|