diff options
Diffstat (limited to 'src/lj_char.h')
-rw-r--r-- | src/lj_char.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lj_char.h b/src/lj_char.h index d474285c..7b7c1322 100644 --- a/src/lj_char.h +++ b/src/lj_char.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define LJ_CHAR_IDENT 0x80 | 18 | #define LJ_CHAR_IDENT 0x80 |
19 | #define LJ_CHAR_ALPHA (LJ_CHAR_LOWER|LJ_CHAR_UPPER) | 19 | #define LJ_CHAR_ALPHA (LJ_CHAR_LOWER|LJ_CHAR_UPPER) |
20 | #define LJ_CHAR_ALNUM (LJ_CHAR_ALPHA|LJ_CHAR_DIGIT) | 20 | #define LJ_CHAR_ALNUM (LJ_CHAR_ALPHA|LJ_CHAR_DIGIT) |
21 | #define LJ_CHAR_GRAPH (LJ_CHAR_ALNUM|LJ_CHAR_PUNCT) | ||
21 | 22 | ||
22 | /* Only pass -1 or 0..255 to these macros. Never pass a signed char! */ | 23 | /* Only pass -1 or 0..255 to these macros. Never pass a signed char! */ |
23 | #define lj_char_isa(c, t) (lj_char_bits[(c)+1] & t) | 24 | #define lj_char_isa(c, t) (lj_char_bits[(c)+1] & t) |
@@ -31,6 +32,7 @@ | |||
31 | #define lj_char_isident(c) lj_char_isa((c), LJ_CHAR_IDENT) | 32 | #define lj_char_isident(c) lj_char_isa((c), LJ_CHAR_IDENT) |
32 | #define lj_char_isalpha(c) lj_char_isa((c), LJ_CHAR_ALPHA) | 33 | #define lj_char_isalpha(c) lj_char_isa((c), LJ_CHAR_ALPHA) |
33 | #define lj_char_isalnum(c) lj_char_isa((c), LJ_CHAR_ALNUM) | 34 | #define lj_char_isalnum(c) lj_char_isa((c), LJ_CHAR_ALNUM) |
35 | #define lj_char_isgraph(c) lj_char_isa((c), LJ_CHAR_GRAPH) | ||
34 | 36 | ||
35 | #define lj_char_toupper(c) ((c) - (lj_char_islower(c) >> 1)) | 37 | #define lj_char_toupper(c) ((c) - (lj_char_islower(c) >> 1)) |
36 | #define lj_char_tolower(c) ((c) + lj_char_isupper(c)) | 38 | #define lj_char_tolower(c) ((c) + lj_char_isupper(c)) |