summaryrefslogtreecommitdiffstats
path: root/lib/tolua++/src/bin
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-11-27 09:23:17 +0100
committerMattes D <github@xoft.cz>2013-11-27 09:23:17 +0100
commit49760db89d94ede5d123d927141a6cd60dbaaf07 (patch)
tree6c6cf99e4cf3128311a93cd187947b502f3732a0 /lib/tolua++/src/bin
parentcWorld::SpawnExperienceOrb() now returns the entity ID of the spawned orb. (diff)
parentFixed VC2008 compilation, normalized include paths. (diff)
downloadcuberite-49760db89d94ede5d123d927141a6cd60dbaaf07.tar
cuberite-49760db89d94ede5d123d927141a6cd60dbaaf07.tar.gz
cuberite-49760db89d94ede5d123d927141a6cd60dbaaf07.tar.bz2
cuberite-49760db89d94ede5d123d927141a6cd60dbaaf07.tar.lz
cuberite-49760db89d94ede5d123d927141a6cd60dbaaf07.tar.xz
cuberite-49760db89d94ede5d123d927141a6cd60dbaaf07.tar.zst
cuberite-49760db89d94ede5d123d927141a6cd60dbaaf07.zip
Diffstat (limited to '')
-rw-r--r--lib/tolua++/src/bin/SCsub (renamed from tolua++-1.0.93/src/bin/SCsub)0
-rw-r--r--lib/tolua++/src/bin/lua/all.lua (renamed from tolua++-1.0.93/src/bin/lua/all.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/array.lua (renamed from tolua++-1.0.93/src/bin/lua/array.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/basic.lua (renamed from tolua++-1.0.93/src/bin/lua/basic.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/class.lua (renamed from tolua++-1.0.93/src/bin/lua/class.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/clean.lua (renamed from tolua++-1.0.93/src/bin/lua/clean.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/code.lua (renamed from tolua++-1.0.93/src/bin/lua/code.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/compat-5.1.lua (renamed from tolua++-1.0.93/src/bin/lua/compat-5.1.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/compat.lua (renamed from tolua++-1.0.93/src/bin/lua/compat.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/container.lua (renamed from tolua++-1.0.93/src/bin/lua/container.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/custom.lua (renamed from tolua++-1.0.93/src/bin/lua/custom.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/declaration.lua (renamed from tolua++-1.0.93/src/bin/lua/declaration.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/define.lua (renamed from tolua++-1.0.93/src/bin/lua/define.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/doit.lua (renamed from tolua++-1.0.93/src/bin/lua/doit.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/enumerate.lua (renamed from tolua++-1.0.93/src/bin/lua/enumerate.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/feature.lua (renamed from tolua++-1.0.93/src/bin/lua/feature.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/function.lua (renamed from tolua++-1.0.93/src/bin/lua/function.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/module.lua (renamed from tolua++-1.0.93/src/bin/lua/module.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/namespace.lua (renamed from tolua++-1.0.93/src/bin/lua/namespace.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/operator.lua (renamed from tolua++-1.0.93/src/bin/lua/operator.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/package.lua (renamed from tolua++-1.0.93/src/bin/lua/package.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/template_class.lua (renamed from tolua++-1.0.93/src/bin/lua/template_class.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/typedef.lua (renamed from tolua++-1.0.93/src/bin/lua/typedef.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/variable.lua (renamed from tolua++-1.0.93/src/bin/lua/variable.lua)0
-rw-r--r--lib/tolua++/src/bin/lua/verbatim.lua (renamed from tolua++-1.0.93/src/bin/lua/verbatim.lua)0
-rw-r--r--lib/tolua++/src/bin/tolua.c169
-rw-r--r--lib/tolua++/src/bin/tolua_scons.pkg (renamed from tolua++-1.0.93/src/bin/tolua_scons.pkg)0
-rw-r--r--lib/tolua++/src/bin/toluabind.c (renamed from tolua++-1.0.93/src/bin/toluabind.c)0
-rw-r--r--lib/tolua++/src/bin/toluabind.h (renamed from tolua++-1.0.93/src/bin/toluabind.h)0
-rw-r--r--lib/tolua++/src/bin/toluabind_default.c (renamed from tolua++-1.0.93/src/bin/toluabind_default.c)0
-rw-r--r--lib/tolua++/src/bin/toluabind_default.h (renamed from tolua++-1.0.93/src/bin/toluabind_default.h)0
31 files changed, 169 insertions, 0 deletions
diff --git a/tolua++-1.0.93/src/bin/SCsub b/lib/tolua++/src/bin/SCsub
index 35ccd7a24..35ccd7a24 100644
--- a/tolua++-1.0.93/src/bin/SCsub
+++ b/lib/tolua++/src/bin/SCsub
diff --git a/tolua++-1.0.93/src/bin/lua/all.lua b/lib/tolua++/src/bin/lua/all.lua
index 83f8a3cb9..83f8a3cb9 100644
--- a/tolua++-1.0.93/src/bin/lua/all.lua
+++ b/lib/tolua++/src/bin/lua/all.lua
diff --git a/tolua++-1.0.93/src/bin/lua/array.lua b/lib/tolua++/src/bin/lua/array.lua
index f35aa98ce..f35aa98ce 100644
--- a/tolua++-1.0.93/src/bin/lua/array.lua
+++ b/lib/tolua++/src/bin/lua/array.lua
diff --git a/tolua++-1.0.93/src/bin/lua/basic.lua b/lib/tolua++/src/bin/lua/basic.lua
index f651f1fe6..f651f1fe6 100644
--- a/tolua++-1.0.93/src/bin/lua/basic.lua
+++ b/lib/tolua++/src/bin/lua/basic.lua
diff --git a/tolua++-1.0.93/src/bin/lua/class.lua b/lib/tolua++/src/bin/lua/class.lua
index 592705282..592705282 100644
--- a/tolua++-1.0.93/src/bin/lua/class.lua
+++ b/lib/tolua++/src/bin/lua/class.lua
diff --git a/tolua++-1.0.93/src/bin/lua/clean.lua b/lib/tolua++/src/bin/lua/clean.lua
index fd5b7b635..fd5b7b635 100644
--- a/tolua++-1.0.93/src/bin/lua/clean.lua
+++ b/lib/tolua++/src/bin/lua/clean.lua
diff --git a/tolua++-1.0.93/src/bin/lua/code.lua b/lib/tolua++/src/bin/lua/code.lua
index 5e19b6bbf..5e19b6bbf 100644
--- a/tolua++-1.0.93/src/bin/lua/code.lua
+++ b/lib/tolua++/src/bin/lua/code.lua
diff --git a/tolua++-1.0.93/src/bin/lua/compat-5.1.lua b/lib/tolua++/src/bin/lua/compat-5.1.lua
index 7a2c60b69..7a2c60b69 100644
--- a/tolua++-1.0.93/src/bin/lua/compat-5.1.lua
+++ b/lib/tolua++/src/bin/lua/compat-5.1.lua
diff --git a/tolua++-1.0.93/src/bin/lua/compat.lua b/lib/tolua++/src/bin/lua/compat.lua
index 45d6ae1ba..45d6ae1ba 100644
--- a/tolua++-1.0.93/src/bin/lua/compat.lua
+++ b/lib/tolua++/src/bin/lua/compat.lua
diff --git a/tolua++-1.0.93/src/bin/lua/container.lua b/lib/tolua++/src/bin/lua/container.lua
index 2d11db7df..2d11db7df 100644
--- a/tolua++-1.0.93/src/bin/lua/container.lua
+++ b/lib/tolua++/src/bin/lua/container.lua
diff --git a/tolua++-1.0.93/src/bin/lua/custom.lua b/lib/tolua++/src/bin/lua/custom.lua
index de5912fb3..de5912fb3 100644
--- a/tolua++-1.0.93/src/bin/lua/custom.lua
+++ b/lib/tolua++/src/bin/lua/custom.lua
diff --git a/tolua++-1.0.93/src/bin/lua/declaration.lua b/lib/tolua++/src/bin/lua/declaration.lua
index 73bbe910e..73bbe910e 100644
--- a/tolua++-1.0.93/src/bin/lua/declaration.lua
+++ b/lib/tolua++/src/bin/lua/declaration.lua
diff --git a/tolua++-1.0.93/src/bin/lua/define.lua b/lib/tolua++/src/bin/lua/define.lua
index 96a28d878..96a28d878 100644
--- a/tolua++-1.0.93/src/bin/lua/define.lua
+++ b/lib/tolua++/src/bin/lua/define.lua
diff --git a/tolua++-1.0.93/src/bin/lua/doit.lua b/lib/tolua++/src/bin/lua/doit.lua
index 51dd0cf3c..51dd0cf3c 100644
--- a/tolua++-1.0.93/src/bin/lua/doit.lua
+++ b/lib/tolua++/src/bin/lua/doit.lua
diff --git a/tolua++-1.0.93/src/bin/lua/enumerate.lua b/lib/tolua++/src/bin/lua/enumerate.lua
index 99fe74629..99fe74629 100644
--- a/tolua++-1.0.93/src/bin/lua/enumerate.lua
+++ b/lib/tolua++/src/bin/lua/enumerate.lua
diff --git a/tolua++-1.0.93/src/bin/lua/feature.lua b/lib/tolua++/src/bin/lua/feature.lua
index 042b5d28e..042b5d28e 100644
--- a/tolua++-1.0.93/src/bin/lua/feature.lua
+++ b/lib/tolua++/src/bin/lua/feature.lua
diff --git a/tolua++-1.0.93/src/bin/lua/function.lua b/lib/tolua++/src/bin/lua/function.lua
index 2358e9ff7..2358e9ff7 100644
--- a/tolua++-1.0.93/src/bin/lua/function.lua
+++ b/lib/tolua++/src/bin/lua/function.lua
diff --git a/tolua++-1.0.93/src/bin/lua/module.lua b/lib/tolua++/src/bin/lua/module.lua
index 57dceb7d5..57dceb7d5 100644
--- a/tolua++-1.0.93/src/bin/lua/module.lua
+++ b/lib/tolua++/src/bin/lua/module.lua
diff --git a/tolua++-1.0.93/src/bin/lua/namespace.lua b/lib/tolua++/src/bin/lua/namespace.lua
index 6ca80e6e3..6ca80e6e3 100644
--- a/tolua++-1.0.93/src/bin/lua/namespace.lua
+++ b/lib/tolua++/src/bin/lua/namespace.lua
diff --git a/tolua++-1.0.93/src/bin/lua/operator.lua b/lib/tolua++/src/bin/lua/operator.lua
index 675027cd7..675027cd7 100644
--- a/tolua++-1.0.93/src/bin/lua/operator.lua
+++ b/lib/tolua++/src/bin/lua/operator.lua
diff --git a/tolua++-1.0.93/src/bin/lua/package.lua b/lib/tolua++/src/bin/lua/package.lua
index eec136904..eec136904 100644
--- a/tolua++-1.0.93/src/bin/lua/package.lua
+++ b/lib/tolua++/src/bin/lua/package.lua
diff --git a/tolua++-1.0.93/src/bin/lua/template_class.lua b/lib/tolua++/src/bin/lua/template_class.lua
index b1ed05abe..b1ed05abe 100644
--- a/tolua++-1.0.93/src/bin/lua/template_class.lua
+++ b/lib/tolua++/src/bin/lua/template_class.lua
diff --git a/tolua++-1.0.93/src/bin/lua/typedef.lua b/lib/tolua++/src/bin/lua/typedef.lua
index a78a84155..a78a84155 100644
--- a/tolua++-1.0.93/src/bin/lua/typedef.lua
+++ b/lib/tolua++/src/bin/lua/typedef.lua
diff --git a/tolua++-1.0.93/src/bin/lua/variable.lua b/lib/tolua++/src/bin/lua/variable.lua
index fbc705dd8..fbc705dd8 100644
--- a/tolua++-1.0.93/src/bin/lua/variable.lua
+++ b/lib/tolua++/src/bin/lua/variable.lua
diff --git a/tolua++-1.0.93/src/bin/lua/verbatim.lua b/lib/tolua++/src/bin/lua/verbatim.lua
index fd3b29b35..fd3b29b35 100644
--- a/tolua++-1.0.93/src/bin/lua/verbatim.lua
+++ b/lib/tolua++/src/bin/lua/verbatim.lua
diff --git a/lib/tolua++/src/bin/tolua.c b/lib/tolua++/src/bin/tolua.c
new file mode 100644
index 000000000..fd8e1ed1e
--- /dev/null
+++ b/lib/tolua++/src/bin/tolua.c
@@ -0,0 +1,169 @@
+/* tolua
+** Support code for Lua bindings.
+** Written by Waldemar Celes
+** TeCGraf/PUC-Rio
+** Aug 2003
+** $Id:$
+*/
+
+/* This code is free software; you can redistribute it and/or modify it.
+** The software provided hereunder is on an "as is" basis, and
+** the author has no obligation to provide maintenance, support, updates,
+** enhancements, or modifications.
+*/
+
+#include "../../include/tolua++.h"
+
+#include "../../../lua/src/lua.h"
+#include "../../../lua/src/lualib.h"
+#include "../../../lua/src/lauxlib.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+static void help (void)
+{
+ fprintf(stderr,"\n"
+ "usage: tolua++ [options] input_file\n"
+ "\n"
+ "Command line options are:\n"
+ " -v : print version information.\n"
+ " -o file : set output file; default is stdout.\n"
+ " -H file : create include file.\n"
+ " -n name : set package name; default is input file root name.\n"
+ " -p : parse only.\n"
+ " -P : parse and print structure information (for debug).\n"
+ " -S : disable support for c++ strings.\n"
+ " -1 : substract 1 to operator[] index (for compatibility with tolua5).\n"
+ " -L file : run lua file (with dofile()) before doing anything.\n"
+ " -D : disable automatic exporting of destructors for classes that have\n"
+ " constructors (for compatibility with tolua5)\n"
+ " -W : disable warnings for unsupported features (for compatibility\n"
+ " with tolua5)\n"
+ " -C : disable cleanup of included lua code (for easier debugging)\n"
+ " -E value[=value] : add extra values to the luastate\n"
+ " -t : export a list of types asociates with the C++ typeid name\n"
+ " -q : don't print warnings to the console\n"
+ " -h : print this message.\n"
+ "Should the input file be omitted, stdin is assumed;\n"
+ "in that case, the package name must be explicitly set.\n\n"
+ );
+}
+
+static void version (void)
+{
+ fprintf(stderr, "%s (written by W. Celes, A. Manzur)\n",TOLUA_VERSION);
+}
+
+static void setfield (lua_State* L, int table, char* f, char* v)
+{
+ lua_pushstring(L,f);
+ lua_pushstring(L,v);
+ lua_settable(L,table);
+}
+
+static void add_extra (lua_State* L, char* value) {
+ int len;
+ lua_getglobal(L, "_extra_parameters");
+ len = luaL_getn(L, -1);
+ lua_pushstring(L, value);
+ lua_rawseti(L, -2, len+1);
+ lua_pop(L, 1);
+};
+
+static void error (char* o)
+{
+ fprintf(stderr,"tolua: unknown option '%s'\n",o);
+ help();
+ exit(1);
+}
+
+int main (int argc, char* argv[])
+{
+ #ifdef LUA_VERSION_NUM /* lua 5.1 */
+ lua_State* L = luaL_newstate();
+ luaL_openlibs(L);
+ #else
+ lua_State* L = lua_open();
+ luaopen_base(L);
+ luaopen_io(L);
+ luaopen_string(L);
+ luaopen_table(L);
+ luaopen_math(L);
+ luaopen_debug(L);
+ #endif
+
+ lua_pushstring(L,TOLUA_VERSION); lua_setglobal(L,"TOLUA_VERSION");
+ lua_pushstring(L,LUA_VERSION); lua_setglobal(L,"TOLUA_LUA_VERSION");
+
+ if (argc==1)
+ {
+ help();
+ return 0;
+ }
+ else
+ {
+ int i, t;
+ lua_newtable(L);
+ lua_setglobal(L, "_extra_parameters");
+ lua_newtable(L);
+ lua_pushvalue(L,-1);
+ lua_setglobal(L,"flags");
+ t = lua_gettop(L);
+ for (i=1; i<argc; ++i)
+ {
+ if (*argv[i] == '-')
+ {
+ switch (argv[i][1])
+ {
+ case 'v': version(); return 0;
+ case 'h': help(); return 0;
+ case 'p': setfield(L,t,"p",""); break;
+ case 'P': setfield(L,t,"P",""); break;
+ case 'o': setfield(L,t,"o",argv[++i]); break;
+ case 'n': setfield(L,t,"n",argv[++i]); break;
+ case 'H': setfield(L,t,"H",argv[++i]); break;
+ case 'S': setfield(L,t,"S",""); break;
+ case '1': setfield(L,t,"1",""); break;
+ case 'L': setfield(L,t,"L",argv[++i]); break;
+ case 'D': setfield(L,t,"D",""); break;
+ case 'W': setfield(L,t,"W",""); break;
+ case 'C': setfield(L,t,"C",""); break;
+ case 'E': add_extra(L,argv[++i]); break;
+ case 't': setfield(L,t,"t",""); break;
+ case 'q': setfield(L,t,"q",""); break;
+ default: error(argv[i]); break;
+ }
+ }
+ else
+ {
+ setfield(L,t,"f",argv[i]);
+ break;
+ }
+ }
+ lua_pop(L,1);
+ }
+/* #define TOLUA_SCRIPT_RUN */
+#ifndef TOLUA_SCRIPT_RUN
+ {
+ int tolua_tolua_open (lua_State* L);
+ tolua_tolua_open(L);
+ }
+#else
+ {
+ char* p;
+ char path[BUFSIZ];
+ strcpy(path,argv[0]);
+ p = strrchr(path,'/');
+ if (p==NULL) p = strrchr(path,'\\');
+ p = (p==NULL) ? path : p+1;
+ sprintf(p,"%s","../src/bin/lua/");
+ lua_pushstring(L,path); lua_setglobal(L,"path");
+ strcat(path,"all.lua");
+ lua_dofile(L,path);
+ }
+#endif
+ return 0;
+}
diff --git a/tolua++-1.0.93/src/bin/tolua_scons.pkg b/lib/tolua++/src/bin/tolua_scons.pkg
index da458ea7c..da458ea7c 100644
--- a/tolua++-1.0.93/src/bin/tolua_scons.pkg
+++ b/lib/tolua++/src/bin/tolua_scons.pkg
diff --git a/tolua++-1.0.93/src/bin/toluabind.c b/lib/tolua++/src/bin/toluabind.c
index bf71cf158..bf71cf158 100644
--- a/tolua++-1.0.93/src/bin/toluabind.c
+++ b/lib/tolua++/src/bin/toluabind.c
diff --git a/tolua++-1.0.93/src/bin/toluabind.h b/lib/tolua++/src/bin/toluabind.h
index 7f1f018c9..7f1f018c9 100644
--- a/tolua++-1.0.93/src/bin/toluabind.h
+++ b/lib/tolua++/src/bin/toluabind.h
diff --git a/tolua++-1.0.93/src/bin/toluabind_default.c b/lib/tolua++/src/bin/toluabind_default.c
index b5db813bf..b5db813bf 100644
--- a/tolua++-1.0.93/src/bin/toluabind_default.c
+++ b/lib/tolua++/src/bin/toluabind_default.c
diff --git a/tolua++-1.0.93/src/bin/toluabind_default.h b/lib/tolua++/src/bin/toluabind_default.h
index c31a14875..c31a14875 100644
--- a/tolua++-1.0.93/src/bin/toluabind_default.h
+++ b/lib/tolua++/src/bin/toluabind_default.h