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.
This commit is contained in:
Rich Felker 2015-06-06 18:16:22 +00:00
parent 7e816a6487
commit 3d7e32d28d
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -1,4 +1,5 @@
#include <ctype.h>
#undef isascii
int isascii(int c)
{