texlive[52557] Build/source/texk/web2c/luatexdir: lua.getcodepage()

commits+lscarso at tug.org commits+lscarso at tug.org
Mon Oct 28 22:27:33 CET 2019


Revision: 52557
          http://tug.org/svn/texlive?view=revision&revision=52557
Author:   lscarso
Date:     2019-10-28 22:27:33 +0100 (Mon, 28 Oct 2019)
Log Message:
-----------
lua.getcodepage()  for diagnostic purposes (HH)

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/luatexdir/ChangeLog
    trunk/Build/source/texk/web2c/luatexdir/NEWS
    trunk/Build/source/texk/web2c/luatexdir/lua/llualib.c
    trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h

Modified: trunk/Build/source/texk/web2c/luatexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/ChangeLog	2019-10-28 20:59:14 UTC (rev 52556)
+++ trunk/Build/source/texk/web2c/luatexdir/ChangeLog	2019-10-28 21:27:33 UTC (rev 52557)
@@ -1,3 +1,7 @@
+2019-10-28 Luigi Scarso <luigi.scarso at gmail.com>
+    * New callback lua.getcodepage()  for diagnostic purposes.
+
+
 2019-10-25 Luigi Scarso <luigi.scarso at gmail.com>
     * Also support {oeps.foo} filenames in openin/out
 

Modified: trunk/Build/source/texk/web2c/luatexdir/NEWS
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/NEWS	2019-10-28 20:59:14 UTC (rev 52556)
+++ trunk/Build/source/texk/web2c/luatexdir/NEWS	2019-10-28 21:27:33 UTC (rev 52557)
@@ -7,6 +7,7 @@
 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.
 

Modified: trunk/Build/source/texk/web2c/luatexdir/lua/llualib.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lua/llualib.c	2019-10-28 20:59:14 UTC (rev 52556)
+++ trunk/Build/source/texk/web2c/luatexdir/lua/llualib.c	2019-10-28 21:27:33 UTC (rev 52557)
@@ -379,16 +379,29 @@
     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 */
 };

Modified: trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2019-10-28 20:59:14 UTC (rev 52556)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2019-10-28 21:27:33 UTC (rev 52557)
@@ -1 +1 @@
-#define luatex_svn_revision 7211
+#define luatex_svn_revision 7215



More information about the tex-live-commits mailing list