For review - quick & dirty patch to make chdkptp work with Lua 5.3.
Changes:
- copy code for luaL_register and luaL_optint from Lua 5.2 to luautil.h & luautil.c
- add fixes for deprecated loadstring, unpack and table.maxn functions in main.lua
- change %d format strings to %.0f (Lua 5.3 won't convert float to int unless the float is an exact integer value)
All tests in 'test.lua' and 'camtests.lua' pass on MacOS Catalina and Debian (LMDE 2).
IUP/CD GUI appears to work correctly (Debian).
Notes:
- table.maxn patch uses #t for table length, not sure if this is ok as the two are not identical
- there may still be other '%d' format strings that need changing.
Phil.