diff options
author | rillig <rillig@NetBSD.org> | 2005-04-19 20:14:29 +0000 |
---|---|---|
committer | rillig <rillig@NetBSD.org> | 2005-04-19 20:14:29 +0000 |
commit | 4a7bdd8b14df7be87f238b6d36a0f67946b0fca7 (patch) | |
tree | f659c812a210d58c494d51d4b1b1d8a5c64da6db /fortune/strfile/strfile.c | |
parent | c3bbeb79806311e9e1543cb085b2dc1dbfffac42 (diff) | |
download | bsdgames-darwin-4a7bdd8b14df7be87f238b6d36a0f67946b0fca7.tar.gz bsdgames-darwin-4a7bdd8b14df7be87f238b6d36a0f67946b0fca7.tar.zst bsdgames-darwin-4a7bdd8b14df7be87f238b6d36a0f67946b0fca7.zip |
Fixed wrong use of the <ctype.h> functions by adding an explicit conversion
to unsigned char. Approved by christos.
Diffstat (limited to 'fortune/strfile/strfile.c')
-rw-r--r-- | fortune/strfile/strfile.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fortune/strfile/strfile.c b/fortune/strfile/strfile.c index 7dafacf3..a8bdedcd 100644 --- a/fortune/strfile/strfile.c +++ b/fortune/strfile/strfile.c @@ -1,4 +1,4 @@ -/* $NetBSD: strfile.c,v 1.22 2003/08/07 09:37:14 agc Exp $ */ +/* $NetBSD: strfile.c,v 1.23 2005/04/19 20:16:19 rillig Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\ #if 0 static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: strfile.c,v 1.22 2003/08/07 09:37:14 agc Exp $"); +__RCSID("$NetBSD: strfile.c,v 1.23 2005/04/19 20:16:19 rillig Exp $"); #endif #endif /* not lint */ #endif /* __NetBSD__ */ @@ -224,12 +224,12 @@ main(ac, av) first = Oflag; } else if (first) { - for (nsp = sp; !isalnum(*nsp); nsp++) + for (nsp = sp; !isalnum((unsigned char)*nsp); nsp++) continue; ALLOC(Firstch, Num_pts); fp = &Firstch[Num_pts - 1]; - if (Iflag && isupper(*nsp)) - fp->first = tolower(*nsp); + if (Iflag && isupper((unsigned char)*nsp)) + fp->first = tolower((unsigned char)*nsp); else fp->first = *nsp; fp->pos = Seekpts[Num_pts - 1]; |