2019-12-28 12:16:32 +01:00
|
|
|
#include "api.h"
|
|
|
|
|
|
|
|
int luaopen_system(lua_State *L);
|
|
|
|
int luaopen_renderer(lua_State *L);
|
2021-06-02 21:27:00 +02:00
|
|
|
int luaopen_regex(lua_State *L);
|
2021-06-18 20:19:09 +02:00
|
|
|
int luaopen_process(lua_State *L);
|
2022-03-06 06:59:22 +01:00
|
|
|
int luaopen_dirmonitor(lua_State* L);
|
2022-05-11 06:20:13 +02:00
|
|
|
int luaopen_utf8extra(lua_State* L);
|
2019-12-28 12:16:32 +01:00
|
|
|
|
|
|
|
static const luaL_Reg libs[] = {
|
2022-03-06 06:59:22 +01:00
|
|
|
{ "system", luaopen_system },
|
|
|
|
{ "renderer", luaopen_renderer },
|
|
|
|
{ "regex", luaopen_regex },
|
|
|
|
{ "process", luaopen_process },
|
|
|
|
{ "dirmonitor", luaopen_dirmonitor },
|
2022-05-11 06:20:13 +02:00
|
|
|
{ "utf8extra", luaopen_utf8extra },
|
2019-12-28 12:16:32 +01:00
|
|
|
{ NULL, NULL }
|
|
|
|
};
|
|
|
|
|
2022-03-06 06:59:22 +01:00
|
|
|
|
2019-12-28 12:16:32 +01:00
|
|
|
void api_load_libs(lua_State *L) {
|
2021-09-11 04:22:30 +02:00
|
|
|
for (int i = 0; libs[i].name; i++)
|
2019-12-28 12:16:32 +01:00
|
|
|
luaL_requiref(L, libs[i].name, libs[i].func, 1);
|
|
|
|
}
|
2022-03-06 06:59:22 +01:00
|
|
|
|