summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/lua/lkpselib.c
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/luatexdir/lua/lkpselib.c
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/luatexdir/lua/lkpselib.c')
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lkpselib.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/lkpselib.c b/Build/source/texk/web2c/luatexdir/lua/lkpselib.c
index c29dbd8586f..d53c50426e4 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lkpselib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lkpselib.c
@@ -17,8 +17,19 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
+#ifdef MF_LUA
+#define EXTERN extern
+#if defined(JIT)
+#include "mfluajitd.h"
+#else
+#include "mfluad.h"
+#endif
+#include <kpathsea/version.h>
+#define xfree(p) do { if (p != NULL) free(p); p = NULL; } while (0)
+#else
#include "ptexlib.h"
#include "lua/luatex-api.h"
+#endif
#include <kpathsea/expand.h>
#include <kpathsea/variable.h>
#include <kpathsea/tex-glyph.h>
@@ -151,11 +162,19 @@ static const char *const filetypenames[] = {
};
+#ifdef MF
+#define KPATHSEA_METATABLE "mflua.kpathsea"
+#else
#define KPATHSEA_METATABLE "luatex.kpathsea"
+#endif
/* set to 1 by the |program_name| function */
+#ifdef MF
+int program_name_set = 1;
+#else
int program_name_set = 0;
+#endif
#define TEST_PROGRAM_NAME_SET do { \
if (! program_name_set) { \