diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-08-08 07:29:03 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-08-08 07:29:03 +0000 |
commit | 7c673255c363c3edabb7684db79429502460e9f4 (patch) | |
tree | 29ae109d82729b3d34d57e4ce0897e789eac6091 /Build/source/texk/web2c/luatexdir/tex/texfileio.w | |
parent | 6aa152677dca9820f240fa1edc74cc4649b43e34 (diff) |
luaTeX [WIN32]: Detect and skip Byte order marks (reduce W32TeX vs TL diffs)
git-svn-id: svn://tug.org/texlive/trunk@27342 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex/texfileio.w')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/texfileio.w | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/texfileio.w b/Build/source/texk/web2c/luatexdir/tex/texfileio.w index 7123bdfb557..201c78dea41 100644 --- a/Build/source/texk/web2c/luatexdir/tex/texfileio.w +++ b/Build/source/texk/web2c/luatexdir/tex/texfileio.w @@ -1270,6 +1270,10 @@ static FILE *pipes[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; +#ifdef WIN32 +FILE *Poptr; +#endif + boolean open_in_or_pipe(FILE ** f_ptr, char *fn, int filefmt, const_string fopen_mode, boolean must_exist) { @@ -1299,6 +1303,9 @@ boolean open_in_or_pipe(FILE ** f_ptr, char *fn, int filefmt, } if (*f_ptr) setvbuf(*f_ptr, (char *) NULL, _IOLBF, 0); +#ifdef WIN32 + Poptr = *f_ptr; +#endif return *f_ptr != NULL; } @@ -1360,8 +1367,12 @@ void close_file_or_pipe(FILE * f) for (i = 0; i <= 15; i++) { /* if this file was a pipe, |pclose()| it and return */ if (pipes[i] == f) { - if (f) + if (f) { pclose(f); +#ifdef WIN32 + Poptr = NULL; +#endif + } pipes[i] = NULL; return; } |