Changeset View
Changeset View
Standalone View
Standalone View
libexec/flua/linit_flua.c
Show All 28 Lines | |||||
#include <stddef.h> | #include <stddef.h> | ||||
#include "lua.h" | #include "lua.h" | ||||
#include "lualib.h" | #include "lualib.h" | ||||
#include "lauxlib.h" | #include "lauxlib.h" | ||||
#include "lfetch.h" | |||||
#include "lfs.h" | #include "lfs.h" | ||||
#include "lposix.h" | #include "lposix.h" | ||||
#include "lua_ucl.h" | #include "lua_ucl.h" | ||||
/* | /* | ||||
** these libs are loaded by lua.c and are readily available to any Lua | ** these libs are loaded by lua.c and are readily available to any Lua | ||||
** program | ** program | ||||
*/ | */ | ||||
static const luaL_Reg loadedlibs[] = { | static const luaL_Reg loadedlibs[] = { | ||||
{"_G", luaopen_base}, | {"_G", luaopen_base}, | ||||
{LUA_LOADLIBNAME, luaopen_package}, | {LUA_LOADLIBNAME, luaopen_package}, | ||||
{LUA_COLIBNAME, luaopen_coroutine}, | {LUA_COLIBNAME, luaopen_coroutine}, | ||||
{LUA_TABLIBNAME, luaopen_table}, | {LUA_TABLIBNAME, luaopen_table}, | ||||
{LUA_IOLIBNAME, luaopen_io}, | {LUA_IOLIBNAME, luaopen_io}, | ||||
{LUA_OSLIBNAME, luaopen_os}, | {LUA_OSLIBNAME, luaopen_os}, | ||||
{LUA_STRLIBNAME, luaopen_string}, | {LUA_STRLIBNAME, luaopen_string}, | ||||
{LUA_MATHLIBNAME, luaopen_math}, | {LUA_MATHLIBNAME, luaopen_math}, | ||||
{LUA_UTF8LIBNAME, luaopen_utf8}, | {LUA_UTF8LIBNAME, luaopen_utf8}, | ||||
{LUA_DBLIBNAME, luaopen_debug}, | {LUA_DBLIBNAME, luaopen_debug}, | ||||
#if defined(LUA_COMPAT_BITLIB) | #if defined(LUA_COMPAT_BITLIB) | ||||
{LUA_BITLIBNAME, luaopen_bit32}, | {LUA_BITLIBNAME, luaopen_bit32}, | ||||
#endif | #endif | ||||
/* FreeBSD Extensions */ | /* FreeBSD Extensions */ | ||||
{"fetch", luaopen_fetch}, | |||||
{"lfs", luaopen_lfs}, | {"lfs", luaopen_lfs}, | ||||
{"posix.libgen", luaopen_posix_libgen}, | {"posix.libgen", luaopen_posix_libgen}, | ||||
{"posix.stdlib", luaopen_posix_stdlib}, | {"posix.stdlib", luaopen_posix_stdlib}, | ||||
{"posix.sys.stat", luaopen_posix_sys_stat}, | {"posix.sys.stat", luaopen_posix_sys_stat}, | ||||
{"posix.sys.wait", luaopen_posix_sys_wait}, | {"posix.sys.wait", luaopen_posix_sys_wait}, | ||||
{"posix.unistd", luaopen_posix_unistd}, | {"posix.unistd", luaopen_posix_unistd}, | ||||
{"ucl", luaopen_ucl}, | {"ucl", luaopen_ucl}, | ||||
{NULL, NULL} | {NULL, NULL} | ||||
Show All 12 Lines |