diff --git a/include/ctype.h b/include/ctype.h index 97b9737cb18343280af09d1e4d54c6b30d63ec45..a605d089247ba7dafe0d4cc538f3875345bf7cf1 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -16,12 +16,12 @@ int isxdigit(int); int tolower(int); int toupper(int); -#define isalpha(a) ((unsigned)(((a)|32)-'a') < 26) -#define isdigit(a) ((unsigned)((a)-'0') < 10) -#define islower(a) ((unsigned)((a)-'a') < 26) -#define isupper(a) ((unsigned)((a)-'A') < 26) -#define isprint(a) ((unsigned)((a)-0x20) < 0x5f) -#define isgraph(a) ((unsigned)((a)-0x21) < 0x5e) +#define isalpha(a) ((((unsigned)(a)|32)-'a') < 26) +#define isdigit(a) (((unsigned)(a)-'0') < 10) +#define islower(a) (((unsigned)(a)-'a') < 26) +#define isupper(a) (((unsigned)(a)-'A') < 26) +#define isprint(a) (((unsigned)(a)-0x20) < 0x5f) +#define isgraph(a) (((unsigned)(a)-0x21) < 0x5e) diff --git a/include/wctype.h b/include/wctype.h index af9be06909a490b168bf798f0b1fb696f6ebe0e3..3a5af6e7416db7191272685c09c5b92be1811efe 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -36,7 +36,7 @@ wctrans_t wctrans(const char *); wctype_t wctype(const char *); #undef iswdigit -#define iswdigit(a) ((unsigned)((a)-L'0') < 10) +#define iswdigit(a) (((unsigned)(a)-L'0') < 10) #ifdef __cplusplus }