diff options
author | David Walter Seikel | 2012-01-23 23:36:30 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:36:30 +1000 |
commit | 6523585c66c04cea54df50013df8886b589847d8 (patch) | |
tree | 0b22aee7064166d88595eda260ca2d17c0773da5 /libraries/luajit-2.0/src/lj_char.h | |
parent | Update the EFL to what I'm actually using, coz I'm using some stuff not yet r... (diff) | |
download | SledjHamr-6523585c66c04cea54df50013df8886b589847d8.zip SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.gz SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.bz2 SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.xz |
Add luaproc and LuaJIT libraries.
Two versions of LuaJIT, the stable release, and the dev version. Try the dev version first, until ih fails badly.
Diffstat (limited to 'libraries/luajit-2.0/src/lj_char.h')
-rw-r--r-- | libraries/luajit-2.0/src/lj_char.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libraries/luajit-2.0/src/lj_char.h b/libraries/luajit-2.0/src/lj_char.h new file mode 100644 index 0000000..7b7c132 --- /dev/null +++ b/libraries/luajit-2.0/src/lj_char.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | ** Character types. | ||
3 | ** Donated to the public domain. | ||
4 | */ | ||
5 | |||
6 | #ifndef _LJ_CHAR_H | ||
7 | #define _LJ_CHAR_H | ||
8 | |||
9 | #include "lj_def.h" | ||
10 | |||
11 | #define LJ_CHAR_CNTRL 0x01 | ||
12 | #define LJ_CHAR_SPACE 0x02 | ||
13 | #define LJ_CHAR_PUNCT 0x04 | ||
14 | #define LJ_CHAR_DIGIT 0x08 | ||
15 | #define LJ_CHAR_XDIGIT 0x10 | ||
16 | #define LJ_CHAR_UPPER 0x20 | ||
17 | #define LJ_CHAR_LOWER 0x40 | ||
18 | #define LJ_CHAR_IDENT 0x80 | ||
19 | #define LJ_CHAR_ALPHA (LJ_CHAR_LOWER|LJ_CHAR_UPPER) | ||
20 | #define LJ_CHAR_ALNUM (LJ_CHAR_ALPHA|LJ_CHAR_DIGIT) | ||
21 | #define LJ_CHAR_GRAPH (LJ_CHAR_ALNUM|LJ_CHAR_PUNCT) | ||
22 | |||
23 | /* Only pass -1 or 0..255 to these macros. Never pass a signed char! */ | ||
24 | #define lj_char_isa(c, t) (lj_char_bits[(c)+1] & t) | ||
25 | #define lj_char_iscntrl(c) lj_char_isa((c), LJ_CHAR_CNTRL) | ||
26 | #define lj_char_isspace(c) lj_char_isa((c), LJ_CHAR_SPACE) | ||
27 | #define lj_char_ispunct(c) lj_char_isa((c), LJ_CHAR_PUNCT) | ||
28 | #define lj_char_isdigit(c) lj_char_isa((c), LJ_CHAR_DIGIT) | ||
29 | #define lj_char_isxdigit(c) lj_char_isa((c), LJ_CHAR_XDIGIT) | ||
30 | #define lj_char_isupper(c) lj_char_isa((c), LJ_CHAR_UPPER) | ||
31 | #define lj_char_islower(c) lj_char_isa((c), LJ_CHAR_LOWER) | ||
32 | #define lj_char_isident(c) lj_char_isa((c), LJ_CHAR_IDENT) | ||
33 | #define lj_char_isalpha(c) lj_char_isa((c), LJ_CHAR_ALPHA) | ||
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) | ||
36 | |||
37 | #define lj_char_toupper(c) ((c) - (lj_char_islower(c) >> 1)) | ||
38 | #define lj_char_tolower(c) ((c) + lj_char_isupper(c)) | ||
39 | |||
40 | LJ_DATA const uint8_t lj_char_bits[257]; | ||
41 | |||
42 | #endif | ||