summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2010-09-20 07:52:27 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2010-09-20 07:52:27 +0000
commita7aa502fa7a5cef9e7951bd46d19756ab9ce4ce7 (patch)
tree4416f18e0fdc9eda65c89beb1f33918a4bfeb8df /Build
parentdfad25fca67865a157c13de8ecdb7495e82ae287 (diff)
special.c: fix WIN32 bug that dvipng.exe waits infinitely for some kind of eps files.
git-svn-id: svn://tug.org/texlive/trunk@19826 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipng/dvipng-1.13/ChangeLog4
-rw-r--r--Build/source/texk/dvipng/dvipng-1.13/special.c38
2 files changed, 42 insertions, 0 deletions
diff --git a/Build/source/texk/dvipng/dvipng-1.13/ChangeLog b/Build/source/texk/dvipng/dvipng-1.13/ChangeLog
index a3bf42d174a..acbf46b979c 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/ChangeLog
+++ b/Build/source/texk/dvipng/dvipng-1.13/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-20 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+ * special.c: fix WIN32 bug that dvipng.exe waits infinitely for some
+ kind of eps files.
+
2010-03-17 Jan-Ake Larsson <jalar@mai.liu.se>
* Release 1.13
diff --git a/Build/source/texk/dvipng/dvipng-1.13/special.c b/Build/source/texk/dvipng/dvipng-1.13/special.c
index 8f74e7f9aac..d364a44929e 100644
--- a/Build/source/texk/dvipng/dvipng-1.13/special.c
+++ b/Build/source/texk/dvipng/dvipng-1.13/special.c
@@ -290,11 +290,41 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut
fprintf(psstream, "gsave %f %f %f setrgbcolor clippath fill grestore",
bgred/255.0, bggreen/255.0, bgblue/255.0);
}
+
+/* WIN32
+write the following at the top of an eps:
+
+%!
+/DVIPNGDICT 100 dict def
+DVIPNGDICT begin /showpage {} def end
+DVIPNGDICT begin
+*/
+
+#ifdef WIN32
+ fprintf(psstream, "\n%%!\n/DVIPNGDICT 100 dict def\n");
+ fprintf(psstream, "DVIPNGDICT begin /showpage {} def end\n");
+ fprintf(psstream, "DVIPNGDICT begin\n");
+#endif
writepscode(pscodep,psstream);
+
+/* WIN32
+write the following at the very end of an eps:
+
+end
+showpage
+*/
+
+#ifdef WIN32
+ fprintf(psstream, "\nend\nshowpage\n");
+#endif
+
+#ifndef WIN32
if (showpage) {
DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tshowpage"));
fprintf(psstream, " showpage ");
}
+#endif
+
fclose(psstream);
}
if (pngstream) {
@@ -323,6 +353,12 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut
if (psimage == NULL) {
DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\tNO IMAGE "));
+
+/*
+ For WIN32 we always output showpage.
+*/
+
+#ifndef WIN32
if (!showpage) {
showpage=true;
DEBUG_PRINT(DEBUG_GS,("(will try adding \"showpage\") "));
@@ -331,6 +367,8 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut
bgred,bggreen,bgblue);
showpage=false;
}
+#endif
+
#ifdef DEBUG
} else {
DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\t%dx%d image ",