summaryrefslogtreecommitdiffstats
path: root/hack
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 /hack
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 'hack')
-rw-r--r--hack/hack.u_init.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hack/hack.u_init.c b/hack/hack.u_init.c
index 97246c61..9b111029 100644
--- a/hack/hack.u_init.c
+++ b/hack/hack.u_init.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.u_init.c,v 1.7 2003/04/02 18:36:41 jsm Exp $ */
+/* $NetBSD: hack.u_init.c,v 1.8 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.u_init.c,v 1.7 2003/04/02 18:36:41 jsm Exp $");
+__RCSID("$NetBSD: hack.u_init.c,v 1.8 2004/11/05 21:30:32 dsl Exp $");
#endif /* not lint */
#include <ctype.h>
@@ -169,8 +169,8 @@ u_init()
rolesyms[i] = 0;
if ((pc = pl_character[0]) != '\0') {
- if (islower(pc))
- pc = toupper(pc);
+ if (islower((unsigned char)pc))
+ pc = toupper((unsigned char)pc);
if ((i = role_index(pc)) >= 0)
goto got_suffix; /* implies experienced */
printf("\nUnknown role: %c\n", pc);
@@ -201,8 +201,8 @@ u_init()
printf("? [%s] ", rolesyms);
while ((pc = readchar()) != '\0') {
- if (islower(pc))
- pc = toupper(pc);
+ if (islower((unsigned char)pc))
+ pc = toupper((unsigned char)pc);
if ((i = role_index(pc)) >= 0) {
printf("%c\n", pc); /* echo */
(void) fflush(stdout); /* should be seen */