diff -Naur elinks-0.11.1/configure elinks-0.11.1-luapatch/configure --- elinks-0.11.1/configure 2006-11-08 14:35:50.000000000 +0100 +++ elinks-0.11.1-luapatch/configure 2006-11-08 14:35:02.000000000 +0100 @@ -19513,7 +19513,7 @@ for luadir in "$withval" "" /usr /usr/local; do for suffix in "" 50 51; do if test "$cf_result" = no; then - LUA_LIBS="-llua$suffix -llualib$suffix -lm" + LUA_LIBS="-llua$suffix -lm" if test ! -z "$luadir"; then LUA_LIBS="-L$luadir/lib $LUA_LIBS" @@ -19537,10 +19537,10 @@ main () { lua_State *L = lua_open(); - lua_baselibopen(L); - lua_mathlibopen(L); - lua_strlibopen(L); - lua_tablibopen(L); + luaopen_base(L); + luaopen_math(L); + luaopen_string(L); + luaopen_table(L); lua_pushboolean(L, 1); lua_close(L); ; diff -Naur elinks-0.11.1/configure.in elinks-0.11.1-luapatch/configure.in --- elinks-0.11.1/configure.in 2006-01-29 14:10:33.000000000 +0100 +++ elinks-0.11.1-luapatch/configure.in 2006-11-08 14:33:00.000000000 +0100 @@ -739,7 +739,7 @@ for luadir in "$withval" "" /usr /usr/local; do for suffix in "" 50 51; do if test "$cf_result" = no; then - LUA_LIBS="-llua$suffix -llualib$suffix -lm" + LUA_LIBS="-llua$suffix -lm" if test ! -z "$luadir"; then LUA_LIBS="-L$luadir/lib $LUA_LIBS" @@ -754,10 +754,10 @@ AC_TRY_LINK([ #include #include ], [ lua_State *L = lua_open(); - lua_baselibopen(L); - lua_mathlibopen(L); - lua_strlibopen(L); - lua_tablibopen(L); + luaopen_base(L); + luaopen_math(L); + luaopen_string(L); + luaopen_table(L); lua_pushboolean(L, 1); lua_close(L);], cf_result=yes, cf_result=no) diff -Naur elinks-0.11.1/src/scripting/lua/core.c elinks-0.11.1-luapatch/src/scripting/lua/core.c --- elinks-0.11.1/src/scripting/lua/core.c 2006-01-29 14:10:39.000000000 +0100 +++ elinks-0.11.1-luapatch/src/scripting/lua/core.c 2006-11-08 14:31:19.000000000 +0100 @@ -633,7 +633,7 @@ if (file_can_read(file)) { int oldtop = lua_gettop(S); - if (lua_dofile(S, file) != 0) + if (luaL_dofile(S, file) != 0) sleep(3); /* Let some time to see error messages. */ lua_settop(S, oldtop); } @@ -646,11 +646,12 @@ { L = lua_open(); - luaopen_base(L); - luaopen_table(L); - luaopen_io(L); - luaopen_string(L); - luaopen_math(L); + /* lua_pushcfunction(L, ""); lua_pushstring(L, luaopen_base); lua_call(L, 1, 0); + lua_pushcfunction(L, LUA_TABLIBNAME); lua_pushstring(L, luaopen_table); lua_call(L, 1, 0); + lua_pushcfunction(L, LUA_IOLIBNAME); lua_pushstring(L, luaopen_io); lua_call(L, 1, 0); + lua_pushcfunction(L, LUA_STRLIBNAME); lua_pushstring(L, luaopen_string); lua_call(L, 1, 0); + lua_pushcfunction(L, LUA_MATHLIBNAME); lua_pushstring(L, luaopen_math); lua_call(L, 1, 0); */ + luaL_openlibs(L); lua_register(L, LUA_ALERT, l_alert); lua_register(L, "current_url", l_current_url); @@ -755,7 +756,7 @@ int oldtop = lua_gettop(L); if (prepare_lua(ses) == 0) { - lua_dostring(L, expr); + luaL_dostring(L, expr); lua_settop(L, oldtop); finish_lua(); } diff -Naur elinks-0.11.1/src/scripting/lua/hooks.c elinks-0.11.1-luapatch/src/scripting/lua/hooks.c --- elinks-0.11.1/src/scripting/lua/hooks.c 2006-01-29 14:10:39.000000000 +0100 +++ elinks-0.11.1-luapatch/src/scripting/lua/hooks.c 2006-11-08 14:33:00.000000000 +0100 @@ -200,7 +200,7 @@ script_hook_quit(va_list ap, void *data) { if (!prepare_lua(NULL)) { - lua_dostring(lua_state, "if quit_hook then quit_hook() end"); + luaL_dostring(lua_state, "if quit_hook then quit_hook() end"); finish_lua(); }