summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2019-10-28 21:27:33 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2019-10-28 21:27:33 +0000
commit14cc4d9a56a89671154529602c02929865494f67 (patch)
treea5661c23d8be823b23d966a15172860dea32ce89
parent6407c2f82ff5b36788f38da683cb9195e75508ab (diff)
lua.getcodepage() for diagnostic purposes (HH)
git-svn-id: svn://tug.org/texlive/trunk@52557 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/luatexdir/NEWS1
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/llualib.c21
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex_svnversion.h2
4 files changed, 23 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 30afe026f3f..fadf29dcd9c 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,7 @@
+2019-10-28 Luigi Scarso <luigi.scarso@gmail.com>
+ * New callback lua.getcodepage() for diagnostic purposes.
+
+
2019-10-25 Luigi Scarso <luigi.scarso@gmail.com>
* Also support {oeps.foo} filenames in openin/out
diff --git a/Build/source/texk/web2c/luatexdir/NEWS b/Build/source/texk/web2c/luatexdir/NEWS
index ba63f727ae4..42732fae077 100644
--- a/Build/source/texk/web2c/luatexdir/NEWS
+++ b/Build/source/texk/web2c/luatexdir/NEWS
@@ -7,6 +7,7 @@ First release of luahbtex / luajithbtex,
luatex / luajittex with harfbuzz.
Small bug fixes, code clean up and a couple of new primitives
to match eTeX.
+A new callcback lua.getcodepage() for diagnostic purposes.
*** DROPPED the "page_objnum_provider" callback, replaced with "page_order_index". ***
See ChangeLog and the manual.
diff --git a/Build/source/texk/web2c/luatexdir/lua/llualib.c b/Build/source/texk/web2c/luatexdir/lua/llualib.c
index ac9b03ffe60..0586aba026e 100644
--- a/Build/source/texk/web2c/luatexdir/lua/llualib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/llualib.c
@@ -379,16 +379,29 @@ static int get_call_level(lua_State * L) /* hh */
return 1;
}
+static int get_code_page(lua_State *L)
+{
+# ifdef _WIN32
+ lua_pushinteger(L,(int) GetOEMCP());
+ lua_pushinteger(L,(int) GetACP());
+# else
+ lua_pushboolean(L,0);
+ lua_pushboolean(L,0);
+# endif
+ return 2;
+}
+
static const struct luaL_Reg lualib[] = {
/* *INDENT-OFF* */
- {"getluaname", get_luaname},
- {"setluaname", set_luaname},
+ {"getluaname", get_luaname},
+ {"setluaname", set_luaname},
{"getbytecode", get_bytecode},
{"setbytecode", set_bytecode},
- {"newtable", new_table},
+ {"newtable", new_table},
{"get_functions_table",lua_functions_get_table},
- {"getstacktop",get_stack_top},
+ {"getstacktop", get_stack_top},
{"getcalllevel", get_call_level},
+ {"getcodepage", get_code_page },
/* *INDENT-ON* */
{NULL, NULL} /* sentinel */
};
diff --git a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
index 47770e44ed4..b7d2d9796fe 100644
--- a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
+++ b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
@@ -1 +1 @@
-#define luatex_svn_revision 7211
+#define luatex_svn_revision 7215