diff options
author | Alexey Zaytsev <alexey.zaytsev@gmail.com> | 2008-07-18 03:27:36 +0400 |
---|---|---|
committer | Alexey Zaytsev <zaytsev.a@protei.ru> | 2008-07-18 03:27:36 +0400 |
commit | 7ec4ebc327c7c9e90556eaef3ab592a08aab59be (patch) | |
tree | d79774cf1358aa1bb21d23edc29ca629d1915db4 /com32/lua | |
parent | ae308b58affd717b049ae84426602366f63ce6af (diff) | |
download | syslinux-7ec4ebc327c7c9e90556eaef3ab592a08aab59be.tar.gz |
Final touhes.
Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
Diffstat (limited to 'com32/lua')
-rw-r--r-- | com32/lua/src/loslib.c | 2 | ||||
-rw-r--r-- | com32/lua/src/lua.c | 6 | ||||
-rw-r--r-- | com32/lua/src/lua.h | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/com32/lua/src/loslib.c b/com32/lua/src/loslib.c index 81b57eb8..740ad0d5 100644 --- a/com32/lua/src/loslib.c +++ b/com32/lua/src/loslib.c @@ -66,7 +66,7 @@ static int os_tmpname (lua_State *L) { static int os_getenv (lua_State *L) { - lua_pushstring(L, getenv(luaL_checkstring(L, 1))); /* if NULL push nil */ + lua_pushstring(L, /*getenv(luaL_checkstring(L, 1))*/); /* if NULL push nil */ return 1; } diff --git a/com32/lua/src/lua.c b/com32/lua/src/lua.c index 7df2c3f7..0d2d16c3 100644 --- a/com32/lua/src/lua.c +++ b/com32/lua/src/lua.c @@ -10,6 +10,7 @@ #include <stdlib.h> #include <string.h> +#include <console.h> #define lua_c #include "lua.h" @@ -321,7 +322,7 @@ static int runargs (lua_State *L, char **argv, int n) { static int handle_luainit (lua_State *L) { - const char *init = getenv(LUA_INIT); + const char *init = /*getenv(LUA_INIT)*/ NULL; if (init == NULL) return 0; /* status OK */ else if (init[0] == '@') return dofile(L, init+1); @@ -377,6 +378,9 @@ static int pmain (lua_State *L) { int main (int argc, char **argv) { int status; struct Smain s; + + openconsole(&dev_stdcon_r, &dev_stdcon_w); + lua_State *L = lua_open(); /* create state */ if (L == NULL) { l_message(argv[0], "cannot create state: not enough memory"); diff --git a/com32/lua/src/lua.h b/com32/lua/src/lua.h index 5bc97b74..3b325a9a 100644 --- a/com32/lua/src/lua.h +++ b/com32/lua/src/lua.h @@ -15,6 +15,9 @@ #include "luaconf.h" +#define feof(x) 0 +#define ferror(x) 0 + #define LUA_VERSION "Lua 5.1" #define LUA_RELEASE "Lua 5.1.3" |