diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-01-06 12:59:08 +0000 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2013-01-06 12:59:08 +0000 |
commit | fb4defa5019dd62f802ee97d91841d92c798d399 (patch) | |
tree | 095e40b5146abe58b9da9361956978f2f4b1eef7 /Build/source/texk/web2c/lib | |
parent | ef3c2e4fe8fbfde3c1be55e647db7c99fe2f8238 (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/source/texk/web2c/lib')
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 42 |
1 files changed, 42 insertions, 0 deletions
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) |