Re: [NTG-context] LuaTeX incompatible with Lua

2019-11-21 Thread Hans Hagen
On 11/21/2019 8:17 AM, Henri Menke wrote: Dear list, The following Lua script behaves differently when executed in Lua vs. LuaTeX.     print(os.execute("date")) It seems that the definition of os_execute in loslibext.c was copied over from Lua 5.1 and not adapted to newer versions.     $

Re: [NTG-context] LuaTeX incompatible with Lua

2019-11-20 Thread Henri Menke
Below I include a suggestion on how to do this sort of version agnostic. Cheers, Henri Live example on Wandbox: https://wandbox.org/permlink/jEn9kNnPB0t5rwjP --- #include #include #include #include #include static int (*lua_os_execute)(lua_State *L) = NULL; static int

[NTG-context] LuaTeX incompatible with Lua

2019-11-20 Thread Henri Menke
Dear list, The following Lua script behaves differently when executed in Lua vs. LuaTeX. print(os.execute("date")) It seems that the definition of os_execute in loslibext.c was copied over from Lua 5.1 and not adapted to newer versions. $ lua5.1 test.lua 0 $ lua5.2 test.lua