From 317b1ddf876c7274965ef74f63fb6ed6438f32ec Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Tue, 28 Dec 1999 11:48:23 +0000 Subject: [PATCH] Use the ctype.h version of isascii() - it doesn't loose precision and think that 0x100 (int) is an ascii character. Submitted by: bde --- lib/libstand/stand.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h index 08b1d9d072a..7115603fc7a 100644 --- a/lib/libstand/stand.h +++ b/lib/libstand/stand.h @@ -165,7 +165,7 @@ extern struct open_file files[]; #define isspace(c) ((c) == ' ' || ((c) >= 0x9 && (c) <= 0xd)) #define isdigit(c) ((c) >= '0' && (c) <= '9') #define isxdigit(c) (isdigit(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) -#define isascii(c) (((unsigned char)c) <= 0x7f) +#define isascii(c) (((c) & ~0x7F) == 0) #define isalpha(c) (isupper(c) || (islower(c))) static __inline int toupper(int c)