summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/context/stubs/source/mtxrun_dll.c112
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4114 -> 4117 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/status-files.pdfbin24810 -> 24803 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin233044 -> 233044 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
7 files changed, 56 insertions, 62 deletions
diff --git a/scripts/context/stubs/source/mtxrun_dll.c b/scripts/context/stubs/source/mtxrun_dll.c
index 3e75cc9ab..356647ef0 100644
--- a/scripts/context/stubs/source/mtxrun_dll.c
+++ b/scripts/context/stubs/source/mtxrun_dll.c
@@ -69,7 +69,7 @@ int main( int argc, char *argv[] )
__declspec(dllexport) int dllrunscript( int argc, char *argv[] )
#endif
{
- char *s, *luatexfname, *argstr, **lua_argv;
+ char *binary, *s, *luatexfname, *argstr, **lua_argv;
int k, quoted, lua_argc;
int passprogname = 0;
unsigned char is_jit=0;
@@ -94,12 +94,12 @@ __declspec(dllexport) int dllrunscript( int argc, char *argv[] )
if ( s = strrchr(s, '.') ) *s = '\0'; // remove file extension part
/* check "jit" : strlen("jit") = 3 */
- if (strncmp(s + strlen(s) - 3, "jit", 3) == 0) {
- is_jit = 1;
- *(s+strlen(s)-2) = "\0" ;
- } else {
- is_jit = 0;
+ if (strncmp(progname + strlen(progname) - 3, "jit", 3) == 0) {
+ is_jit = 1;
+ progname[strlen(progname) - 3]='\0';
}
+ else
+ is_jit = 0;
// script path
@@ -122,63 +122,62 @@ __declspec(dllexport) int dllrunscript( int argc, char *argv[] )
strcat( scriptpath, "mtxrun.lua" );
passprogname = 1;
}
-
if ( GetFileAttributes(scriptpath) == INVALID_FILE_ATTRIBUTES )
DIE( "file not found: %s\n", scriptpath );
- // find texlua.exe
-
-
- local binary = ""
-
- if ( SearchPath(
- getenv( "PATH" ), // path to search (optional)
- (is_jit ? "luajittex.exe":"luatex.exe"), // file name to search
- NULL, // file extension to add (optional)
- MAX_PATH, // output buffer size
- luatexpath, // output buffer pointer
- &luatexfname ) // pointer to a file part in the output buffer (optional)
- ) {
- binary = is_jit ? "luajittex.exe":"luatex.exe"
- } else if ( SearchPath(
- dirpath, // path to search (optional)
- (is_jit ? "luajittex.exe":"luatex.exe"), // file name to search
- NULL, // file extension to add (optional)
- MAX_PATH, // output buffer size
- luatexpath, // output buffer pointer
- &luatexfname ) // pointer to a file part in the output buffer (optional)
- ) {
- binary = is_jit ? "luajittex.exe":"luatex.exe"
- } else if ( SearchPath(
- getenv( "PATH" ), // path to search (optional)
- (is_jit ? "texluajitexe":"texlua.exe"), // file name to search
- NULL, // file extension to add (optional)
- MAX_PATH, // output buffer size
- luatexpath, // output buffer pointer
- &luatexfname ) // pointer to a file part in the output buffer (optional)
- ) {
- binary= is_jit ? "texluajit.exe":"texlua.exe"
- } else if ( SearchPath(
- dirpath, // path to search (optional)
- (is_jit ? "texluajit.exe":"texlua.exe"), // file name to search
- NULL, // file extension to add (optional)
- MAX_PATH, // output buffer size
- luatexpath, // output buffer pointer
- &luatexfname ) // pointer to a file part in the output buffer (optional)
- ) {
- binary = is_jit ? "texluajit.exe":"texlua.exe"
- } else {
- DIE( "unable to locate texlua.exe on the search path" );
- }
-
+ // find luatex.exe /luajittex.exe
+
+ if ( SearchPath(
+ getenv( "PATH" ), // path to search (optional)
+ (is_jit ? "luajittex.exe":"luatex.exe"), // file name to search
+ NULL, // file extension to add (optional)
+ MAX_PATH, // output buffer size
+ luatexpath, // output buffer pointer
+ &luatexfname ) // pointer to a file part in the output buffer (optional)
+ ) {
+ binary = (is_jit ? "luajittex.exe":"luatex.exe");
+ }else if ( SearchPath(
+ dirpath, // path to search (optional)
+ (is_jit ? "luajittex.exe":"luatex.exe"), // file name to search
+ NULL, // file extension to add (optional)
+ MAX_PATH, // output buffer size
+ luatexpath, // output buffer pointer
+ &luatexfname ) // pointer to a file part in the output buffer (optional)
+ ) {
+ binary = (is_jit ? "luajittex.exe":"luatex.exe");
+ }else if ( SearchPath(
+ getenv( "PATH" ), // path to search (optional)
+ (is_jit ? "texluajit.exe":"texlua.exe"), // file name to search
+ NULL, // file extension to add (optional)
+ MAX_PATH, // output buffer size
+ luatexpath, // output buffer pointer
+ &luatexfname ) // pointer to a file part in the output buffer (optional)
+ ) {
+ binary = (is_jit ? "texluajit.exe":"texlua.exe");
+ }else if ( SearchPath(
+ dirpath, // path to search (optional)
+ (is_jit ? "luajittex.exe":"luatex.exe"), // file name to search
+ NULL, // file extension to add (optional)
+ MAX_PATH, // output buffer size
+ luatexpath, // output buffer pointer
+ &luatexfname ) // pointer to a file part in the output buffer (optional)
+ ) {
+ binary = (is_jit ? "texluajit.exe":"texlua.exe");
+ }else {
+ DIE( "unable to locate texlua.exe on the search path" );
+ }
// link directly with luatex.dll if available in texlua's dir
- strcpy( luatexfname, "luatex.dll" );
+ strcpy( luatexfname, (is_jit ? "luajittex.dll":"luatex.dll") );
if ( dllluatex = LoadLibrary(luatexpath) )
{
mainlikeproc dllluatexmain = (mainlikeproc) GetProcAddress( dllluatex, "dllluatexmain" );
if ( dllluatexmain == NULL )
- DIE( "unable to locate dllluatexmain procedure in luatex.dll" );
+ if (is_jit)
+ DIE( "unable to locate dllluatexmain procedure in luajittex.dll" )
+ else
+ DIE( "unable to locate dllluatexmain procedure in luatex.dll" );
+
// set up argument list for texlua script
@@ -201,7 +200,6 @@ __declspec(dllexport) int dllrunscript( int argc, char *argv[] )
if (lua_argv) free( lua_argv );
return k;
}
-
// we are still here, so no luatex.dll; spawn texlua.exe instead
strcpy( luatexfname,binary);
@@ -215,7 +213,6 @@ __declspec(dllexport) int dllrunscript( int argc, char *argv[] )
strcat( cmdline, " --script " );
strcat( cmdline, progname );
}
-
argstr = GetCommandLine(); // get the command line of this process
if ( argstr == NULL ) DIE( "unable to retrieve the command line string\n" );
@@ -244,7 +241,6 @@ __declspec(dllexport) int dllrunscript( int argc, char *argv[] )
si.hStdOutput = GetStdHandle( STD_OUTPUT_HANDLE );
si.hStdError = GetStdHandle( STD_ERROR_HANDLE );
ZeroMemory( &pi, sizeof(pi) );
-
if( !CreateProcess(
NULL, // module name (uses command line if NULL)
cmdline, // command line
@@ -257,7 +253,6 @@ __declspec(dllexport) int dllrunscript( int argc, char *argv[] )
&si, // STARTUPINFO structure
&pi ) // PROCESS_INFORMATION structure
) DIE( "command execution failed: %s\n", cmdline );
-
DWORD ret = 0;
CloseHandle( pi.hThread ); // thread handle is not needed
if ( WaitForSingleObject( pi.hProcess, INFINITE ) == WAIT_OBJECT_0 ) {
@@ -267,7 +262,6 @@ __declspec(dllexport) int dllrunscript( int argc, char *argv[] )
CloseHandle( pi.hProcess );
// propagate exit code from the child process
-
return ret;
}
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 94aad6d4f..3283420b4 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2014.01.21 21:25}
+\newcontextversion{2014.01.22 01:31}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index acbb535a2..f878538da 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index e06b9d358..0c7810893 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -28,7 +28,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2014.01.21 21:25}
+\edef\contextversion{2014.01.22 01:31}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index e6a969988..c983dc6e0 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 6ddf05dac..f5bbad6c0 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 6fc688722..cfa3937a2 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 01/21/14 21:25:09
+-- merge date : 01/22/14 01:31:43
do -- begin closure to overcome local limits and interference