summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util/lua/src/lundump.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-14 13:01:55 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-14 13:01:55 +0000
commit926c8ad88a5cce707fe1025f3551aa1c03318b32 (patch)
tree9d0c7d3102578adca5ab7381e3b1296f218270f8 /crawl-ref/source/util/lua/src/lundump.h
parent72560e17acd9fd40a9dcc969c14f3b1fd60fe96c (diff)
downloadcrawl-ref-926c8ad88a5cce707fe1025f3551aa1c03318b32.tar.gz
crawl-ref-926c8ad88a5cce707fe1025f3551aa1c03318b32.zip
Included Lua 5.1.2 source tree in crawl-ref/source/util. This is so we can use
Lua in core Crawl code without making Crawl harder to build (than it is already). Crawl's makefiles will call the Lua makefile if necessary (i.e., if liblua.a doesn't already exist). CLUA_BINDINGS is still not enabled by default (and will not be enabled by default in the source tree). Crawl will use two different Lua interpreter instances - one for user scripts (if CLUA_BINDINGS is defined), the other (not #ifdef conditionalised) for core game Lua glue. Lua is statically linked by default. We could change this if necessary, although the added size is only 200k. The Lua sources are almost unmodified; I've only added new targets for Crawl's platform-specific makefiles to call into to build liblua.a; I've not modified any existing targets, and all Lua READMEs and copyright notices are intact. Needs integration with Xcode build. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1305 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/util/lua/src/lundump.h')
-rw-r--r--crawl-ref/source/util/lua/src/lundump.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/crawl-ref/source/util/lua/src/lundump.h b/crawl-ref/source/util/lua/src/lundump.h
new file mode 100644
index 0000000000..58cca5d190
--- /dev/null
+++ b/crawl-ref/source/util/lua/src/lundump.h
@@ -0,0 +1,36 @@
+/*
+** $Id: lundump.h,v 1.40 2005/11/11 14:03:13 lhf Exp $
+** load precompiled Lua chunks
+** See Copyright Notice in lua.h
+*/
+
+#ifndef lundump_h
+#define lundump_h
+
+#include "lobject.h"
+#include "lzio.h"
+
+/* load one chunk; from lundump.c */
+LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name);
+
+/* make header; from lundump.c */
+LUAI_FUNC void luaU_header (char* h);
+
+/* dump one chunk; from ldump.c */
+LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
+
+#ifdef luac_c
+/* print one chunk; from print.c */
+LUAI_FUNC void luaU_print (const Proto* f, int full);
+#endif
+
+/* for header of binary files -- this is Lua 5.1 */
+#define LUAC_VERSION 0x51
+
+/* for header of binary files -- this is the official format */
+#define LUAC_FORMAT 0
+
+/* size of header of binary files */
+#define LUAC_HEADERSIZE 12
+
+#endif