1
0
Fork 0
forked from len0rd/rockbox
foxbox/apps/plugins/lua
William Wilgus e4ee5980c6 lua add _fullpath and argument parsing
WIP for passing arguments to lua scripts

args are recognized by adding ?arg to the end of the script path
The easiest way to do this currently is to use the function rb.restart_lua

local sfile = rawget(_G, "_fullpath") or ""
local sArgs = rawget(_G, "_arguments")

if not sArgs then
    rb.restart_lua(sfile .. "?my arguments")
else
    rb.splash(1000, sfile .. "?" .. sArgs)
end

I'd eventually like to figure out a sensible way to do this from a
shortcut / quick list

Change-Id: I2b60fe3b8f1d04b57361fe532510bd6afee59fbf
2020-06-01 13:23:38 -05:00
..
include_lua lua move strip_extension and create_numbered_filename out of main binary 2019-09-28 03:15:15 +02:00
action_helper.pl
button_helper.pl
lapi.c
lapi.h
lauxlib.c
lauxlib.h
lbaselib.c
lbitlib.c
lcode.c
lcode.h
ldebug.c Lua extend error splash timeout and stop cutting off info 2019-09-06 20:19:42 -05:00
ldebug.h
ldo.c
ldo.h
ldump.c
lfunc.c
lfunc.h
lgc.c
lgc.h
liolib.c
llex.c
llex.h
llimits.h
lmathlib.c
lmem.c
lmem.h
loadlib.c
lobject.c
lobject.h
lopcodes.c
lopcodes.h
loslib.c
lparser.c
lparser.h
lstate.c
lstate.h
lstring.c
lstring.h
lstrlib.c
ltable.c
ltable.h
ltablib.c
ltm.c
ltm.h
lua.h
lua.make lua move strip_extension and create_numbered_filename out of main binary 2019-09-28 03:15:15 +02:00
lua_user.c
lua_user.h
luaconf.h
luadir.c lua give luadir the ability to return table of attributes 2019-09-18 21:20:42 -05:00
luadir.h
lualib.h
lundump.c
lundump.h
lvm.c
lvm.h
lzio.c
lzio.h
Makefile
rbdefines_helper.pl
README
rockaux.c
rockconf.h
rocklib.c lua move strip_extension and create_numbered_filename out of main binary 2019-09-28 03:15:15 +02:00
rocklib.h
rocklib_aux.pl lua move strip_extension and create_numbered_filename out of main binary 2019-09-28 03:15:15 +02:00
rocklib_events.c lua rockev rewrite 2019-11-15 14:28:03 +01:00
rocklib_events.h
rocklib_img.c
rocklib_img.h
rocklibc.h
rocklua.c lua add _fullpath and argument parsing 2020-06-01 13:23:38 -05:00
settings_helper.pl
SOURCES
strftime.c
strpbrk.c
strstr.c
strtol.c
strtoul.c
tlsf_helper.c

The following files are (with slight modifications for Rockbox) from dietlibc
version 0.31 which is licensed under the GPL version 2:

    gmtime.c
    strftime.c
    strpbrk.c
    strtol.c
    strtoul.c
    strstr.c