From 06dd932c4975482cc55ba47f6c1ece4f5356e401 Mon Sep 17 00:00:00 2001 From: dsl Date: Sat, 30 Oct 2004 20:37:35 +0000 Subject: [PATCH] Add (unsigned char) cast to ctype functions - Char is unsigned char. --- usr.bin/lex/misc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/lex/misc.c b/usr.bin/lex/misc.c index 19a242665a1a..598a28b037c1 100644 --- a/usr.bin/lex/misc.c +++ b/usr.bin/lex/misc.c @@ -26,7 +26,7 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -/* $NetBSD: misc.c,v 1.12 2003/07/14 11:36:49 itojun Exp $ */ +/* $NetBSD: misc.c,v 1.13 2004/10/30 20:37:35 dsl Exp $ */ #include "flexdef.h" @@ -101,7 +101,7 @@ register char *str; { while ( *str ) { - if ( ! isascii( (Char) *str ) || ! islower( *str ) ) + if ( ! isascii( (Char) *str ) || ! islower( (Char)*str ) ) return 0; ++str; } @@ -117,7 +117,7 @@ register char *str; { while ( *str ) { - if ( ! isascii( (Char) *str ) || ! isupper( *str ) ) + if ( ! isascii( (Char) *str ) || ! isupper( (Char)*str ) ) return 0; ++str; } @@ -582,7 +582,7 @@ Char array[]; int sptr = 2; while ( isascii( array[sptr] ) && - isxdigit( (char) array[sptr] ) ) + isxdigit( (Char) array[sptr] ) ) /* Don't increment inside loop control * because if isdigit() is a macro it might * expand into multiple increments ...