diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2012-08-10 05:28:58 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2012-08-10 05:28:58 +0000 |
commit | 7752da13b2169a08137039744472ebb2ff56e8d9 (patch) | |
tree | c54f6280ca63e2f2e804a966f470b0092b0fd88e | |
parent | d29af47602b51ae919620709a8c6bc5abaf346b9 (diff) |
use rewind(f) instead of fseek(f,0,SEEK_SET)
git-svn-id: svn://tug.org/texlive/trunk@27359 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/web2c/xetexdir/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeX_ext.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog index ef95fb7c230..d8deac55812 100644 --- a/Build/source/texk/web2c/xetexdir/ChangeLog +++ b/Build/source/texk/web2c/xetexdir/ChangeLog @@ -1,5 +1,10 @@ 2012-08-09 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + * XeTeX_ext.c: use rewind(f) instead of fseek(f, 0, SEEK_SET) + in u_open_in() in order to work also on W32. + +2012-08-09 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + * XeTeXFontMgr.cpp: Add 'extern "C" {' to avoid link error in MSVC. * XeTeX_ext.c: Change order of inlusion of headers to be able to compile by using MSVC. diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c index f0d0023222a..c6b1e420583 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c +++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c @@ -2946,11 +2946,11 @@ u_open_in(unicodefile* f, integer filefmt, const_string fopen_mode, integer mode mode = UTF16LE; else if (B1 == 0 && B2 != 0) { mode = UTF16BE; - fseek((*f)->f, SEEK_SET, 0); + rewind((*f)->f); } else if (B2 == 0 && B1 != 0) { mode = UTF16LE; - fseek((*f)->f, SEEK_SET, 0); + rewind((*f)->f); } else if (B1 == 0xef && B2 == 0xbb) { int B3 = getc((*f)->f); @@ -2958,7 +2958,7 @@ u_open_in(unicodefile* f, integer filefmt, const_string fopen_mode, integer mode mode = UTF8; } if (mode == AUTO) { - fseek((*f)->f, SEEK_SET, 0); + rewind((*f)->f); mode = UTF8; } } |