summaryrefslogtreecommitdiff
path: root/Build/source/libs/luajit/LuaJIT-2.1.0-beta1/src/lj_char.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-09-07 10:07:14 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-09-07 10:07:14 +0000
commitce38b262dce6b9f416231d205b294c4b30912b20 (patch)
treefafb76fe57097be200a0f072e27603a82a87bd17 /Build/source/libs/luajit/LuaJIT-2.1.0-beta1/src/lj_char.c
parent12b7886d9ba059dcf4d8c2d3f534426b7476c447 (diff)
LuaJIT 2.1.0-beta1
git-svn-id: svn://tug.org/texlive/trunk@38315 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/luajit/LuaJIT-2.1.0-beta1/src/lj_char.c')
-rw-r--r--Build/source/libs/luajit/LuaJIT-2.1.0-beta1/src/lj_char.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/Build/source/libs/luajit/LuaJIT-2.1.0-beta1/src/lj_char.c b/Build/source/libs/luajit/LuaJIT-2.1.0-beta1/src/lj_char.c
new file mode 100644
index 00000000000..11f23efe44d
--- /dev/null
+++ b/Build/source/libs/luajit/LuaJIT-2.1.0-beta1/src/lj_char.c
@@ -0,0 +1,43 @@
+/*
+** Character types.
+** Donated to the public domain.
+**
+** This is intended to replace the problematic libc single-byte NLS functions.
+** These just don't make sense anymore with UTF-8 locales becoming the norm
+** on POSIX systems. It never worked too well on Windows systems since hardly
+** anyone bothered to call setlocale().
+**
+** This table is hardcoded for ASCII. Identifiers include the characters
+** 128-255, too. This allows for the use of all non-ASCII chars as identifiers
+** in the lexer. This is a broad definition, but works well in practice
+** for both UTF-8 locales and most single-byte locales (such as ISO-8859-*).
+**
+** If you really need proper character types for UTF-8 strings, please use
+** an add-on library such as slnunicode: http://luaforge.net/projects/sln/
+*/
+
+#define lj_char_c
+#define LUA_CORE
+
+#include "lj_char.h"
+
+LJ_DATADEF const uint8_t lj_char_bits[257] = {
+ 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 152,152,152,152,152,152,152,152,152,152, 4, 4, 4, 4, 4, 4,
+ 4,176,176,176,176,176,176,160,160,160,160,160,160,160,160,160,
+ 160,160,160,160,160,160,160,160,160,160,160, 4, 4, 4, 4,132,
+ 4,208,208,208,208,208,208,192,192,192,192,192,192,192,192,192,
+ 192,192,192,192,192,192,192,192,192,192,192, 4, 4, 4, 4, 1,
+ 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
+ 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
+ 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
+ 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
+ 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
+ 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
+ 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
+ 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128
+};
+