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/head.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'usr.bin/mail/head.c') diff --git a/usr.bin/mail/head.c b/usr.bin/mail/head.c index 806ab6d..61f43da 100644 --- a/usr.bin/mail/head.c +++ b/usr.bin/mail/head.c @@ -204,11 +204,11 @@ cmatch(cp, tp) while (*cp != '\0' && *tp != '\0') switch (*tp++) { case 'a': - if (!islower(*cp++)) + if (!islower((unsigned char)*cp++)) return (0); break; case 'A': - if (!isupper(*cp++)) + if (!isupper((unsigned char)*cp++)) return (0); break; case ' ': @@ -216,20 +216,20 @@ cmatch(cp, tp) return (0); break; case '0': - if (!isdigit(*cp++)) + if (!isdigit((unsigned char)*cp++)) return (0); break; case 'O': - if (*cp != ' ' && !isdigit(*cp)) + if (*cp != ' ' && !isdigit((unsigned char)*cp)) return (0); cp++; break; case 'p': - if (!ispunct(*cp++)) + if (!ispunct((unsigned char)*cp++)) return (0); break; case 'P': - if (*cp != ' ' && !ispunct(*cp)) + if (*cp != ' ' && !ispunct((unsigned char)*cp)) return (0); cp++; break; -- cgit v1.1