LPeg: Necessary changes for building in our environment and with our project. See lpeg-lunatic.patch.

git-svn-id: https://svn.eduke32.com/eduke32@6156 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-06-09 06:39:18 +00:00
parent 37c7be05ca
commit 75d25d0d15
10 changed files with 58 additions and 24 deletions

View file

@ -0,0 +1,19 @@
#ifndef elauxlib_h_
#define elauxlib_h_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef USE_LUAJIT_2_1
# include <luajit-2.1/lauxlib.h>
#else
# include <luajit-2.0/lauxlib.h>
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,19 @@
#ifndef elua_h_
#define elua_h_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef USE_LUAJIT_2_1
# include <luajit-2.1/lua.h>
#else
# include <luajit-2.0/lua.h>
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -3,20 +3,7 @@
#ifndef ENGINE_LUNATIC_H_
#define ENGINE_LUNATIC_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef USE_LUAJIT_2_1
# include <luajit-2.1/lua.h>
#else
# include <luajit-2.0/lua.h>
#endif
#ifdef __cplusplus
}
#endif
#include "elua.h"
typedef struct
{

View file

@ -0,0 +1,6 @@
$(LPEG_OBJ)/lpcap.$o: $(addprefix $(LPEG_SRC)/,lpcap.c lpcap.h lptypes.h)
$(LPEG_OBJ)/lpcode.$o: $(addprefix $(LPEG_SRC)/,lpcode.c lptypes.h lpcode.h lptree.h lpvm.h lpcap.h)
$(LPEG_OBJ)/lpprint.$o: $(addprefix $(LPEG_SRC)/,lpprint.c lptypes.h lpprint.h lptree.h lpvm.h lpcap.h)
$(LPEG_OBJ)/lptree.$o: $(addprefix $(LPEG_SRC)/,lptree.c lptypes.h lpcap.h lpcode.h lptree.h lpvm.h lpprint.h)
$(LPEG_OBJ)/lpvm.$o: $(addprefix $(LPEG_SRC)/,lpvm.c lpcap.h lptypes.h lpvm.h lpprint.h lptree.h)

View file

@ -3,8 +3,8 @@
** Copyright 2007, Lua.org & PUC-Rio (see 'lpeg.html' for license)
*/
#include "lua.h"
#include "lauxlib.h"
#include "elua.h"
#include "elauxlib.h"
#include "lpcap.h"
#include "lptypes.h"

View file

@ -6,8 +6,8 @@
#include <limits.h>
#include "lua.h"
#include "lauxlib.h"
#include "elua.h"
#include "elauxlib.h"
#include "lptypes.h"
#include "lpcode.h"

View file

@ -5,7 +5,7 @@
#if !defined(lpcode_h)
#define lpcode_h
#include "lua.h"
#include "elua.h"
#include "lptypes.h"
#include "lptree.h"

View file

@ -8,8 +8,8 @@
#include <string.h>
#include "lua.h"
#include "lauxlib.h"
#include "elua.h"
#include "elauxlib.h"
#include "lptypes.h"
#include "lpcap.h"
@ -1288,6 +1288,9 @@ static struct luaL_Reg metareg[] = {
};
#ifdef __cplusplus
extern "C"
#endif
int luaopen_lpeg (lua_State *L);
int luaopen_lpeg (lua_State *L) {
luaL_newmetatable(L, PATTERN_T);

View file

@ -16,7 +16,7 @@
#include <assert.h>
#include <limits.h>
#include "lua.h"
#include "elua.h"
#define VERSION "1.0.1"

View file

@ -7,8 +7,8 @@
#include <string.h>
#include "lua.h"
#include "lauxlib.h"
#include "elua.h"
#include "elauxlib.h"
#include "lpcap.h"
#include "lptypes.h"