-#define util_isupper(C) ((C) >= 'A' && (C) <= 'Z')
-#define util_islower(C) ((C) >= 'a' && (C) <= 'z')
-#define util_isdigit(C) ((C) >= '0' && (C) <= '9')
-#define util_isprint(C) ((C) >= 32 && (C) <= 126)
-#define util_isspace(C) ((C) == ' ' || (C) == '\f' || \
- (C) == '\n'|| (C) == '\r' || \
- (C) == '\t'|| (C) == '\v')
-
-#define util_isalpha(C) (util_islower(C) || util_isupper(C))
+#define util_isalpha(a) ((((unsigned)(a)|32)-'a') < 26)
+#define util_isdigit(a) (((unsigned)(a)-'0') < 10)
+#define util_islower(a) (((unsigned)(a)-'a') < 26)
+#define util_isupper(a) (((unsigned)(a)-'A') < 26)
+#define util_isprint(a) (((unsigned)(a)-0x20) < 0x5F)
+#define util_isspace(a) (((a) >= 9 && (a) <= 13) || (a) == ' ')