Adding upstream version 4.01+dfsg.
[syslinux-debian/hramrach.git] / com32 / lua / src / linit.c
blobe457ee8db3edbe6e79eade9fa02ff5d13d71d9a6
1 /*
2 ** $Id: linit.c,v 1.14.1.1 2007/12/27 13:02:25 roberto Exp $
3 ** Initialization of libraries for lua.c
4 ** See Copyright Notice in lua.h
5 */
8 #define linit_c
9 #define LUA_LIB
11 #include "lua.h"
13 #include "lualib.h"
14 #include "lauxlib.h"
17 static const luaL_Reg lualibs[] = {
18 {"", luaopen_base},
19 {LUA_LOADLIBNAME, luaopen_package},
20 {LUA_TABLIBNAME, luaopen_table},
21 {LUA_IOLIBNAME, luaopen_io},
22 // {LUA_OSLIBNAME, luaopen_os},
23 {LUA_STRLIBNAME, luaopen_string},
24 #if !defined LUA_NUMBER_INTEGRAL
25 {LUA_MATHLIBNAME, luaopen_math},
26 #endif
27 {LUA_DBLIBNAME, luaopen_debug},
28 {LUA_DMILIBNAME, luaopen_dmi},
29 {LUA_SYSLINUXLIBNAME, luaopen_syslinux},
30 {NULL, NULL}
34 LUALIB_API void luaL_openlibs (lua_State *L) {
35 const luaL_Reg *lib = lualibs;
36 for (; lib->func; lib++) {
37 lua_pushcfunction(L, lib->func);
38 lua_pushstring(L, lib->name);
39 lua_call(L, 1, 0);