summaryrefslogtreecommitdiff
path: root/Build/source/utils/ps2eps
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-12-16 15:25:40 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-12-16 15:25:40 +0000
commitc690df8911bd64c4d3055e0d3ea992d86d6a0d43 (patch)
treee3d6a49bad4d920e5d428837f88dbcacf5106b51 /Build/source/utils/ps2eps
parentb37f2694d6b9eba19b01c00fa6f317770a9d307a (diff)
cleanup psutils and ps2eps PATCHES
git-svn-id: svn://tug.org/texlive/trunk@20764 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/ps2eps')
-rw-r--r--Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/ChangeLog6
-rw-r--r--Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-01-warnings193
-rw-r--r--Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-04-whitespace200
3 files changed, 208 insertions, 191 deletions
diff --git a/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/ChangeLog b/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/ChangeLog
index 08b4aba6bb3..34bb1d5afab 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 @@
+2010-12-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-04-whitespace:
+ * src/C/bbox.c: Remove trailing whitespace.
+
2010-12-15 Peter Breitenlohner <peb@mppmu.mpg.de>
Import ps2eps-1.68, patches in ps2eps-1.68-PATCHES.
@@ -5,7 +10,6 @@
* patch-01-warnings: Avoid compiler warnings.
* src/C/bbox.c (minus_one, plus_one): Declare as static.
(readppm_and_calcbb): Static, avoid uninitialized warning.
- Also remove trailing whitespace.
* patch-02-WIN32-bug:
* src/C/bbox.c (readppm_and_calcbb): Add missing fprintf arg.
diff --git a/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-01-warnings b/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-01-warnings
index 1439f4926e5..254cc12007e 100644
--- a/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-01-warnings
+++ b/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-01-warnings
@@ -1,45 +1,6 @@
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-08-31 10:58:37.000000000 +0200
+++ ps2eps-1.68/src/C/bbox.c 2010-12-15 13:39:27.000000000 +0100
-@@ -4,25 +4,25 @@
- /** Author: Roland Bless <roland -at- bless.de> **/
- /** Copyright (C) 1998-2009 Roland Bless **/
- /** To compile simply use: **/
--/** "cc bbox.c -o bbox" or "make bbox" **/
-+/** "cc bbox.c -o bbox" or "make bbox" **/
- /********************************************************************/
- /*
- * $Id: bbox.c,v 1.18 2009-10-13 15:03:49 bless Exp $
- */
-
- /**
--* This program is free software; you can redistribute it and/or modify
--* it under the terms of the GNU General Public License as published by
--* the Free Software Foundation; either version 2 of the License, or
--* (at your option) any later version.
--*
--* This program is distributed in the hope that it will be useful,
--* but WITHOUT ANY WARRANTY; without even the implied warranty of
--* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--* GNU General Public License for more details.
--*
--* You should have received a copy of the GNU General Public License
--* along with this program; if not, write to the Free Software
-+* This program is free software; you can redistribute it and/or modify
-+* it under the terms of the GNU General Public License as published by
-+* the Free Software Foundation; either version 2 of the License, or
-+* (at your option) any later version.
-+*
-+* This program is distributed in the hope that it will be useful,
-+* but WITHOUT ANY WARRANTY; without even the implied warranty of
-+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+* GNU General Public License for more details.
-+*
-+* You should have received a copy of the GNU General Public License
-+* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- **/
@@ -69,12 +69,14 @@
1
};
@@ -69,159 +30,11 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
const unsigned char tight)
{
FILE *inputfile;
-@@ -109,29 +112,29 @@
- double hllx, hlly, hurx, hury; /* hires bounding box */
- unsigned char *image_row, /* ImageRow */
- *tmpcolumnbytep;
-- unsigned int width,height; /* Image Size */
-+ unsigned int width,height; /* Image Size */
- unsigned int byte_width;
- unsigned char stepsize;
- unsigned char colormax= 0; /* max color value */
- unsigned int ui_colormax= 0; /* max color value */
--
-- if ( name == NULL )
-+
-+ if ( name == NULL )
- {
- inputfile = stdin;
- name = "- STDIN -";
- }
-- else
-+ else
- {
- inputfile = fopen(name,"r");
- if ( inputfile == NULL )
- {
-- fprintf(stderr,"%s: ERROR -- could not open file %s\n",
-+ fprintf(stderr,"%s: ERROR -- could not open file %s\n",
- prgname, name);
- return;
- }
- }
- /** check for magic number **/
-- do
-+ do
- {
- fgets(inputline, 1024, inputfile);
- #ifdef DEBUG
-@@ -150,7 +153,7 @@
- }
- }
- while ( !feof(inputfile) && !magic_found );
--
-+
- if ( !magic_found )
- {
- fprintf(stderr,"%s: ERROR -- %s is not in ppmraw or pbmraw format\n",
-@@ -158,7 +161,7 @@
- return;
- }
- /** skip comments **/
-- do
-+ do
- {
- fgets(inputline, 1024, inputfile);
- #ifdef DEBUG
-@@ -175,15 +178,16 @@
- if ( magic_found == 6 ) /* PPM file has maximum color-component value */
- {
- fgets(inputline, 1024, inputfile);
-- sscanf(inputline,"%u",&ui_colormax);
-+ sscanf(inputline,"%u",&ui_colormax);
- colormax = (unsigned char) ui_colormax; /* this is safer */
- }
+@@ -181,6 +184,7 @@
#ifdef DEBUG
fprintf(stderr,"\nreading picture: %s size X: %u Y: %u\n",name,width,height);
#endif
+ x = 0; /* avoid uninitialized warning */
x_min= width>0 ? width-1 : 0;
-- x_max= 0;
-- y_min= height>0 ? height-1 : 0;
-+ x_max= 0;
-+ y_min= height>0 ? height-1 : 0;
- y_max= 0;
- if ( magic_found == 4 ) /* PBMRAW = Bitmap */
- { /** read raw pbmfile **/
-@@ -192,12 +196,12 @@
- byte_width++;
- }
- else /** assume ppm raw **/
-- {
-+ {
- byte_width= width * 3; /* we have RGB, i.e. three bytes for each pixel */
- }
-- /*
-+ /*
- * Now read a raster of Width * Height pixels, proceeding through the image in normal English reading order,
-- * i.e., starting from top left then moving right
-+ * i.e., starting from top left then moving right
- */
- /* we allocate only one line */
- image_row= malloc(byte_width);
-@@ -258,8 +262,8 @@
- { /* there was a pixel with no background color */
- tmpcolumnbytep= image_row+byte_width-1;
- /* inspect this line from the right */
-- for (byte_x= byte_width-1;
-- byte_x >= 0;
-+ for (byte_x= byte_width-1;
-+ byte_x >= 0;
- byte_x--,tmpcolumnbytep--)
- {
- if ( *tmpcolumnbytep != colormax ) /* there are pixels not white */
-@@ -292,7 +296,7 @@
- y_min,y_max,x_min,x_max);
- #endif
- break;
-- } /* if there are pixels not white */
-+ } /* if there are pixels not white */
- } /* end for byte_x */
- } /* if line contained not only background color */
- } /* end for y */
-@@ -303,7 +307,7 @@
- hllx= (x_min*pt_dpi_dbl)/resolution;
- /* distance from the bottom edge to the bottommost point */
- hlly= ((minus_one(height)-y_max)*pt_dpi_dbl)/resolution;
-- /* distance from the left edge to the righmost point */
-+ /* distance from the left edge to the righmost point */
- hurx= (plus_one(x_max)*pt_dpi_dbl)/resolution;
- /* distance from the bottom edge to the uppermost point */
- hury= ((height-y_min)*pt_dpi_dbl)/resolution;
-@@ -315,7 +319,7 @@
- llx= minus_one((unsigned int) ((unsigned long) x_min*72UL)/resolution);
- /* distance from the bottom edge to the bottommost point */
- lly= minus_one((unsigned int) ((unsigned long) (minus_one(height)-y_max)*72UL)/resolution);
-- /* distance from the left edge to the righmost point */
-+ /* distance from the left edge to the righmost point */
- urx= plus_one((unsigned int) ((unsigned long) plus_one(x_max)*72UL)/resolution);
- /* distance from the bottom edge to the uppermost point */
- ury= plus_one((unsigned int) ((unsigned long) (height-y_min)*72UL)/resolution);
-@@ -335,7 +339,7 @@
- llx= (unsigned int) ((unsigned long) x_min*72UL)/resolution;
- /* distance from the bottom edge to the bottommost point */
- lly= (unsigned int) ((unsigned long) (minus_one(height)-y_max)*72UL)/resolution;
-- /* distance from the left edge to the righmost point */
-+ /* distance from the left edge to the righmost point */
- urx= (unsigned int) ((unsigned long) plus_one(x_max)*72UL)/resolution;
- /* round up if we got a remainder */
- if ( (((unsigned long) plus_one(x_max)*72UL) % resolution) != 0 )
-@@ -357,15 +361,15 @@
- }
- else
- fprintf(stderr,"%s: ERROR -- not enough memory to read in one row of the picture\n",prgname);
--
-+
- fclose(inputfile);
- free(image_row);
- }
-
-
--int
-+int
- main(int argc, char **argv)
--{
-+{
- int i;
- char *filename= NULL;
- unsigned int resolution= 72; /* use 72 dpi as default resolution */
+ x_max= 0;
+ y_min= height>0 ? height-1 : 0;
diff --git a/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-04-whitespace b/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-04-whitespace
new file mode 100644
index 00000000000..22271309343
--- /dev/null
+++ b/Build/source/utils/ps2eps/ps2eps-1.68-PATCHES/patch-04-whitespace
@@ -0,0 +1,200 @@
+ Remove trailing whitespace.
+
+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-15 13:46:23.000000000 +0100
++++ ps2eps-1.68/src/C/bbox.c 2010-12-16 15:20:53.000000000 +0100
+@@ -4,25 +4,25 @@
+ /** Author: Roland Bless <roland -at- bless.de> **/
+ /** Copyright (C) 1998-2009 Roland Bless **/
+ /** To compile simply use: **/
+-/** "cc bbox.c -o bbox" or "make bbox" **/
++/** "cc bbox.c -o bbox" or "make bbox" **/
+ /********************************************************************/
+ /*
+ * $Id: bbox.c,v 1.18 2009-10-13 15:03:49 bless Exp $
+ */
+
+ /**
+-* This program is free software; you can redistribute it and/or modify
+-* it under the terms of the GNU General Public License as published by
+-* the Free Software Foundation; either version 2 of the License, or
+-* (at your option) any later version.
+-*
+-* This program is distributed in the hope that it will be useful,
+-* but WITHOUT ANY WARRANTY; without even the implied warranty of
+-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-* GNU General Public License for more details.
+-*
+-* You should have received a copy of the GNU General Public License
+-* along with this program; if not, write to the Free Software
++* This program is free software; you can redistribute it and/or modify
++* it under the terms of the GNU General Public License as published by
++* the Free Software Foundation; either version 2 of the License, or
++* (at your option) any later version.
++*
++* This program is distributed in the hope that it will be useful,
++* but WITHOUT ANY WARRANTY; without even the implied warranty of
++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++* GNU General Public License for more details.
++*
++* You should have received a copy of the GNU General Public License
++* along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ **/
+@@ -112,29 +112,29 @@
+ double hllx, hlly, hurx, hury; /* hires bounding box */
+ unsigned char *image_row, /* ImageRow */
+ *tmpcolumnbytep;
+- unsigned int width,height; /* Image Size */
++ unsigned int width,height; /* Image Size */
+ unsigned int byte_width;
+ unsigned char stepsize;
+ unsigned char colormax= 0; /* max color value */
+ unsigned int ui_colormax= 0; /* max color value */
+-
+- if ( name == NULL )
++
++ if ( name == NULL )
+ {
+ inputfile = stdin;
+ name = "- STDIN -";
+ }
+- else
++ else
+ {
+ inputfile = fopen(name,"r");
+ if ( inputfile == NULL )
+ {
+- fprintf(stderr,"%s: ERROR -- could not open file %s\n",
++ fprintf(stderr,"%s: ERROR -- could not open file %s\n",
+ prgname, name);
+ return;
+ }
+ }
+ /** check for magic number **/
+- do
++ do
+ {
+ fgets(inputline, 1024, inputfile);
+ #ifdef DEBUG
+@@ -153,7 +153,7 @@
+ }
+ }
+ while ( !feof(inputfile) && !magic_found );
+-
++
+ if ( !magic_found )
+ {
+ fprintf(stderr,"%s: ERROR -- %s is not in ppmraw or pbmraw format\n",
+@@ -161,7 +161,7 @@
+ return;
+ }
+ /** skip comments **/
+- do
++ do
+ {
+ fgets(inputline, 1024, inputfile);
+ #ifdef DEBUG
+@@ -178,7 +178,7 @@
+ if ( magic_found == 6 ) /* PPM file has maximum color-component value */
+ {
+ fgets(inputline, 1024, inputfile);
+- sscanf(inputline,"%u",&ui_colormax);
++ sscanf(inputline,"%u",&ui_colormax);
+ colormax = (unsigned char) ui_colormax; /* this is safer */
+ }
+ #ifdef DEBUG
+@@ -186,8 +186,8 @@
+ #endif
+ x = 0; /* avoid uninitialized warning */
+ x_min= width>0 ? width-1 : 0;
+- x_max= 0;
+- y_min= height>0 ? height-1 : 0;
++ x_max= 0;
++ y_min= height>0 ? height-1 : 0;
+ y_max= 0;
+ if ( magic_found == 4 ) /* PBMRAW = Bitmap */
+ { /** read raw pbmfile **/
+@@ -196,12 +196,12 @@
+ byte_width++;
+ }
+ else /** assume ppm raw **/
+- {
++ {
+ byte_width= width * 3; /* we have RGB, i.e. three bytes for each pixel */
+ }
+- /*
++ /*
+ * Now read a raster of Width * Height pixels, proceeding through the image in normal English reading order,
+- * i.e., starting from top left then moving right
++ * i.e., starting from top left then moving right
+ */
+ /* we allocate only one line */
+ image_row= malloc(byte_width);
+@@ -262,8 +262,8 @@
+ { /* there was a pixel with no background color */
+ tmpcolumnbytep= image_row+byte_width-1;
+ /* inspect this line from the right */
+- for (byte_x= byte_width-1;
+- byte_x >= 0;
++ for (byte_x= byte_width-1;
++ byte_x >= 0;
+ byte_x--,tmpcolumnbytep--)
+ {
+ if ( *tmpcolumnbytep != colormax ) /* there are pixels not white */
+@@ -296,7 +296,7 @@
+ y_min,y_max,x_min,x_max);
+ #endif
+ break;
+- } /* if there are pixels not white */
++ } /* if there are pixels not white */
+ } /* end for byte_x */
+ } /* if line contained not only background color */
+ } /* end for y */
+@@ -307,7 +307,7 @@
+ hllx= (x_min*pt_dpi_dbl)/resolution;
+ /* distance from the bottom edge to the bottommost point */
+ hlly= ((minus_one(height)-y_max)*pt_dpi_dbl)/resolution;
+- /* distance from the left edge to the righmost point */
++ /* distance from the left edge to the righmost point */
+ hurx= (plus_one(x_max)*pt_dpi_dbl)/resolution;
+ /* distance from the bottom edge to the uppermost point */
+ hury= ((height-y_min)*pt_dpi_dbl)/resolution;
+@@ -319,7 +319,7 @@
+ llx= minus_one((unsigned int) ((unsigned long) x_min*72UL)/resolution);
+ /* distance from the bottom edge to the bottommost point */
+ lly= minus_one((unsigned int) ((unsigned long) (minus_one(height)-y_max)*72UL)/resolution);
+- /* distance from the left edge to the righmost point */
++ /* distance from the left edge to the righmost point */
+ urx= plus_one((unsigned int) ((unsigned long) plus_one(x_max)*72UL)/resolution);
+ /* distance from the bottom edge to the uppermost point */
+ ury= plus_one((unsigned int) ((unsigned long) (height-y_min)*72UL)/resolution);
+@@ -339,7 +339,7 @@
+ llx= (unsigned int) ((unsigned long) x_min*72UL)/resolution;
+ /* distance from the bottom edge to the bottommost point */
+ lly= (unsigned int) ((unsigned long) (minus_one(height)-y_max)*72UL)/resolution;
+- /* distance from the left edge to the righmost point */
++ /* distance from the left edge to the righmost point */
+ urx= (unsigned int) ((unsigned long) plus_one(x_max)*72UL)/resolution;
+ /* round up if we got a remainder */
+ if ( (((unsigned long) plus_one(x_max)*72UL) % resolution) != 0 )
+@@ -361,15 +361,15 @@
+ }
+ else
+ fprintf(stderr,"%s: ERROR -- not enough memory to read in one row of the picture\n",prgname);
+-
++
+ fclose(inputfile);
+ free(image_row);
+ }
+
+
+-int
++int
+ main(int argc, char **argv)
+-{
++{
+ int i;
+ char *filename= NULL;
+ unsigned int resolution= 72; /* use 72 dpi as default resolution */