summaryrefslogtreecommitdiffstats
path: root/usr.bin/mail/fio.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-12-19 21:50:22 +0000
committerache <ache@FreeBSD.org>2001-12-19 21:50:22 +0000
commit8d59503ab28990d5f3e683cef1f40660c7b50508 (patch)
treea101958a87607acd1ecdfdaf29ad688ec4ed0209 /usr.bin/mail/fio.c
parent551ea08f0f87088f86af940cfa8a858ab92dddf3 (diff)
downloadFreeBSD-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/fio.c')
-rw-r--r--usr.bin/mail/fio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/mail/fio.c b/usr.bin/mail/fio.c
index 0c78e3e..a10021b 100644
--- a/usr.bin/mail/fio.c
+++ b/usr.bin/mail/fio.c
@@ -82,15 +82,15 @@ setptr(ibuf, offset)
msgCount = 0;
} else {
/* Seek into the file to get to the new messages */
- (void)fseek(ibuf, offset, SEEK_SET);
+ (void)fseeko(ibuf, offset, SEEK_SET);
/*
* We need to make "offset" a pointer to the end of
* the temp file that has the copy of the mail file.
* If any messages have been edited, this will be
* different from the offset into the mail file.
*/
- (void)fseek(otf, 0L, SEEK_END);
- offset = ftell(otf);
+ (void)fseeko(otf, (off_t)0, SEEK_END);
+ offset = ftello(otf);
}
omsgCount = msgCount;
maybe = 1;
@@ -138,7 +138,7 @@ setptr(ibuf, offset)
} else if (inhead) {
for (cp = linebuf, cp2 = "status";; cp++) {
if ((c = *cp2++) == '\0') {
- while (isspace(*cp++))
+ while (isspace((unsigned char)*cp++))
;
if (cp[-1] != ':')
break;
@@ -150,7 +150,7 @@ setptr(ibuf, offset)
inhead = 0;
break;
}
- if (*cp != c && *cp != toupper(c))
+ if (*cp != c && *cp != toupper((unsigned char)c))
break;
}
}
@@ -221,7 +221,7 @@ setinput(mp)
(void)fflush(otf);
if (fseeko(itf,
positionof(mp->m_block, mp->m_offset), SEEK_SET) < 0)
- err(1, "fseek");
+ err(1, "fseeko");
return (itf);
}
OpenPOWER on IntegriCloud