From 435af8b2d7de837bb38b5663a1cb7e0df0ddd529 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Sat, 2 Oct 2010 13:48:48 +0000 Subject: avoid some WIN32/MINGW compiler warnings git-svn-id: svn://tug.org/texlive/trunk@19972 c570f23f-e606-0410-a88d-b1316a301751 --- .../texk/dvipng/dvipng-1.13-PATCHES/ChangeLog | 4 + .../dvipng-1.13-PATCHES/patch-22-win32-bugfix | 93 ++++++++++++++++++++++ Build/source/texk/dvipng/dvipng-1.13/ChangeLog | 9 ++- Build/source/texk/dvipng/dvipng-1.13/special.c | 2 + Build/source/texk/dvipsk/ChangeLog | 5 ++ Build/source/texk/dvipsk/search.c | 10 ++- 6 files changed, 118 insertions(+), 5 deletions(-) create mode 100644 Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-22-win32-bugfix (limited to 'Build/source') diff --git a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/ChangeLog b/Build/source/texk/dvipng/dvipng-1.13-PATCHES/ChangeLog index 7ffefcc9a60..11f85b81164 100644 --- a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/ChangeLog +++ b/Build/source/texk/dvipng/dvipng-1.13-PATCHES/ChangeLog @@ -1,3 +1,7 @@ +2010-10-02 Peter Breitenlohner + + * patch-22-win32-bugfix (new): WIN32 bug fix from Akira Kakuto. + 2010-03-18 Peter Breitenlohner * Imported release 1.13 from savannah.nongnu.org. diff --git a/Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-22-win32-bugfix b/Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-22-win32-bugfix new file mode 100644 index 00000000000..06e2c6b0b11 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.13-PATCHES/patch-22-win32-bugfix @@ -0,0 +1,93 @@ +diff -ur dvipng-1.13.orig/ChangeLog dvipng-1.13/ChangeLog +--- dvipng-1.13.orig/ChangeLog 2010-03-17 22:59:40.000000000 +0100 ++++ dvipng-1.13/ChangeLog 2010-10-02 13:16:12.428050971 +0200 +@@ -1,3 +1,12 @@ ++2010-10-02 Peter Breitenlohner ++ ++ * special.c (ps2png): Drop unused 'bool showpage' for WIN32. ++ ++2010-09-20 Akira Kakuto ++ ++ * special.c (ps2png): fix WIN32 bug that dvipng.exe waits ++ infinitely for some kind of eps files. ++ + 2010-03-17 Jan-Ake Larsson + + * Release 1.13 +diff -ur dvipng-1.13.orig/special.c dvipng-1.13/special.c +--- dvipng-1.13.orig/special.c 2010-03-18 12:32:01.000000000 +0100 ++++ dvipng-1.13/special.c 2010-10-02 13:05:54.952668093 +0200 +@@ -167,7 +167,9 @@ + char resolution[STRSIZE]; + /* char devicesize[STRSIZE]; */ + gdImagePtr psimage=NULL; ++#ifndef WIN32 + static bool showpage=false; ++#endif + + sprintf(resolution, "-r%dx%d",hresolution,vresolution); + /* Future extension for \rotatebox +@@ -290,11 +292,41 @@ + 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 +355,12 @@ + + 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 +369,8 @@ + bgred,bggreen,bgblue); + showpage=false; + } ++#endif ++ + #ifdef DEBUG + } else { + DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\t%dx%d image ", diff --git a/Build/source/texk/dvipng/dvipng-1.13/ChangeLog b/Build/source/texk/dvipng/dvipng-1.13/ChangeLog index acbf46b979c..a0791cd29eb 100644 --- a/Build/source/texk/dvipng/dvipng-1.13/ChangeLog +++ b/Build/source/texk/dvipng/dvipng-1.13/ChangeLog @@ -1,6 +1,11 @@ +2010-10-02 Peter Breitenlohner + + * special.c (ps2png): Drop unused 'bool showpage' for WIN32. + 2010-09-20 Akira Kakuto - * special.c: fix WIN32 bug that dvipng.exe waits infinitely for some - kind of eps files. + + * special.c (ps2png): fix WIN32 bug that dvipng.exe waits + infinitely for some kind of eps files. 2010-03-17 Jan-Ake Larsson diff --git a/Build/source/texk/dvipng/dvipng-1.13/special.c b/Build/source/texk/dvipng/dvipng-1.13/special.c index d364a44929e..9a983b6df1c 100644 --- a/Build/source/texk/dvipng/dvipng-1.13/special.c +++ b/Build/source/texk/dvipng/dvipng-1.13/special.c @@ -167,7 +167,9 @@ ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolut char resolution[STRSIZE]; /* char devicesize[STRSIZE]; */ gdImagePtr psimage=NULL; +#ifndef WIN32 static bool showpage=false; +#endif sprintf(resolution, "-r%dx%d",hresolution,vresolution); /* Future extension for \rotatebox diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index 0b523aa46ea..1036a80675a 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,3 +1,8 @@ +2010-10-02 Peter Breitenlohner + + * search.c (selfautoloc_prog): #include + for WIN32 and drop cast of concatn() results. + 2010-06-19 Yan Li * tfmload.c (name): increase size to 500. diff --git a/Build/source/texk/dvipsk/search.c b/Build/source/texk/dvipsk/search.c index 615802f2b6c..193007c4688 100644 --- a/Build/source/texk/dvipsk/search.c +++ b/Build/source/texk/dvipsk/search.c @@ -70,6 +70,10 @@ quote_name (const char *name) This is a generic function; if we end up needing it in other programs, we should move it to kpathsea. */ +#ifdef WIN32 +#include +#endif + static char * selfautoloc_prog (const char *prog) { @@ -87,14 +91,14 @@ selfautoloc_prog (const char *prog) while (*r && *r != ' ' && *r != '\t') r++; if (*r == '\0') - ret = (char *)concatn ("\"", selfautoloc, "\\", q, "\"", NULL); + ret = concatn ("\"", selfautoloc, "\\", q, "\"", NULL); else { *r = '\0'; r++; if (*r) - ret = (char *)concatn ("\"", selfautoloc, "\\", q, "\" ", r, NULL); + ret = concatn ("\"", selfautoloc, "\\", q, "\" ", r, NULL); else - ret = (char *)concatn ("\"", selfautoloc, "\\", q, "\"", NULL); + ret = concatn ("\"", selfautoloc, "\\", q, "\"", NULL); } free (q); free (selfautoloc); -- cgit v1.2.3