summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-01-06 12:59:08 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2013-01-06 12:59:08 +0000
commitfb4defa5019dd62f802ee97d91841d92c798d399 (patch)
tree095e40b5146abe58b9da9361956978f2f4b1eef7 /Build
parentef3c2e4fe8fbfde3c1be55e647db7c99fe2f8238 (diff)
Some missed XeTeX changes and misc. fixes
git-svn-id: svn://tug.org/texlive/trunk@28745 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/ChangeLog4
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c42
-rw-r--r--Build/source/texk/web2c/texmfmp.h5
-rw-r--r--Build/source/texk/web2c/web2c/coerce.h1
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp4
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeX_ext.c13
-rw-r--r--Build/source/texk/web2c/xetexdir/xetex.web2
7 files changed, 65 insertions, 6 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index ea94e0a7d05..d36861279bc 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,7 @@
+2013-01-06 Khaled Hosny <khaledhosny@eglug.org>
+
+ * lib/texmfmp.c, texmfmp.h [XeTeX]: Support input pipes.
+
2013-01-05 Peter Breitenlohner <peb@mppmu.mpg.de>
* configure.ac: Check for hstrerror() needed by luaTeX.
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index b821dcdc5cb..e4779a6f08c 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -1927,6 +1927,48 @@ open_in_or_pipe (FILE **f_ptr, int filefmt, const_string fopen_mode)
return open_input(f_ptr,filefmt,fopen_mode) ;
}
+#ifdef XeTeX
+boolean
+u_open_in_or_pipe(unicodefile* f, integer filefmt, const_string fopen_mode, integer mode, integer encodingData)
+{
+ string fname = NULL;
+ int i; /* iterator */
+
+ /* opening a read pipe is straightforward, only have to
+ skip past the pipe symbol in the file name. filename
+ quoting is assumed to happen elsewhere (it does :-)) */
+
+ if (shellenabledp && *(nameoffile+1) == '|') {
+ /* the user requested a pipe */
+ *f = malloc(sizeof(UFILE));
+ (*f)->encodingMode = (mode == AUTO) ? UTF8 : mode;
+ (*f)->conversionData = 0;
+ (*f)->savedChar = -1;
+ (*f)->skipNextLF = 0;
+ (*f)->f = NULL;
+ fname = xmalloc(strlen((const_string)(nameoffile+1))+1);
+ strcpy(fname,(const_string)(nameoffile+1));
+ recorder_record_input (fname + 1);
+ (*f)->f = runpopen(fname+1,"r");
+ free(fname);
+ for (i=0; i<NUM_PIPES; i++) {
+ if (pipes[i]==NULL) {
+ pipes[i] = (*f)->f;
+ break;
+ }
+ }
+ if ((*f)->f)
+ setvbuf ((*f)->f,NULL,_IONBF,0);
+#ifdef WIN32
+ Poptr = (*f)->f;
+#endif
+
+ return (*f)->f != NULL;
+ }
+
+ return u_open_in(f, filefmt, fopen_mode, mode, encodingData);
+}
+#endif
boolean
open_out_or_pipe (FILE **f_ptr, const_string fopen_mode)
diff --git a/Build/source/texk/web2c/texmfmp.h b/Build/source/texk/web2c/texmfmp.h
index 758c6bdf1f4..a62ddcdb492 100644
--- a/Build/source/texk/web2c/texmfmp.h
+++ b/Build/source/texk/web2c/texmfmp.h
@@ -242,8 +242,13 @@ extern void topenin (void);
#endif
#ifdef XeTeX
+#if ENABLE_PIPES
+extern boolean u_open_in_or_pipe(unicodefile* f, integer filefmt, const_string fopen_mode, integer mode, integer encodingData);
+#define uopenin(f,p,m,d) u_open_in_or_pipe(&(f), p, FOPEN_RBIN_MODE, m, d)
+#else
#define uopenin(f,p,m,d) u_open_in(&(f), p, FOPEN_RBIN_MODE, m, d)
#endif
+#endif
/* Used in tex.ch (section 1338) to get a core dump in debugging mode. */
#ifdef unix
diff --git a/Build/source/texk/web2c/web2c/coerce.h b/Build/source/texk/web2c/web2c/coerce.h
index 6b36130ad21..b01ef39cabc 100644
--- a/Build/source/texk/web2c/web2c/coerce.h
+++ b/Build/source/texk/web2c/web2c/coerce.h
@@ -53,6 +53,7 @@ extern void remembersourceinfo (strnumber, int);
#ifdef XeTeX
#include <xetexdir/xetex.h>
+extern voidpointer getotassemblyptr(int f, int g, int horiz);
#endif /* XeTeX */
#ifdef __SyncTeX__
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp b/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp
index 082025232c3..dd0509c29a4 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp
+++ b/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp
@@ -983,7 +983,7 @@ findNextGraphiteBreak(void)
bool usingGraphite(XeTeXLayoutEngine engine)
{
- if (strcmp("graphite2", engine->shaper) == 0)
+ if (engine->shaper != NULL && (strcmp("graphite2", engine->shaper) == 0))
return true;
else
return false;
@@ -991,7 +991,7 @@ bool usingGraphite(XeTeXLayoutEngine engine)
bool usingOpenType(XeTeXLayoutEngine engine)
{
- if (strcmp("ot", engine->shaper) == 0)
+ if (engine->shaper == NULL || (strcmp("ot", engine->shaper) == 0))
return true;
else
return false;
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
index baf8ff5e3c1..df7b1d19b13 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
+++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
@@ -146,10 +146,15 @@ void initversionstring(char **versions)
int fc_version = FcGetVersion();
#endif
FT_Int ftMajor, ftMinor, ftPatch;
- int grMajor, grMinor, grBugfix;
+ int grMajor, grMinor, grBugfix;
+ UVersionInfo icuVersion;
+ char icu_version[U_MAX_VERSION_STRING_LENGTH] = "";
+
+ u_getVersion(icuVersion);
+ u_versionToString(icuVersion, icu_version);
const_string fmt =
- "Compiled with ICU version %s\n"
+ "Compiled with ICU version %s; using %s\n"
"Compiled with zlib version %s; using %s\n"
"Compiled with FreeType2 version %d.%d.%d; using %d.%d.%d\n"
"Compiled with Graphite2 version %d.%d.%d; using %d.%d.%d\n"
@@ -165,6 +170,7 @@ void initversionstring(char **versions)
int len = strlen(fmt)
+ strlen(U_ICU_VERSION)
+ + strlen(icu_version)
+ strlen(ZLIB_VERSION)
+ strlen(zlib_version)
+ strlen(HB_VERSION_STRING)
@@ -187,10 +193,11 @@ void initversionstring(char **versions)
exit(9);
}
FT_Library_Version(gFreeTypeLibrary, &ftMajor, &ftMinor, &ftPatch);
+
gr_engine_version(&grMajor, &grMinor, &grBugfix);
(void)sprintf(*versions, fmt,
- U_ICU_VERSION,
+ U_ICU_VERSION, icu_version,
ZLIB_VERSION, zlib_version,
FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH,
ftMajor, ftMinor, ftPatch,
diff --git a/Build/source/texk/web2c/xetexdir/xetex.web b/Build/source/texk/web2c/xetexdir/xetex.web
index 50554cd5a5b..d368c3e4596 100644
--- a/Build/source/texk/web2c/xetexdir/xetex.web
+++ b/Build/source/texk/web2c/xetexdir/xetex.web
@@ -12058,7 +12058,7 @@ the font.
@d is_native_font(#)==(is_atsu_font(#) or is_otgr_font(#))
{native fonts have |font_area| = 65534 or 65535,
which would be a string containing an invalid Unicode character}
-@d is_new_mathfont(#)==(is_ot_font(#) and (isOpenTypeMathFont(font_layout_engine[#])))
+@d is_new_mathfont(#)==((font_area[#]=otgr_font_flag) and (isOpenTypeMathFont(font_layout_engine[#])))
@d non_char==qi(too_big_char) {a |halfword| code that can't match a real character}
@d non_address=0 {a spurious |bchar_label|}