US-ASCII (Basic Latin) range are viewed as not having any case.
=cut
+
+NOTE: Since some of these are macros, there is no check in those that the
+parameter is a char or U8. This means that if called with a larger width
+parameter, casts can silently truncate and yield wrong results.
+
*/
#define isALNUM(c) (isALPHA(c) || isDIGIT(c) || (c) == '_')
# define isUPPER(c) ((c) >= 'A' && (c) <= 'Z')
# define isLOWER(c) ((c) >= 'a' && (c) <= 'z')
# define isALNUMC(c) (isALPHA(c) || isDIGIT(c))
-# define isASCII(c) ((c) <= 127)
-# define isCNTRL(c) ((c) < ' ' || (c) == 127)
+# define isASCII(c) ((U8) (c) <= 127)
+# define isCNTRL(c) ((U8) (c) < ' ' || (c) == 127)
# define isGRAPH(c) (isALNUM(c) || isPUNCT(c))
# define isPRINT(c) (((c) >= 32 && (c) < 127))
# define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126))