From 8d59503ab28990d5f3e683cef1f40660c7b50508 Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 19 Dec 2001 21:50:22 +0000 Subject: Add (unsigned char) cast to ctype macros ftell->ftello, fseek->fseeko File 'newsize' type int->off_t Add visible (long) cast to fsize() when it called to small one message file and result is assigned to long. --- usr.bin/mail/list.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr.bin/mail/list.c') diff --git a/usr.bin/mail/list.c b/usr.bin/mail/list.c index 1dbc587..be5df83 100644 --- a/usr.bin/mail/list.c +++ b/usr.bin/mail/list.c @@ -555,9 +555,9 @@ scan(sp) * Return TNUMBER when done. */ - if (isdigit(c)) { + if (isdigit((unsigned char)c)) { lexnumber = 0; - while (isdigit(c)) { + while (isdigit((unsigned char)c)) { lexnumber = lexnumber*10 + c - '0'; *cp2++ = c; c = *cp++; @@ -678,7 +678,7 @@ matchsender(str, mesg) while (*cp2 != '\0') { if (*cp == '\0') return (1); - if (toupper(*cp++) != toupper(*cp2++)) { + if (toupper((unsigned char)*cp++) != toupper((unsigned char)*cp2++)) { cp2 = ++backup; cp = str; } @@ -717,7 +717,7 @@ matchto(str, mesg) while (*cp2 != '\0') { if (*cp == '\0') return (1); - if (toupper(*cp++) != toupper(*cp2++)) { + if (toupper((unsigned char)*cp++) != toupper((unsigned char)*cp2++)) { cp2 = ++backup; cp = str; } @@ -775,7 +775,7 @@ matchsubj(str, mesg) while (*cp2 != '\0') { if (*cp == '\0') return (1); - if (toupper(*cp++) != toupper(*cp2++)) { + if (toupper((unsigned char)*cp++) != toupper((unsigned char)*cp2++)) { cp2 = ++backup; cp = str; } -- cgit v1.1