diff options
author | peter <peter@FreeBSD.org> | 1999-12-28 11:48:23 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-12-28 11:48:23 +0000 |
commit | 8d188898fdfd752a215b2d8cc2e49aacd443e0b7 (patch) | |
tree | f01e61a28f2716b1b25430c4cea365aa09e70b19 /lib/libstand | |
parent | d7ad2d9d5002e876691058b84b6bf9762950d553 (diff) | |
download | FreeBSD-src-8d188898fdfd752a215b2d8cc2e49aacd443e0b7.zip FreeBSD-src-8d188898fdfd752a215b2d8cc2e49aacd443e0b7.tar.gz |
Use the ctype.h version of isascii() - it doesn't loose precision and think
that 0x100 (int) is an ascii character.
Submitted by: bde
Diffstat (limited to 'lib/libstand')
-rw-r--r-- | lib/libstand/stand.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h index 08b1d9d..7115603 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) |