From 40fc27154fe754181934dc7ee31375e6bdfb33fc Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 23 Oct 2018 12:23:58 +0800 Subject: *merge from minimal --- src/main.cpp | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 src/main.cpp (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp deleted file mode 100644 index 8bd308b..0000000 --- a/src/main.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#ifdef _WIN32 -# include -# include -#endif - -#include "lua/modules/luax.h" -#include "lua/modules/jin.h" -#include "libjin/jin.h" -#include - -using namespace jin::lua; - -int main(int argc, char* argv[]) -{ - lua_State* L = luax_newstate(); - - luax_openlibs(L); - luaopen_jin(L); - - // add args to global field - luax_newtable(L); - for (int i = 0; i < argc; ++i) - luax_setraw_string(L, -2, i + 1, argv[i]); - luax_setfield(L, -2, "_argv"); - - const int BUFFER_SIZE = 512; - char buffer[BUFFER_SIZE]; -#ifdef _WIN32 - _getcwd(buffer, BUFFER_SIZE); -#elif defined __unix__ -#elif defined __APPLE__ -#endif - luax_setfield_string(L, "_dir", buffer); - boot(L); - luax_close(L); - - return 0; -} \ No newline at end of file -- cgit v1.1-26-g67d0