summaryrefslogtreecommitdiffstats
path: root/cribbage/io.c
diff options
context:
space:
mode:
authordsl <dsl@NetBSD.org>2004-11-05 21:30:31 +0000
committerdsl <dsl@NetBSD.org>2004-11-05 21:30:31 +0000
commit9649fe0209de88926626165951e2db3043b73ee6 (patch)
treef7d328358e6de9a877c8d0fc24f5ae49ad21f031 /cribbage/io.c
parentef4d58572f66f86a3db4aa555d139fee63cca10c (diff)
downloadbsdgames-darwin-9649fe0209de88926626165951e2db3043b73ee6.tar.gz
bsdgames-darwin-9649fe0209de88926626165951e2db3043b73ee6.tar.zst
bsdgames-darwin-9649fe0209de88926626165951e2db3043b73ee6.zip
Add (unsigned char) cast to ctype functions
Diffstat (limited to 'cribbage/io.c')
-rw-r--r--cribbage/io.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cribbage/io.c b/cribbage/io.c
index 591e0c43..3d692576 100644
--- a/cribbage/io.c
+++ b/cribbage/io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.17 2004/01/26 09:58:35 jsm Exp $ */
+/* $NetBSD: io.c,v 1.18 2004/11/05 21:30:31 dsl Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: io.c,v 1.17 2004/01/26 09:58:35 jsm Exp $");
+__RCSID("$NetBSD: io.c,v 1.18 2004/11/05 21:30:31 dsl Exp $");
#endif
#endif /* not lint */
@@ -353,10 +353,10 @@ number(lo, hi, prompt)
}
sum = 0;
- if (!isdigit(*p))
+ if (!isdigit((unsigned char)*p))
sum = lo - 1;
else
- while (isdigit(*p)) {
+ while (isdigit((unsigned char)*p)) {
sum = 10 * sum + (*p - '0');
++p;
}
@@ -424,8 +424,8 @@ endmsg()
/* All messages should start with uppercase */
mvaddch(lastline + Y_MSG_START, SCORE_X, ' ');
- if (islower(Msgbuf[0]) && Msgbuf[1] != ')')
- Msgbuf[0] = toupper(Msgbuf[0]);
+ if (islower((unsigned char)Msgbuf[0]) && Msgbuf[1] != ')')
+ Msgbuf[0] = toupper((unsigned char)Msgbuf[0]);
mp = Msgbuf;
len = strlen(mp);
if (len / MSG_X + Lineno >= MSG_Y) {