1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

unsigned char for ctype functions

This commit is contained in:
tedu 2015-02-07 03:07:02 +00:00
parent 5af213f8f7
commit b4acf7eded
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: getguess.c,v 1.10 2015/02/07 01:43:51 tedu Exp $ */
/* $OpenBSD: getguess.c,v 1.11 2015/02/07 03:07:02 tedu Exp $ */
/* $NetBSD: getguess.c,v 1.5 1995/03/23 08:32:43 cgd Exp $ */
/*
@ -49,9 +49,9 @@ getguess(void)
move(PROMPTY, PROMPTX + sizeof "Guess: ");
refresh();
ch = readch();
if (isalpha(ch)) {
if (isupper(ch))
ch = tolower(ch);
if (isalpha((unsigned char)ch)) {
if (isupper((unsigned char)ch))
ch = tolower((unsigned char)ch);
if (Guessed[ch - 'a']) {
move(MESGY, MESGX);
clrtoeol();

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ksyms.c,v 1.6 2015/02/07 02:56:00 miod Exp $ */
/* $OpenBSD: ksyms.c,v 1.7 2015/02/07 03:07:02 tedu Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
@ -85,7 +85,7 @@ sym_getword()
for (sym = Known; *sym != '\0'; sym++) {
if (*sym == '-')
*sym = '_'; /* try not to confuse player */
if (isalpha(*sym))
if (isalpha((unsigned char)*sym))
*sym = '-';
}
}