summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mfluadir
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-07-03 11:44:36 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-07-03 11:44:36 +0000
commit0387fcbab1b308d7304f2b05939d9f87f8f3fbc9 (patch)
tree6a4d6592684eb8d2bf7d2068665d5087d4c6614d /Build/source/texk/web2c/mfluadir
parent427855f6f99e9044c3496248c1f47f8a28ac10fc (diff)
MFLua(JIT): Use lkpselib.c (from Akira)
git-svn-id: svn://tug.org/texlive/trunk@37743 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/mfluadir')
-rw-r--r--Build/source/texk/web2c/mfluadir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/mfluadir/am/mflua.am4
-rw-r--r--Build/source/texk/web2c/mfluadir/mfluac.c1
-rw-r--r--Build/source/texk/web2c/mfluadir/mfluac.h8
4 files changed, 15 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/mfluadir/ChangeLog b/Build/source/texk/web2c/mfluadir/ChangeLog
index 61fc5d1c586..07000a7f866 100644
--- a/Build/source/texk/web2c/mfluadir/ChangeLog
+++ b/Build/source/texk/web2c/mfluadir/ChangeLog
@@ -1,5 +1,9 @@
2015-07-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+ * am/mflua.am, mfluac.[ch]: Use lkpselib.c.
+
+2015-07-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
* am/mflua.am: Always create mflua-nowin, either as extra
program or as symlink.
diff --git a/Build/source/texk/web2c/mfluadir/am/mflua.am b/Build/source/texk/web2c/mfluadir/am/mflua.am
index 8b4546ae716..a241ec13ee0 100644
--- a/Build/source/texk/web2c/mfluadir/am/mflua.am
+++ b/Build/source/texk/web2c/mfluadir/am/mflua.am
@@ -61,9 +61,9 @@ EXTRA_LIBRARIES += libmflua.a
# MFLua C sources
mflua_c_h = mfluaini.c mflua0.c mfluacoerce.h mfluad.h
-dist_libmflua_a_SOURCES = mfluadir/mfluac.c mfluadir/mfluac.h
+dist_libmflua_a_SOURCES = luatexdir/lua/lkpselib.c mfluadir/mfluac.c mfluadir/mfluac.h
nodist_libmflua_a_SOURCES = $(mflua_c_h) mflua-pool.c
-libmflua_a_CPPFLAGS = $(AM_CPPFLAGS) $(LUA_INCLUDES)
+libmflua_a_CPPFLAGS = $(AM_CPPFLAGS) $(LUA_INCLUDES) -DMF_LUA
# We must create mfluad.h before building the libmflua_a_OBJECTS.
$(libmflua_a_OBJECTS): mfluad.h
diff --git a/Build/source/texk/web2c/mfluadir/mfluac.c b/Build/source/texk/web2c/mfluadir/mfluac.c
index 044bd05633e..0495be820de 100644
--- a/Build/source/texk/web2c/mfluadir/mfluac.c
+++ b/Build/source/texk/web2c/mfluadir/mfluac.c
@@ -549,6 +549,7 @@ int mfluainitialize(void)
char* file = kpse_find_file("mfluaini.lua", kpse_lua_format, 0);
int res ;
/* register lua functions */
+ luaopen_kpse(L);
lua_pushcfunction(L, priv_mfweb_link);lua_setglobal(L, "link");
lua_pushcfunction(L, priv_mfweb_info);lua_setglobal(L, "info");
lua_pushcfunction(L, priv_mfweb_x_coord);lua_setglobal(L, "x_coord");
diff --git a/Build/source/texk/web2c/mfluadir/mfluac.h b/Build/source/texk/web2c/mfluadir/mfluac.h
index 4f870a46d78..80e2e7a0235 100644
--- a/Build/source/texk/web2c/mfluadir/mfluac.h
+++ b/Build/source/texk/web2c/mfluadir/mfluac.h
@@ -1,3 +1,6 @@
+#ifndef MFLUAC_H
+#define MFLUAC_H
+
extern int mfluabeginprogram(void);
extern int mfluaPREstartofMF(void);
extern int mfluaPREmaincontrol(void);
@@ -36,3 +39,8 @@ extern int mfluaprinttransitionlineto(integer, integer);
extern int mfluaPREmakeellipse(integer, integer, integer, integer, integer, integer);
extern int mfluaPOSTmakeellipse(integer, integer, integer, integer, integer, integer);
+
+#include <lauxlib.h>
+extern int luaopen_kpse(lua_State * L);
+
+#endif /* MFLUAC_H */