From 9a7dd0a0770178529c704c08bc446e3533b1f3e5 Mon Sep 17 00:00:00 2001 From: Julian Laubstein Date: Wed, 4 Nov 2015 22:32:11 +0100 Subject: Outsourced all libraries into submodules --- lib/tolua++ | 1 + lib/tolua++/src/bin/lua/_driver.lua | 96 ------------------------------------- 2 files changed, 1 insertion(+), 96 deletions(-) create mode 160000 lib/tolua++ delete mode 100644 lib/tolua++/src/bin/lua/_driver.lua (limited to 'lib/tolua++/src/bin/lua/_driver.lua') diff --git a/lib/tolua++ b/lib/tolua++ new file mode 160000 index 000000000..9181fc9ef --- /dev/null +++ b/lib/tolua++ @@ -0,0 +1 @@ +Subproject commit 9181fc9ef73fa1c052f968d68dc60538f144a474 diff --git a/lib/tolua++/src/bin/lua/_driver.lua b/lib/tolua++/src/bin/lua/_driver.lua deleted file mode 100644 index 1ca18862b..000000000 --- a/lib/tolua++/src/bin/lua/_driver.lua +++ /dev/null @@ -1,96 +0,0 @@ - --- Allow debugging by ZBS, if run under the IDE: -local mobdebugfound, mobdebug = pcall(require, "mobdebug") -if mobdebugfound then mobdebug.start() end - --- Disable buffering for stdout, so that the results appear immediately: -io.output():setvbuf("no") - --- The list of valid arguments that the ToLua scripts can process: -local KnownArgs = { - ['v'] = true, - ['h'] = true, - ['p'] = true, - ['P'] = true, - ['o'] = true, - ['n'] = true, - ['H'] = true, - ['S'] = true, - ['1'] = true, - ['L'] = true, - ['D'] = true, - ['W'] = true, - ['C'] = true, - ['E'] = true, - ['t'] = true, - ['q'] = true, -} - - - - - --- The flags table used by ToLua scripts, to be filled from the cmdline params: -flags = {} - --- Te extra parameters used by ToLua scripts: -_extra_parameters = {} - --- ToLua version required by the scripts: -TOLUA_VERSION = "tolua++-1.0.92" - --- Lua version used by ToLua, required by the scripts: -TOLUA_LUA_VERSION = "Lua 5.1" - - - - - - --- Process the cmdline params into the flags table: -local args = arg or {} -local argc = #args -local i = 1 -while (i <= argc) do - local argv = args[i] - if (argv:sub(1, 1) == "-") then - if (KnownArgs[argv:sub(2)]) then - print("Setting flag \"" .. argv:sub(2) .. "\" to \"" .. args[i + 1] .. "\".") - flags[argv:sub(2)] = args[i + 1] - i = i + 1 - else - print("Unknown option (" .. i .. "): " .. argv) - print("Aborting.") - os.exit(1) - end - else - print("Setting flag \"f\" to \"" .. argv .. "\".") - flags['f'] = argv - break - end - i = i + 1 -end - --- Get the path where the scripts are located: -path = args[0] or "" -local index = path:find("/[^/]*$") -if (index == nil) then - index = path:find("\\[^\\]*$") -end -if (index ~= nil) then - path = path:sub(1, index) -end - -print("path is set to \"" .. path .. "\".") - - - - - --- Call the ToLua processor: -dofile(path .. "all.lua") - - - - - -- cgit v1.2.3