summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1998-04-30 10:31:38 +0000
committerache <ache@FreeBSD.org>1998-04-30 10:31:38 +0000
commit3462ea1e26399168124cb3392c1b2e3aacca8f8f (patch)
treeb71d0bb12232a9d8e14cc252d616f5ea8cbd1b3f /usr.bin
parentfe58d493e04cfb79a73252c968363f0530db8d1b (diff)
downloadFreeBSD-src-3462ea1e26399168124cb3392c1b2e3aacca8f8f.zip
FreeBSD-src-3462ea1e26399168124cb3392c1b2e3aacca8f8f.tar.gz
Add (unsigned char) cast to ctype macros
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/gencat/genlib.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/gencat/genlib.c b/usr.bin/gencat/genlib.c
index b1179af..a6321cb 100644
--- a/usr.bin/gencat/genlib.c
+++ b/usr.bin/gencat/genlib.c
@@ -147,29 +147,29 @@ char *cptr;
static char tok[MAXTOKEN+1];
char *tptr = tok;
- while (*cptr && isspace(*cptr)) ++cptr;
- while (*cptr && !isspace(*cptr)) *tptr++ = *cptr++;
+ while (*cptr && isspace((unsigned char)*cptr)) ++cptr;
+ while (*cptr && !isspace((unsigned char)*cptr)) *tptr++ = *cptr++;
*tptr = '\0';
return(tok);
}
static char *wskip(cptr)
char *cptr;
{
- if (!*cptr || !isspace(*cptr)) {
+ if (!*cptr || !isspace((unsigned char)*cptr)) {
warning(cptr, "expected a space");
return(cptr);
}
- while (*cptr && isspace(*cptr)) ++cptr;
+ while (*cptr && isspace((unsigned char)*cptr)) ++cptr;
return(cptr);
}
static char *cskip(cptr)
char *cptr;
{
- if (!*cptr || isspace(*cptr)) {
+ if (!*cptr || isspace((unsigned char)*cptr)) {
warning(cptr, "wasn't expecting a space");
return(cptr);
}
- while (*cptr && !isspace(*cptr)) ++cptr;
+ while (*cptr && !isspace((unsigned char)*cptr)) ++cptr;
return(cptr);
}
@@ -202,7 +202,7 @@ char quote;
if (quote && *cptr == quote) {
char *tmp;
tmp = cptr+1;
- if (*tmp && (!isspace(*tmp) || *wskip(tmp))) {
+ if (*tmp && (!isspace((unsigned char)*tmp) || *wskip(tmp))) {
warning(cptr, "unexpected quote character, ignoreing");
*tptr++ = *cptr++;
} else {
@@ -256,10 +256,10 @@ char quote;
++cptr;
break;
default:
- if (isdigit(*cptr)) {
+ if (isdigit((unsigned char)*cptr)) {
*tptr = 0;
for (i = 0; i < 3; ++i) {
- if (!isdigit(*cptr)) break;
+ if (!isdigit((unsigned char)*cptr)) break;
if (*cptr > '7') warning(cptr, "octal number greater than 7?!");
*tptr *= 8;
*tptr += (*cptr - '0');
@@ -378,7 +378,7 @@ int fd;
if (!*cptr) quote = 0;
else quote = *cptr;
}
- } else if (isspace(*cptr)) {
+ } else if (isspace((unsigned char)*cptr)) {
cptr = wskip(cptr);
if (*cptr == '#') {
++cptr;
@@ -391,7 +391,7 @@ int fd;
}
}
} else {
- if (isdigit(*cptr) || *cptr == '#') {
+ if (isdigit((unsigned char)*cptr) || *cptr == '#') {
if (*cptr == '#') {
++msgid;
++cptr;
@@ -400,7 +400,7 @@ int fd;
hconst[0] = '\0';
continue;
}
- if (!isspace(*cptr)) warning(cptr, "expected a space");
+ if (!isspace((unsigned char)*cptr)) warning(cptr, "expected a space");
++cptr;
if (!*cptr) {
MCAddMsg(msgid, "", hconst);
OpenPOWER on IntegriCloud