diff options
-rw-r--r-- | lctype.c | 12 | ||||
-rw-r--r-- | lctype.h | 4 |
2 files changed, 9 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lctype.c,v 1.4 2009/03/11 13:27:32 roberto Exp roberto $ | 2 | ** $Id: lctype.c,v 1.5 2009/03/26 18:53:52 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 | */ |
@@ -18,10 +18,10 @@ const char luai_ctype_[UCHAR_MAX + 2] = { | |||
18 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | 18 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, |
19 | 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, | 19 | 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, |
20 | 0x16, 0x16, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | 20 | 0x16, 0x16, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, |
21 | 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, | 21 | 0x04, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x25, |
22 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | 22 | 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, |
23 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | 23 | 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, |
24 | 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x05, | 24 | 0x25, 0x25, 0x25, 0x04, 0x04, 0x04, 0x04, 0x05, |
25 | 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, | 25 | 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, |
26 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | 26 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, |
27 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | 27 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, |
@@ -41,5 +41,5 @@ const char luai_ctype_[UCHAR_MAX + 2] = { | |||
41 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 41 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
45 | }; | 45 | }; |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lctype.h,v 1.4 2009/03/11 13:27:32 roberto Exp roberto $ | 2 | ** $Id: lctype.h,v 1.5 2009/03/26 18:53:52 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 | */ |
@@ -18,6 +18,7 @@ | |||
18 | #define PRINTBIT 2 | 18 | #define PRINTBIT 2 |
19 | #define SPACEBIT 3 | 19 | #define SPACEBIT 3 |
20 | #define XDIGITBIT 4 | 20 | #define XDIGITBIT 4 |
21 | #define UPPERBIT 5 | ||
21 | 22 | ||
22 | 23 | ||
23 | #define MASK(B) (1 << (B)) | 24 | #define MASK(B) (1 << (B)) |
@@ -33,6 +34,7 @@ | |||
33 | */ | 34 | */ |
34 | #define lislalpha(c) testprop(c, MASK(ALPHABIT)) | 35 | #define lislalpha(c) testprop(c, MASK(ALPHABIT)) |
35 | #define lislalnum(c) testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT))) | 36 | #define lislalnum(c) testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT))) |
37 | #define lisupper(c) testprop(c, MASK(UPPERBIT)) | ||
36 | #define lisdigit(c) testprop(c, MASK(DIGITBIT)) | 38 | #define lisdigit(c) testprop(c, MASK(DIGITBIT)) |
37 | #define lisspace(c) testprop(c, MASK(SPACEBIT)) | 39 | #define lisspace(c) testprop(c, MASK(SPACEBIT)) |
38 | #define lisprint(c) testprop(c, MASK(PRINTBIT)) | 40 | #define lisprint(c) testprop(c, MASK(PRINTBIT)) |