rockbox/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 Lua: Add pluginlib_actions wrapper for lua scripts. 2012-01-27 09:15:05 +01:00
button_helper.pl
lapi.c Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
lapi.h Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
lauxlib.c Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
lauxlib.h lua update to 5.1.5 2018-11-11 19:42:30 -05:00
lbaselib.c lua LCD (Lua Compact Debug) patch 2019-08-08 07:11:30 +02:00
lbitlib.c Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
lcode.c lua LCD (Lua Compact Debug) patch 2019-08-08 07:11:30 +02:00
lcode.h Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
ldebug.c Lua extend error splash timeout and stop cutting off info 2019-09-06 20:19:42 -05:00
ldebug.h lua LCD (Lua Compact Debug) patch 2019-08-08 07:11:30 +02:00
ldo.c Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
ldo.h Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
ldump.c lua LCD (Lua Compact Debug) patch 2019-08-08 07:11:30 +02:00
lfunc.c lua LCD (Lua Compact Debug) patch 2019-08-08 07:11:30 +02:00
lfunc.h Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
lgc.c lua LCD (Lua Compact Debug) patch 2019-08-08 07:11:30 +02:00
lgc.h Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
liolib.c lua update to 5.1.5 2018-11-11 19:42:30 -05:00
llex.c lua inbinary strings 2019-07-11 00:31:41 +02:00
llex.h Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
llimits.h Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
lmathlib.c lua update to 5.1.5 2018-11-11 19:42:30 -05:00
lmem.c Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
lmem.h Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
loadlib.c lua update to 5.1.5 2018-11-11 19:42:30 -05:00
lobject.c lua inbinary strings 2019-07-11 00:31:41 +02:00
lobject.h lua LCD (Lua Compact Debug) patch 2019-08-08 07:11:30 +02:00
lopcodes.c Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
lopcodes.h Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
loslib.c lua add demo scripts, atexit handler, gui_scrollbar_draw 2019-07-29 02:51:29 -05:00
lparser.c lua LCD fix 2019-08-08 07:36:04 -05:00
lparser.h lua LCD (Lua Compact Debug) patch 2019-08-08 07:11:30 +02:00
lstate.c Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
lstate.h Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
lstring.c Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
lstring.h lua inbinary strings 2019-07-11 00:31:41 +02:00
lstrlib.c lua update to 5.1.5 2018-11-11 19:42:30 -05:00
ltable.c Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
ltable.h Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
ltablib.c Fix misleading indentation as pointed out by the new gcc warning 2016-08-12 15:33:28 +02:00
ltm.c lua inbinary strings 2019-07-11 00:31:41 +02:00
ltm.h Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
lua.h lua LCD (Lua Compact Debug) patch 2019-08-08 07:11:30 +02:00
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 Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
lua_user.h Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
luaconf.h lua LCD (Lua Compact Debug) patch 2019-08-08 07:11:30 +02:00
luadir.c lua give luadir the ability to return table of attributes 2019-09-18 21:20:42 -05:00
luadir.h
lualib.h Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
lundump.c lua LCD (Lua Compact Debug) patch 2019-08-08 07:11:30 +02:00
lundump.h lua disable bytecode dump & undump functions 2019-07-18 14:56:00 -05:00
lvm.c lua fix crashes EGC failure to lock stack in concat 2019-08-05 21:20:30 -05:00
lvm.h Revert "Update lua plugin to 5.2.3" 2014-04-02 20:46:06 +02:00
lzio.c Lua fix reader bug in lzio 2018-11-15 11:20:54 +01:00
lzio.h Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
Makefile
rbdefines_helper.pl lua add sound_current, consolidate sound_ functions 2019-07-25 10:17:40 -05:00
README Lua remove strncat.c & strcspn.c 2018-10-30 04:17:06 +01:00
rockaux.c lua events from rockbox 2019-07-19 20:48:34 -05:00
rockconf.h Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
rocklib.c lua move strip_extension and create_numbered_filename out of main binary 2019-09-28 03:15:15 +02:00
rocklib.h lua events from rockbox 2019-07-19 20:48:34 -05:00
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 lua events from rockbox 2019-07-19 20:48:34 -05:00
rocklib_img.c lua rocklib_img optimize functions with multiple checkint calls 2019-07-29 05:54:27 -05:00
rocklib_img.h lua move rocklib_img to its own separate loadable module 2018-10-22 14:00:58 -04:00
rocklibc.h lua update to 5.1.5 2018-11-11 19:42:30 -05:00
rocklua.c lua add _fullpath and argument parsing 2020-06-01 13:23:38 -05:00
settings_helper.pl Lua add metadata and settings reading helper module 2019-09-07 03:10:59 +02:00
SOURCES Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00
strftime.c Lua update strftime.c from dietlibc source 2018-10-30 02:39:11 -04:00
strpbrk.c Initial commit of the Samsung YP-R0 port. 2011-12-24 11:56:46 +00:00
strstr.c
strtol.c lua fix mem_read_write, strtol 2019-08-28 00:56:08 -05:00
strtoul.c
tlsf_helper.c Lua Add Emergency Garbage Collector 2019-07-28 15:17:48 +02:00

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