search for: dir_iter

Displaying 3 results from an estimated 3 matches for "dir_iter".

Did you mean: dir_item
2013 Oct 03
0
Automatic boot menu?
...a temp buffer and size instead. */ + char buf[PATH_MAX]; + if ((path = getcwd(buf, PATH_MAX)) == NULL) { + lua_pushnil(L); + lua_pushstring(L, strerror(errno)); + return 2; + } + else { + lua_pushstring(L, path); + return 1; + } +} + + +/* +** Directory iterator +*/ +static int dir_iter (lua_State *L) { + struct dirent *entry; + dir_data *d = (dir_data *)luaL_checkudata (L, 1, DIR_METATABLE); + luaL_argcheck (L, d->closed == 0, 1, "closed directory"); + if ((entry = readdir (d->dir)) != NULL) { + lua_pushstring (L, entry-&...
2013 Aug 30
2
Automatic boot menu?
"H. Peter Anvin" <hpa at zytor.com> writes: > On 08/29/2013 04:14 AM, Ferenc Wagner wrote: > >> "H. Peter Anvin" <hpa at zytor.com> writes: >> >>> On 08/22/2013 10:20 AM, Ferenc Wagner wrote: >>> >>>> Now that Syslinux has ls.c32 and lua.c32, it should be possible to build >>>> a customizable boot menu in
2013 Oct 15
23
[PATCH 00/21] Upgrade to Lua 5.2.2, add filesystem module and get_key binding
Hi, This series targets automatic boot menu generation, but most of it is the Lua upgrade, because I got tired reading deprecated API docs. It's mostly a straightforward forward port of the earlier Syslinux specific changes to Lua 5.1, except that: * I chose the add a stub getenv() implementation to the COM32 API instead of #ifdefing out all the references in Lua, and * I kept oslib