aboutsummaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/lua.c b/lua.c
index a7b80e5f..bf87237b 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.57 2001/01/22 18:01:38 roberto Exp roberto $ 2** $Id: lua.c,v 1.58 2001/01/26 11:45:51 roberto Exp roberto $
3** Lua stand-alone interpreter 3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -30,8 +30,7 @@ static int isatty (int x) { return x==0; } /* assume stdin is a tty */
30 30
31 31
32#ifndef LUA_USERINIT 32#ifndef LUA_USERINIT
33#define LUA_USERINIT(L) (lua_baselibopen(L), lua_iolibopen(L), \ 33#define LUA_USERINIT(L) openstdlibs(L)
34 lua_strlibopen(L), lua_mathlibopen(L), lua_dblibopen(L))
35#endif 34#endif
36 35
37 36
@@ -310,6 +309,15 @@ static void register_getargs (char *argv[]) {
310} 309}
311 310
312 311
312static void openstdlibs (lua_State *l) {
313 lua_baselibopen(l);
314 lua_iolibopen(l);
315 lua_strlibopen(l);
316 lua_mathlibopen(l);
317 lua_dblibopen(l);
318}
319
320
313int main (int argc, char *argv[]) { 321int main (int argc, char *argv[]) {
314 struct Options opt; 322 struct Options opt;
315 int status; 323 int status;