diff options
author | ache <ache@FreeBSD.org> | 2001-12-19 21:50:22 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2001-12-19 21:50:22 +0000 |
commit | 8d59503ab28990d5f3e683cef1f40660c7b50508 (patch) | |
tree | a101958a87607acd1ecdfdaf29ad688ec4ed0209 /usr.bin/mail/lex.c | |
parent | 551ea08f0f87088f86af940cfa8a858ab92dddf3 (diff) | |
download | FreeBSD-src-8d59503ab28990d5f3e683cef1f40660c7b50508.zip FreeBSD-src-8d59503ab28990d5f3e683cef1f40660c7b50508.tar.gz |
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.
Diffstat (limited to 'usr.bin/mail/lex.c')
-rw-r--r-- | usr.bin/mail/lex.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/mail/lex.c b/usr.bin/mail/lex.c index c7f674c..46255b8 100644 --- a/usr.bin/mail/lex.c +++ b/usr.bin/mail/lex.c @@ -143,7 +143,7 @@ setfile(name) * the mail file, so reset mailsize to be where * we really are in the file... */ - mailsize = ftell(ibuf); + mailsize = ftello(ibuf); (void)Fclose(ibuf); relsesigs(); sawcom = 0; @@ -162,7 +162,7 @@ nomail: int incfile() { - int newsize; + off_t newsize; int omsgCount = msgCount; FILE *ibuf; @@ -179,7 +179,7 @@ incfile() return (0); /* no new mail */ setptr(ibuf, mailsize); setmsize(msgCount); - mailsize = ftell(ibuf); + mailsize = ftello(ibuf); (void)Fclose(ibuf); relsesigs(); return (msgCount - omsgCount); @@ -290,7 +290,7 @@ execute(linebuf, contxt) * lexical conventions. */ - for (cp = linebuf; isspace(*cp); cp++) + for (cp = linebuf; isspace((unsigned char)*cp); cp++) ; if (*cp == '!') { if (sourcing) { @@ -398,7 +398,7 @@ execute(linebuf, contxt) * Just the straight string, with * leading blanks removed. */ - while (isspace(*cp)) + while (isspace((unsigned char)*cp)) cp++; e = (*com->c_func)(cp); break; |