From 2bc219951a857706b1b0f9806d1f14728766fcba Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Tue, 4 Feb 2014 07:48:55 +0000 Subject: Change a little for luajittex git-svn-id: svn://tug.org/texlive/trunk@32869 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/luatexdir/ChangeLog | 4 ++++ Build/source/texk/web2c/luatexdir/lua/luainit.w | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'Build/source/texk') diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index 9b03742576d..185686e9878 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,7 @@ +2014-02-04 Akira Kakuto + + * lua/luainit.w: Change a little for LuaJITTeX. + 2014-02-01 Peter Breitenlohner Import LuaTeX snapshot 0.78.3 from LuaTeX repository (r4772). diff --git a/Build/source/texk/web2c/luatexdir/lua/luainit.w b/Build/source/texk/web2c/luatexdir/lua/luainit.w index 60ec5cc5672..a65ae045f14 100644 --- a/Build/source/texk/web2c/luatexdir/lua/luainit.w +++ b/Build/source/texk/web2c/luatexdir/lua/luainit.w @@ -90,7 +90,11 @@ const_string LUATEX_IHELP[] = { " --fmt=FORMAT load the format file FORMAT", " --halt-on-error stop processing at the first error", " --help display help and exit", +#ifdef LuajitTeX + " --ini be iniluajittex, for dumping formats", +#else " --ini be iniluatex, for dumping formats", +#endif " --interaction=STRING set interaction mode (STRING=batchmode/nonstopmode/scrollmode/errorstopmode)", " --jobname=STRING set the job name to STRING", " --kpathsea-debug=NUMBER set path searching debugging flags according to the bits of NUMBER", @@ -259,8 +263,13 @@ static void parse_options(int ac, char **av) int option_index; char *firstfile = NULL; opterr = 0; /* dont whine */ +#ifdef LuajitTeX + if ((strstr(argv[0], "luajittexlua") != NULL) || + (strstr(argv[0], "texluajit") != NULL)) { +#else if ((strstr(argv[0], "luatexlua") != NULL) || (strstr(argv[0], "texlua") != NULL)) { +#endif lua_only = 1; luainit = 1; } @@ -811,7 +820,11 @@ void lua_initialize(int ac, char **av) static char LC_CTYPE_C[] = "LC_CTYPE=C"; static char LC_COLLATE_C[] = "LC_COLLATE=C"; static char LC_NUMERIC_C[] = "LC_NUMERIC=C"; +#ifdef LuajitTeX + static char engine_luatex[] = "engine=luajittex"; +#else static char engine_luatex[] = "engine=luatex"; +#endif /* Save to pass along to topenin. */ argc = ac; argv = av; @@ -849,7 +862,9 @@ void lua_initialize(int ac, char **av) if (FILESTRCASEEQ(kpse_invocation_name, "texluajitc")) exit(luac_main(ac, av)); if (STREQ(argv[1], "--luaconly") || STREQ(argv[1], "--luac")) { - strcpy(av[1], "luajittex"); + char *argv1 = xmalloc (strlen ("luajittex") + 1); + av[1] = argv1; + strcpy (av[1], "luajittex"); exit(luac_main(--ac, ++av)); } #else -- cgit v1.2.3