18 #if !defined(LUA_USE_CTYPE)
20 #if 'A' == 65 && '0' == 48
22 #define LUA_USE_CTYPE 0
25 #define LUA_USE_CTYPE 1
45 #define MASK(B) (1 << (B))
51 #define testprop(c,p) (luai_ctype_[(c)+1] & (p))
56 #define lislalpha(c) testprop(c, MASK(ALPHABIT))
57 #define lislalnum(c) testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT)))
58 #define lisdigit(c) testprop(c, MASK(DIGITBIT))
59 #define lisspace(c) testprop(c, MASK(SPACEBIT))
60 #define lisprint(c) testprop(c, MASK(PRINTBIT))
61 #define lisxdigit(c) testprop(c, MASK(XDIGITBIT))
66 #define ltolower(c) ((c) | ('A' ^ 'a'))
82 #define lislalpha(c) (isalpha(c) || (c) == '_')
83 #define lislalnum(c) (isalnum(c) || (c) == '_')
84 #define lisdigit(c) (isdigit(c))
85 #define lisspace(c) (isspace(c))
86 #define lisprint(c) (isprint(c))
87 #define lisxdigit(c) (isxdigit(c))
89 #define ltolower(c) (tolower(c))