diff options
Diffstat (limited to 'lctype.h')
-rw-r--r-- | lctype.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lctype.h,v 1.1 2009/02/19 17:18:25 roberto Exp roberto $ | 2 | ** $Id: lctype.h,v 1.2 2009/02/20 13:11:15 roberto Exp roberto $ |
3 | ** 'ctype' functions for Lua | 3 | ** 'ctype' functions for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -17,6 +17,7 @@ | |||
17 | #define DIGITBIT 1 | 17 | #define DIGITBIT 1 |
18 | #define PRINTBIT 2 | 18 | #define PRINTBIT 2 |
19 | #define SPACEBIT 3 | 19 | #define SPACEBIT 3 |
20 | #define XDIGITBIT 4 | ||
20 | 21 | ||
21 | 22 | ||
22 | #define MASK(B) (1 << (B)) | 23 | #define MASK(B) (1 << (B)) |
@@ -27,6 +28,7 @@ | |||
27 | #define lisdigit(x) (luai_ctype_[x] & MASK(DIGITBIT)) | 28 | #define lisdigit(x) (luai_ctype_[x] & MASK(DIGITBIT)) |
28 | #define lisspace(x) (luai_ctype_[x] & MASK(SPACEBIT)) | 29 | #define lisspace(x) (luai_ctype_[x] & MASK(SPACEBIT)) |
29 | #define lisprint(x) (luai_ctype_[x] & MASK(PRINTBIT)) | 30 | #define lisprint(x) (luai_ctype_[x] & MASK(PRINTBIT)) |
31 | #define lisxdigit(x) (luai_ctype_[x] & MASK(XDIGITBIT)) | ||
30 | 32 | ||
31 | LUAI_DATA const char luai_ctype_[UCHAR_MAX + 1]; | 33 | LUAI_DATA const char luai_ctype_[UCHAR_MAX + 1]; |
32 | 34 | ||