From: Rich Felker Date: Sat, 6 Jun 2015 18:16:22 +0000 (+0000) Subject: add macro version of ctype.h isascii function X-Git-Tag: v1.1.11~57 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3d7e32d28dc9962e9efc1c317c5b44b5b2df3008;p=oweals%2Fmusl.git add macro version of ctype.h isascii function presumably internal code (ungetwc and fputwc) was written assuming a macro implementation existed; otherwise use of isascii is just a pessimization. --- diff --git a/include/ctype.h b/include/ctype.h index cd2e0169..7936536f 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -64,6 +64,7 @@ int isascii(int); int toascii(int); #define _tolower(a) ((a)|0x20) #define _toupper(a) ((a)&0x5f) +#define isascii(a) (0 ? isascii(a) : (unsigned)(a) < 128) #endif diff --git a/src/ctype/isascii.c b/src/ctype/isascii.c index 3af0a10d..54ad3bf0 100644 --- a/src/ctype/isascii.c +++ b/src/ctype/isascii.c @@ -1,4 +1,5 @@ #include +#undef isascii int isascii(int c) {