2010-10-14 13:56:23 +00:00
|
|
|
#include "config.h"
|
2010-10-14 13:52:01 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <lua.h>
|
|
|
|
#include <lualib.h>
|
|
|
|
#include <lauxlib.h>
|
|
|
|
|
|
|
|
/* the Lua interpreter */
|
|
|
|
lua_State* L;
|
|
|
|
|
|
|
|
int main (int argc, char *argv[])
|
|
|
|
{
|
|
|
|
/* initialize Lua */
|
|
|
|
L = lua_open();
|
|
|
|
/* load Lua base libraries */
|
|
|
|
luaL_openlibs(L);
|
|
|
|
/* register our function */
|
2010-10-14 13:56:23 +00:00
|
|
|
/* lua_register(L, "average", average); */
|
2010-10-14 13:52:01 +00:00
|
|
|
/* run the script */
|
2010-10-14 13:56:23 +00:00
|
|
|
(void) luaL_dofile(L, "lsyncd.lua");
|
2010-10-14 13:52:01 +00:00
|
|
|
/* cleanup Lua */
|
|
|
|
lua_close(L);
|
|
|
|
/* pause */
|
|
|
|
printf( "Press enter to exit..." );
|
|
|
|
getchar();
|
|
|
|
return 0;
|
|
|
|
}
|