summaryrefslogtreecommitdiff
path: root/Build/source/utils
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-07-09 13:12:19 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-07-09 13:12:19 +0000
commitf361c6b9b9c1dc533d216c0358a36e5107cce0e3 (patch)
treee94ffdde1ed31644931790d5c37c229578398e69 /Build/source/utils
parent8fa655529b92163f465eefb95505adcf284b8254 (diff)
ps2eps: Use binary mode for output files (from W32TeX)
git-svn-id: svn://tug.org/texlive/trunk@26975 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils')
-rw-r--r--Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/ChangeLog5
-rw-r--r--Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-05-write-bin13
-rw-r--r--Build/source/utils/ps2eps/ps2eps-1.68/src/C/bbox.c3
3 files changed, 21 insertions, 0 deletions
diff --git a/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/ChangeLog b/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/ChangeLog
index 6023ae4f0be..1136351f397 100644
--- a/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/ChangeLog
+++ b/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-05-write-bin (new): Use binary mode for output files.
+ From Akira Kakuto <kakuto@fuk.kindai.ac.jp> (W32TeX).
+
2011-01-09 Peter Breitenlohner <peb@mppmu.mpg.de>
Renamed bin/ps2eps => bin/ps2eps.pl.
diff --git a/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-05-write-bin b/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-05-write-bin
new file mode 100644
index 00000000000..d16ce672e4f
--- /dev/null
+++ b/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-05-write-bin
@@ -0,0 +1,13 @@
+diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
+--- ps2eps-1.68.orig/src/C/bbox.c 2010-12-16 15:20:53.000000000 +0100
++++ ps2eps-1.68/src/C/bbox.c 2012-06-16 18:21:11.000000000 +0200
+@@ -211,6 +211,9 @@
+ i= _setmode( _fileno(stdin), _O_BINARY);
+ if (i == -1)
+ fprintf(stderr,"%s: ERROR - Cannot set binary mode for STDIN\n", prgname);
++ i= _setmode( _fileno(stdout), _O_BINARY);
++ if (i == -1)
++ fprintf(stderr,"%s: ERROR - Cannot set binary mode for STDOUT\n", prgname);
+ #endif
+ for (y= 0; y<height; y++) /* for every image row 0..height-1 */
+ {
diff --git a/Build/source/utils/ps2eps/ps2eps-1.68/src/C/bbox.c b/Build/source/utils/ps2eps/ps2eps-1.68/src/C/bbox.c
index 81454187e22..fcaf1f67ff6 100644
--- a/Build/source/utils/ps2eps/ps2eps-1.68/src/C/bbox.c
+++ b/Build/source/utils/ps2eps/ps2eps-1.68/src/C/bbox.c
@@ -211,6 +211,9 @@ void readppm_and_calcbb(const char *name,
i= _setmode( _fileno(stdin), _O_BINARY);
if (i == -1)
fprintf(stderr,"%s: ERROR - Cannot set binary mode for STDIN\n", prgname);
+ i= _setmode( _fileno(stdout), _O_BINARY);
+ if (i == -1)
+ fprintf(stderr,"%s: ERROR - Cannot set binary mode for STDOUT\n", prgname);
#endif
for (y= 0; y<height; y++) /* for every image row 0..height-1 */
{