diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua/llualib.c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/llualib.c | 21 |
1 files changed, 17 insertions, 4 deletions
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 */ }; |