texlive[59818] Build/source/utils: ps2eps-1.70

commits+hironobu at tug.org commits+hironobu at tug.org
Sat Jul 3 19:37:52 CEST 2021


Revision: 59818
          http://tug.org/svn/texlive?view=revision&revision=59818
Author:   hironobu
Date:     2021-07-03 19:37:52 +0200 (Sat, 03 Jul 2021)
Log Message:
-----------
ps2eps-1.70

Modified Paths:
--------------
    trunk/Build/source/utils/README
    trunk/Build/source/utils/ps2eps/ChangeLog
    trunk/Build/source/utils/ps2eps/TLpatches/ChangeLog
    trunk/Build/source/utils/ps2eps/TLpatches/TL-Changes
    trunk/Build/source/utils/ps2eps/TLpatches/patch-01-warnings
    trunk/Build/source/utils/ps2eps/TLpatches/patch-02-WIN32-bug
    trunk/Build/source/utils/ps2eps/TLpatches/patch-03-PERL
    trunk/Build/source/utils/ps2eps/TLpatches/patch-04-whitespace
    trunk/Build/source/utils/ps2eps/TLpatches/patch-05-write-bin
    trunk/Build/source/utils/ps2eps/configure
    trunk/Build/source/utils/ps2eps/configure.ac
    trunk/Build/source/utils/ps2eps/ps2eps-src/Changes.txt
    trunk/Build/source/utils/ps2eps/ps2eps-src/README.txt
    trunk/Build/source/utils/ps2eps/ps2eps-src/bin/ps2eps.pl
    trunk/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/bbox.1
    trunk/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/ps2eps.1
    trunk/Build/source/utils/ps2eps/ps2eps-src/src/C/bbox.c

Added Paths:
-----------
    trunk/Build/source/utils/ps2eps/ps2eps-src/Latest_is_1.70

Removed Paths:
-------------
    trunk/Build/source/utils/ps2eps/TLpatches/patch-06-unused
    trunk/Build/source/utils/ps2eps/ps2eps-src/Latest_is_1.68

Modified: trunk/Build/source/utils/README
===================================================================
--- trunk/Build/source/utils/README	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/README	2021-07-03 17:37:52 UTC (rev 59818)
@@ -26,7 +26,7 @@
 pmx 2.9.4a - checked 30jan21
   https://ctan.org/pkg/pmx/
 
-ps2eps 1.68 - checked 10may12
+ps2eps 1.70 - checked 03jul21
   http://tm.uka.de/~bless/ps2eps
 
 t1utils 1.42 - checked 31oct20

Modified: trunk/Build/source/utils/ps2eps/ChangeLog
===================================================================
--- trunk/Build/source/utils/ps2eps/ChangeLog	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/ChangeLog	2021-07-03 17:37:52 UTC (rev 59818)
@@ -1,3 +1,8 @@
+2021-07-03  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
+
+	Import ps2eps-1.70.
+	* configure.ac: version 1.70.
+
 2016-02-22  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	* Makefile.am, configure.ac: New convention.

Modified: trunk/Build/source/utils/ps2eps/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/utils/ps2eps/TLpatches/ChangeLog	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/TLpatches/ChangeLog	2021-07-03 17:37:52 UTC (rev 59818)
@@ -1,3 +1,8 @@
+2021-07-03  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
+
+	Import ps2eps-1.70, patches adapted.
+	* patch-06-unused (removed): Fixed upstream.
+
 2012-12-07  Peter Breitenlohner  <peb at mppmu.mpg.de>
 
 	* patch-06-unused (new): Drop unused variable (gcc-4.6 warning).

Modified: trunk/Build/source/utils/ps2eps/TLpatches/TL-Changes
===================================================================
--- trunk/Build/source/utils/ps2eps/TLpatches/TL-Changes	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/TLpatches/TL-Changes	2021-07-03 17:37:52 UTC (rev 59818)
@@ -1,5 +1,5 @@
-Changes applied to the ps2eps-1.68 tree as obtained from:
-	http://www.tm.uka.de/~bless/ps2eps-1.68.tar.gz
+Changes applied to the ps2eps-1.70 tree as obtained from:
+	http://tm.uka.de/~bless/ps2eps-1.70.tar.gz
 
 Rename:
 	bin/ps2eps => bin/ps2eps.pl
@@ -9,4 +9,4 @@
 	bin/win32/
 	doc/html/
 	doc/pdf/
-
+	src/C/Makefile

Modified: trunk/Build/source/utils/ps2eps/TLpatches/patch-01-warnings
===================================================================
--- trunk/Build/source/utils/ps2eps/TLpatches/patch-01-warnings	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/TLpatches/patch-01-warnings	2021-07-03 17:37:52 UTC (rev 59818)
@@ -1,7 +1,7 @@
-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
-@@ -69,12 +69,14 @@
+diff -ur ps2eps-1.70.orig/src/C/bbox.c ps2eps-1.70/src/C/bbox.c
+--- ps2eps-1.70.orig/src/C/bbox.c	2021-03-13 05:45:13.000000000 +0900
++++ ps2eps-1.70/src/C/bbox.c	2021-07-04 01:38:12.000000000 +0900
+@@ -70,12 +70,14 @@
    1
  };
  
@@ -18,7 +18,7 @@
  {
    return (x == (unsigned int) ~0U) ? x : x+1;
  }
-@@ -95,8 +97,9 @@
+@@ -96,8 +98,9 @@
  *       and printed to stdout                                           *
  ************************************************************************/
  /* calculate the bounding box in postscript points, given a resolution in dpi */
@@ -30,7 +30,7 @@
                          const unsigned char tight)
  {
  	FILE 	*inputfile;
-@@ -181,6 +184,7 @@
+@@ -192,6 +195,7 @@
  #ifdef DEBUG
  	fprintf(stderr,"\nreading picture: %s size X: %u Y: %u\n",name,width,height);
  #endif

Modified: trunk/Build/source/utils/ps2eps/TLpatches/patch-02-WIN32-bug
===================================================================
--- trunk/Build/source/utils/ps2eps/TLpatches/patch-02-WIN32-bug	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/TLpatches/patch-02-WIN32-bug	2021-07-03 17:37:52 UTC (rev 59818)
@@ -1,7 +1,7 @@
-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:39:27.000000000 +0100
-+++ ps2eps-1.68/src/C/bbox.c	2010-12-15 13:46:23.000000000 +0100
-@@ -210,7 +210,7 @@
+diff -ur ps2eps-1.70.orig/src/C/bbox.c ps2eps-1.70/src/C/bbox.c
+--- ps2eps-1.70.orig/src/C/bbox.c	2021-07-04 01:38:12.000000000 +0900
++++ ps2eps-1.70/src/C/bbox.c	2021-07-04 01:39:17.000000000 +0900
+@@ -221,7 +221,7 @@
  #if defined(_WIN32) && !defined(__CYGWIN__)  /* this is really braindead stuff for MSVC */
  	  i= _setmode( _fileno(stdin), _O_BINARY);
  	  if (i == -1)

Modified: trunk/Build/source/utils/ps2eps/TLpatches/patch-03-PERL
===================================================================
--- trunk/Build/source/utils/ps2eps/TLpatches/patch-03-PERL	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/TLpatches/patch-03-PERL	2021-07-03 17:37:52 UTC (rev 59818)
@@ -1,6 +1,6 @@
-diff -ur ps2eps-1.68.orig/bin/ps2eps.pl ps2eps-1.68/bin/ps2eps.pl
---- ps2eps-1.68.orig/bin/ps2eps.pl	2010-08-31 10:58:37.000000000 +0200
-+++ ps2eps-1.68/bin/ps2eps.pl	2010-12-15 14:05:24.000000000 +0100
+diff -ur ps2eps-1.70.orig/bin/ps2eps.pl ps2eps-1.70/bin/ps2eps.pl
+--- ps2eps-1.70.orig/bin/ps2eps.pl	2021-03-13 05:45:13.000000000 +0900
++++ ps2eps-1.70/bin/ps2eps.pl	2021-07-04 01:40:19.000000000 +0900
 @@ -1,5 +1,4 @@
 -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q' # -*-perl-*-
 -        if 0;

Modified: trunk/Build/source/utils/ps2eps/TLpatches/patch-04-whitespace
===================================================================
--- trunk/Build/source/utils/ps2eps/TLpatches/patch-04-whitespace	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/TLpatches/patch-04-whitespace	2021-07-03 17:37:52 UTC (rev 59818)
@@ -1,17 +1,17 @@
 	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
+diff -ur ps2eps-1.70.orig/src/C/bbox.c ps2eps-1.70/src/C/bbox.c
+--- ps2eps-1.70.orig/src/C/bbox.c	2021-07-04 01:39:17.000000000 +0900
++++ ps2eps-1.70/src/C/bbox.c	2021-07-04 01:52:00.000000000 +0900
 @@ -4,25 +4,25 @@
  /** Author:    Roland Bless <roland -at- bless.de>                 **/
- /** Copyright (C) 1998-2009 Roland Bless                           **/
+ /** Copyright (C) 1998-2020 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 $
+  * $Id: bbox.c 146 2021-03-12 20:26:23Z bless $
   */
  
  /**
@@ -42,7 +42,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  **/
-@@ -112,29 +112,29 @@
+@@ -113,28 +113,28 @@
          double       hllx, hlly, hurx, hury; /* hires bounding box */
          unsigned char   *image_row,	 /* ImageRow */
                          *tmpcolumnbytep;
@@ -49,7 +49,6 @@
 -        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 */
 -        
@@ -69,7 +68,7 @@
 -            fprintf(stderr,"%s: ERROR -- could not open file %s\n", 
 +            fprintf(stderr,"%s: ERROR -- could not open file %s\n",
                      prgname, name);
-             return;
+             exit(1);
            }
          }
          /** check for magic number **/
@@ -76,9 +75,9 @@
 -        do 
 +        do
          {
-           fgets(inputline, 1024, inputfile);
- #ifdef DEBUG
-@@ -153,7 +153,7 @@
+ 		if (fgets(inputline, inputlinelength, inputfile) == NULL) {
+ 			fprintf(stderr,"%s: ERROR -- unexpected end of file %s\n", prgname, name);
+@@ -155,7 +155,7 @@
            }
          }
          while ( !feof(inputfile) && !magic_found );
@@ -87,25 +86,25 @@
          if ( !magic_found )
          {
            fprintf(stderr,"%s: ERROR -- %s is not in ppmraw or pbmraw format\n",
-@@ -161,7 +161,7 @@
-           return;
+@@ -164,7 +164,7 @@
+ 	  exit(1);
          }
          /** 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);
+ 	   if (fgets(inputline, inputlinelength, inputfile) == NULL) {
+ 		   fprintf(stderr,"%s: ERROR -- unexpected end of file %s\n", prgname, name);
+@@ -189,7 +189,7 @@
+ 		  fclose(inputfile);
+ 		  exit(1);
+ 	  }
+-	  sscanf(inputline,"%u",&ui_colormax);  
++	  sscanf(inputline,"%u",&ui_colormax);
  	  colormax = (unsigned char) ui_colormax; /* this is safer */
          }
  #ifdef DEBUG
-@@ -186,8 +186,8 @@
+@@ -197,8 +197,8 @@
  #endif
          x = 0; /* avoid uninitialized warning */
          x_min= width>0 ? width-1 : 0;
@@ -116,7 +115,7 @@
          y_max= 0;
          if ( magic_found == 4 ) /* PBMRAW = Bitmap */
          { /** read raw pbmfile **/
-@@ -196,12 +196,12 @@
+@@ -207,12 +207,12 @@
              byte_width++;
          }
          else /** assume ppm raw **/
@@ -132,7 +131,7 @@
  	 */
  	/* we allocate only one line */
          image_row= malloc(byte_width);
-@@ -262,8 +262,8 @@
+@@ -273,8 +273,8 @@
              { /* there was a pixel with no background color */
                tmpcolumnbytep= image_row+byte_width-1;
                /* inspect this line from the right */
@@ -143,7 +142,7 @@
                     byte_x--,tmpcolumnbytep--)
                {
                  if ( *tmpcolumnbytep != colormax ) /* there are pixels not white */
-@@ -296,7 +296,7 @@
+@@ -307,7 +307,7 @@
                         y_min,y_max,x_min,x_max);
  #endif
                    break;
@@ -152,7 +151,7 @@
                } /* end for byte_x */
              } /* if line contained not only background color */
            } /* end for y */
-@@ -307,7 +307,7 @@
+@@ -318,7 +318,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;
@@ -161,7 +160,7 @@
  	    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 @@
+@@ -330,7 +330,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);
@@ -170,7 +169,7 @@
              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 @@
+@@ -350,7 +350,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;
@@ -179,10 +178,10 @@
              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 @@
+@@ -372,15 +372,15 @@
          }
          else
-           fprintf(stderr,"%s: ERROR -- not enough memory to read in one row of the picture\n",prgname);
+           fprintf(stderr,"%s: ERROR -- not enough memory to read in one row of the picture\n", prgname);
 -        
 +
  	fclose(inputfile);

Modified: trunk/Build/source/utils/ps2eps/TLpatches/patch-05-write-bin
===================================================================
--- trunk/Build/source/utils/ps2eps/TLpatches/patch-05-write-bin	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/TLpatches/patch-05-write-bin	2021-07-03 17:37:52 UTC (rev 59818)
@@ -1,7 +1,7 @@
-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 @@
+diff -ur ps2eps-1.70.orig/src/C/bbox.c ps2eps-1.70/src/C/bbox.c
+--- ps2eps-1.70.orig/src/C/bbox.c	2021-07-04 01:52:00.000000000 +0900
++++ ps2eps-1.70/src/C/bbox.c	2021-07-04 01:55:25.000000000 +0900
+@@ -222,6 +222,9 @@
  	  i= _setmode( _fileno(stdin), _O_BINARY);
  	  if (i == -1)
  	    fprintf(stderr,"%s: ERROR - Cannot set binary mode for STDIN\n", prgname);

Deleted: trunk/Build/source/utils/ps2eps/TLpatches/patch-06-unused
===================================================================
--- trunk/Build/source/utils/ps2eps/TLpatches/patch-06-unused	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/TLpatches/patch-06-unused	2021-07-03 17:37:52 UTC (rev 59818)
@@ -1,28 +0,0 @@
-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	2012-06-16 18:21:11.000000000 +0200
-+++ ps2eps-1.68/src/C/bbox.c	2012-12-07 10:24:48.000000000 +0100
-@@ -114,7 +114,6 @@
-                         *tmpcolumnbytep;
-         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 */
- 
-@@ -141,16 +140,10 @@
-           fprintf(stderr,"read:[%s]\n",inputline);
- #endif
-           if ( strcmp(inputline,"P4\n") == 0 )
--          {
--            stepsize= 1;
-             magic_found= 4;
--          }
-           else
-           if ( strcmp(inputline,"P6\n") == 0 )
--          {
--            stepsize= 3;
-             magic_found= 6;
--          }
-         }
-         while ( !feof(inputfile) && !magic_found );
- 

Modified: trunk/Build/source/utils/ps2eps/configure
===================================================================
--- trunk/Build/source/utils/ps2eps/configure	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/configure	2021-07-03 17:37:52 UTC (rev 59818)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for ps2eps (TeX Live) 1.68.
+# Generated by GNU Autoconf 2.71 for ps2eps (TeX Live) 1.70.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -610,8 +610,8 @@
 # Identity of this package.
 PACKAGE_NAME='ps2eps (TeX Live)'
 PACKAGE_TARNAME='ps2eps--tex-live-'
-PACKAGE_VERSION='1.68'
-PACKAGE_STRING='ps2eps (TeX Live) 1.68'
+PACKAGE_VERSION='1.70'
+PACKAGE_STRING='ps2eps (TeX Live) 1.70'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1278,7 +1278,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures ps2eps (TeX Live) 1.68 to adapt to many kinds of systems.
+\`configure' configures ps2eps (TeX Live) 1.70 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1346,7 +1346,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ps2eps (TeX Live) 1.68:";;
+     short | recursive ) echo "Configuration of ps2eps (TeX Live) 1.70:";;
    esac
   cat <<\_ACEOF
 
@@ -1443,7 +1443,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ps2eps (TeX Live) configure 1.68
+ps2eps (TeX Live) configure 1.70
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1566,7 +1566,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by ps2eps (TeX Live) $as_me 1.68, which was
+It was created by ps2eps (TeX Live) $as_me 1.70, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -4100,7 +4100,7 @@
 
 # Define the identity of the package.
  PACKAGE='ps2eps--tex-live-'
- VERSION='1.68'
+ VERSION='1.70'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -5957,7 +5957,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by ps2eps (TeX Live) $as_me 1.68, which was
+This file was extended by ps2eps (TeX Live) $as_me 1.70, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6016,7 +6016,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-ps2eps (TeX Live) config.status 1.68
+ps2eps (TeX Live) config.status 1.70
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/utils/ps2eps/configure.ac
===================================================================
--- trunk/Build/source/utils/ps2eps/configure.ac	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/configure.ac	2021-07-03 17:37:52 UTC (rev 59818)
@@ -6,7 +6,7 @@
 dnl   gives unlimited permission to copy and/or distribute it,
 dnl   with or without modifications, as long as this notice is preserved.
 dnl
-m4_define([ps2eps_version], [1.68])[]dnl using unmodified ps2eps source tree
+m4_define([ps2eps_version], [1.70])[]dnl using unmodified ps2eps source tree
 AC_INIT([ps2eps (TeX Live)], ps2eps_version, [tex-k at tug.org])
 AC_PREREQ([2.65])
 AC_CONFIG_SRCDIR([ps2eps-src/bin/ps2eps.pl])

Modified: trunk/Build/source/utils/ps2eps/ps2eps-src/Changes.txt
===================================================================
--- trunk/Build/source/utils/ps2eps/ps2eps-src/Changes.txt	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/ps2eps-src/Changes.txt	2021-07-03 17:37:52 UTC (rev 59818)
@@ -1,6 +1,17 @@
 ----------------------------
 Detailed Change Log:
 ----------------------------
+
+----------------------------
+revision 1.70
+date: 
+- added new option -X, --BBonly that only prints the BoundingBox result, but does not
+  write a new file. This is highly useful to correctly figure out the BB of PDFs
+----------------------------
+revision 1.69 (not released)
+date: 2013-03-05 22:48:42 +0100 (Di, 05. Mär 2013)
+- fixed auto translate for negative Bounding Boxes
+----------------------------
 revision 1.68
 date: 2010-05-07 21:42:35 +0200;  author: bless;  state: Exp;  lines: +3 -3; 
 - quoted translate command string
@@ -222,7 +233,7 @@
 -------------
 date: 2001/04/06 22:31:27
 - Fixed case sensitiveness when checking for suffix replacement
-  (thanks to Erik J\xF8rgensen)
+  (thanks to Erik Jørgensen)
 ----------------------------
 revision 1.31
 -------------

Deleted: trunk/Build/source/utils/ps2eps/ps2eps-src/Latest_is_1.68
===================================================================
Added: trunk/Build/source/utils/ps2eps/ps2eps-src/Latest_is_1.70
===================================================================
Modified: trunk/Build/source/utils/ps2eps/ps2eps-src/README.txt
===================================================================
--- trunk/Build/source/utils/ps2eps/ps2eps-src/README.txt	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/ps2eps-src/README.txt	2021-07-03 17:37:52 UTC (rev 59818)
@@ -14,7 +14,7 @@
 =======
 Possibly you can find the newest version at the
 following URL:
-http://www.ipv6.tm.uka.de/~bless/ps2eps
+http://tm.kit.edu/~bless
 
 
 Contact information:

Modified: trunk/Build/source/utils/ps2eps/ps2eps-src/bin/ps2eps.pl
===================================================================
--- trunk/Build/source/utils/ps2eps/ps2eps-src/bin/ps2eps.pl	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/ps2eps-src/bin/ps2eps.pl	2021-07-03 17:37:52 UTC (rev 59818)
@@ -3,9 +3,7 @@
 # {#!/usr/bin/perl}.   
 # ps2eps - convert PostScript to EPS (Encapsulated PostScript) files
 # -------------------------------------------------------------------
-# $Id: ps2eps,v 1.68 2010-05-07 19:42:35 bless Exp $
-# -------------------------------------------------------
-# (C)opyright 1999-2009 Roland Bless
+# (C)opyright 1998-2018 Roland Bless
 #
 # 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     
@@ -57,7 +55,7 @@
 
 $bboxver=`bbox >$NULLDEV -V`;
 $bboxname= ($?== -1) ? "" : "bbox";
-$version= '$Id: ps2eps,v 1.68 2010-05-07 19:42:35 bless Exp $'; #'
+$version= '$Id: ps2eps,v 1.70 2018-01-09 18:00:00 bless Exp $'; #'
 $insertPScode= 1;     # Insert surrounding Postscript code
 $infhandle = STDIN;   # Standard input is the default input file
 $outfhandle = STDOUT; # Standard output is default output if STDIN is input
@@ -75,6 +73,7 @@
 $forcefixps= 0;       # fix postscript code unconditionally if eq 1
 $filterorientation= 1;# filter Orientation line
 $looseBB='';          # default: tight bounding box
+$bboxonly=0;          # output Bounding box only, no other output
 $clip=0;              # do not clip
 $warnings=0;          # do not print warnings concerning postscript sanity
 $debuggs=0;           # no debugging of ghostscript call, turn this on if you want to see the gs call
@@ -147,7 +146,7 @@
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n";
 
 @prgidtxt= ( "$prgname - convert PostScript to EPS (Encapsulated PostScript) files\n",
-	     "(C)opyright 1998-2009 Roland Bless\n\n" );
+	     "(C)opyright 1998-2018 Roland Bless\n\n" );
 
 @helptxt= ("Version: $ver[2]\n",
           "Operation:\n",
@@ -163,12 +162,13 @@
           " If BoundingBox in output seems to be wrong, please try options --size or --ignoreBB.\n\n" );
 
 @usagetxt= ("Syntax:\n",
-            " $prgname [-f] [-q] [-N] [-O] [-n] [-P] [-c] [-b] [-C] [-m] [-B] [-E] [-s <pagedim>] [-R +|-|^] [-t <x,y>] [-l] [-g] [-d] [-H] [-h|--help] [-g] [-a] [-W] [-L] [-V|--version] [--] [psfile1] [psfile2] [...]\n",
+            " $prgname [-f] [-q] [-N] [-O] [-X] [-n] [-P] [-c] [-b] [-C] [-m] [-B] [-E] [-s <pagedim>] [-R +|-|^] [-t <x,y>] [-l] [-g] [-d] [-H] [-h|--help] [-g] [-a] [-W] [-L] [-V|--version] [--] [psfile1] [psfile2] [...]\n",
             "Options:\n",
             " -f, --force                force overwriting existing files\n",
             " -q, --quiet                quiet operation (no output while processing files)\n",
             " -N, --noinsert             do not insert any postscript code\n",
             " -O, --preserveorientation  do not filter Orientation: header comment\n",
+	    " -X, --BBonly               print resulting bounding box(es) only, no other output\n",
             " -n, --nofix                do not try to fix postscript code\n",
             " -P, --removepreview        remove preview image (smaller file, but no preview)\n",
             " -F, --fixps                fix postscript code unconditionally\n",
@@ -185,7 +185,7 @@
 	    " -B, --ignoreBB             do not use existing bounding box as page size for rendering\n",
 	    " -E, --ignoreEOF            do not use %%EOF as hint for end of file\n",
 	    " -g, --gsbbox               use internal bbox device of ghostscript\n",
-	    " -H, --no-hires             do not use a HiResBoundingBox\n",
+	    " -H, --nohires              do not use a HiResBoundingBox\n",
             " -h, --help                 help information\n",
             " -L, --license              show licensing information\n",
             " -V, --version              show version information\n",
@@ -234,6 +234,7 @@
 	   'C|clip'	=> \$clip,
 	   'l|loose'	=> sub { $looseBB = '-l' },
 	   'B|ignoreBB'	=> \$ignoreBB,
+	   'X|BBonly'   => \$bboxonly,
 	   'E|ignoreEOF'=> \$ignoreEOFDSC,
 	   's|size=s'	=> \$opt_s,
 	   't|translate=s'	=> \$opt_t,
@@ -420,7 +421,7 @@
     {
       $BBarg= $1;
       # accept even negative and fractional BBs
-      if ( $BBarg =~ /(\-?\d+\.?\d*\s+){3,}\d+/ ) # ignore %% BoundingBox: (atend) comments
+      if ( $BBarg =~ /(\-?\d+\.?\d*\s+){3,}\-?\d+\.?\d*/ ) # ignore %% BoundingBox: (atend) comments
       {
 	($eBBllx,$eBBlly,$eBBurx,$eBBury,$dummy)= split /\s/,$BBarg;
 	#print STDERR "Existing BB: $eBBllx,$eBBlly,$eBBurx,$eBBury\n";
@@ -636,6 +637,14 @@
   $boundingbox = "%%BoundingBox: $cBBllx $cBBlly $cBBurx $cBBury\n";
 
   if (!$quiet) { print STDERR "ready. $boundingbox" };
+
+  if ($bboxonly) 
+  { 
+      print STDERR $boundingbox; 
+      if (defined($hiresboundingbox) && !defined($nohires)) 
+      { print STDERR $hiresboundingbox; }
+      exit 0 
+  };
   
   $before_startps= 1;
   $inserted_prolog= 0;

Modified: trunk/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/bbox.1
===================================================================
--- trunk/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/bbox.1	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/bbox.1	2021-07-03 17:37:52 UTC (rev 59818)
@@ -3,7 +3,7 @@
 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve at ggi-project.org>.
-.TH "BBOX" "1" "31 August 2010" "" ""
+.TH "BBOX" "1" "January 22, 2004" "" ""
 
 .SH NAME
 bbox \- prints out the bounding box of a rawppm or rawpbm image

Modified: trunk/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/ps2eps.1
===================================================================
--- trunk/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/ps2eps.1	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/ps2eps.1	2021-07-03 17:37:52 UTC (rev 59818)
@@ -3,17 +3,17 @@
 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
 .\" Please send any bug reports, improvements, comments, patches, 
 .\" etc. to Steve Cheng <steve at ggi-project.org>.
-.TH "PS2EPS" "1" "31 August 2010" "" ""
+.TH "PS2EPS" "1" "September 1st, 2018" "" ""
 
 .SH NAME
 ps2eps \- convert PostScript to EPS (Encapsulated PostScript) files
 .SH SYNOPSIS
 
-\fBps2eps\fR [ \fB-f\fR ] [ \fB-q\fR ] [ \fB-N\fR ] [ \fB-O\fR ] [ \fB-n\fR ] [ \fB-P\fR ] [ \fB-c\fR ] [ \fB-C\fR ] [ \fB-m\fR ] [ \fB-B\fR ] [ \fB-E\fR ] [ \fB-s \fIpagedim\fB\fR ] [ \fB-t \fIoffset\fB\fR ] [ \fB-r \fIresolution\fB\fR ] [ \fB-R \fI+|-|^\fB\fR ] [ \fB-l\fR ] [ \fB-g\fR ] [ \fB-H\fR ] [ \fB-d\fR ] [ \fB-h|--help\fR ] [ \fB-a\fR ] [ \fB-W\fR ] [ \fB-L\fR ] [ \fB-V|--version\fR ] [ \fB--\fR ] [ \fB\fIpsfile1\fB\fR ] [ \fB\fIpsfile2\fB\fR ] [ \fB\fI\&...\fB\fR ]
+\fBps2eps\fR [ \fB-f\fR ] [ \fB-q\fR ] [ \fB-N\fR ] [ \fB-O\fR ] [ \fB-X\fR ] [ \fB-n\fR ] [ \fB-P\fR ] [ \fB-c\fR ] [ \fB-C\fR ] [ \fB-m\fR ] [ \fB-B\fR ] [ \fB-E\fR ] [ \fB-s \fIpagedim\fB\fR ] [ \fB-t \fIoffset\fB\fR ] [ \fB-r \fIresolution\fB\fR ] [ \fB-R \fI+|-|^\fB\fR ] [ \fB-l\fR ] [ \fB-g\fR ] [ \fB-H\fR ] [ \fB-d\fR ] [ \fB-h|--help\fR ] [ \fB-a\fR ] [ \fB-W\fR ] [ \fB-L\fR ] [ \fB-V|--version\fR ] [ \fB--\fR ] [ \fB\fIpsfile1\fB\fR ] [ \fB\fIpsfile2\fB\fR ] [ \fB\fI\&...\fB\fR ]
 
 .SH "DESCRIPTION"
 .PP
-This manual page documents \fBps2eps\fR version 1.68.
+This manual page documents \fBps2eps\fR version 1.70.
 .PP
 \fBps2eps\fR is a tool (written in Perl) to produce 
 Encapsulated PostScript Files (EPS/EPSF) from usual one-paged Postscript
@@ -21,6 +21,9 @@
 filters some special postscript command sequences that can produce
 erroneous results on printers. EPS files are often needed for including
 (scalable) graphics of high quality into TeX/LaTeX (or even Word) documents.
+It can also be used to calculate correct BoundingBoxes for PDF files by
+using the option \fB--BBonly\fR\&. However, it cannot produce
+a PDF file, but it can be used together with \fBpdfcrop\fR\&.
 .PP
 Without any argument, ps2eps reads from standard input
 and writes to standard output.
@@ -64,6 +67,16 @@
 \fB-O, --preserveorientation \fR
 do not filter %%Orientation: header comment.
 .TP
+\fB-X, --BBonly \fR
+Just print the resulting bounding box(es) to standard error, no output file is written.
+\fBps2eps\fR will perform a read-only operation. This is highly useful to calculate bounding boxes of
+PDF files. Can be used with option \fB--quiet\fR to suppress other output and
+also with \fB--nohires\fR to suppress output of the HiResBoundingBox.
+It can be used with \fBpdfcrop\fR as follows:
+\fBpdfcrop --gscmd 'gswrap-ps2eps.sh' file.pdf\fR
+where \fBgswrap-ps2eps.sh\fR containts something like
+\fBps2eps -l -X -q $BASH_ARGV\fR
+.TP
 \fB-n, --nofix \fR
 do not try to fix postscript code by filtering some instructions.
 .TP

Modified: trunk/Build/source/utils/ps2eps/ps2eps-src/src/C/bbox.c
===================================================================
--- trunk/Build/source/utils/ps2eps/ps2eps-src/src/C/bbox.c	2021-07-03 17:10:35 UTC (rev 59817)
+++ trunk/Build/source/utils/ps2eps/ps2eps-src/src/C/bbox.c	2021-07-03 17:37:52 UTC (rev 59818)
@@ -1,13 +1,13 @@
 /********************************************************************/
 /** bbox -- calculates Bounding Box of a pbmraw/ppmraw-picture     **/
-/** Created:   Nov. 1997, revised Feb. 1998, Dec. 1999, June 2009  **/
+/** Created:   Nov. 1997, revised 1998, 1999, 2009, 2021           **/
 /** Author:    Roland Bless <roland -at- bless.de>                 **/
-/** Copyright (C) 1998-2009 Roland Bless                           **/
+/** Copyright (C) 1998-2020 Roland Bless                           **/
 /** To compile simply use:                                         **/
 /** "cc bbox.c -o bbox" or "make bbox"                             **/
 /********************************************************************/
 /*
- * $Id: bbox.c,v 1.18 2009-10-13 15:03:49 bless Exp $
+ * $Id: bbox.c 146 2021-03-12 20:26:23Z bless $
  */
 
 /**
@@ -52,10 +52,11 @@
 /**********************
 *  global variables   *
 **********************/
-const char *const version= "$Revision: 1.18 $ $Date: 2009-10-13 15:03:49 $";
+const char *const version= "$Rev: 146 $";
 const char *const prgname= "bbox";
 
 const double round_precision= 1e-6;
+const short int inputlinelength= 1024;
 
 unsigned char bitval[8]=
 {
@@ -103,7 +104,7 @@
                         const unsigned char tight)
 {
 	FILE 	*inputfile;
-        char    inputline[1024];
+        char    inputline[inputlinelength];
         unsigned char magic_found= 0;
         int x,y,byte_x,i;
 	const double pt_dpi_dbl= 72.0;
@@ -129,21 +130,29 @@
           {
             fprintf(stderr,"%s: ERROR -- could not open file %s\n",
                     prgname, name);
-            return;
+            exit(1);
           }
         }
         /** check for magic number **/
         do
         {
-          fgets(inputline, 1024, inputfile);
+		if (fgets(inputline, inputlinelength, inputfile) == NULL) {
+			fprintf(stderr,"%s: ERROR -- unexpected end of file %s\n", prgname, name);
+			fclose(inputfile);
+			exit(1);
+		}
 #ifdef DEBUG
           fprintf(stderr,"read:[%s]\n",inputline);
 #endif
           if ( strcmp(inputline,"P4\n") == 0 )
+          {
             magic_found= 4;
+          }
           else
           if ( strcmp(inputline,"P6\n") == 0 )
+          {
             magic_found= 6;
+          }
         }
         while ( !feof(inputfile) && !magic_found );
 
@@ -151,12 +160,17 @@
         {
           fprintf(stderr,"%s: ERROR -- %s is not in ppmraw or pbmraw format\n",
                   prgname, name);
-          return;
+	  fclose(inputfile);
+	  exit(1);
         }
         /** skip comments **/
         do
         {
-          fgets(inputline, 1024, inputfile);
+	   if (fgets(inputline, inputlinelength, inputfile) == NULL) {
+		   fprintf(stderr,"%s: ERROR -- unexpected end of file %s\n", prgname, name);
+		   fclose(inputfile);
+		   exit(1);
+	   }
 #ifdef DEBUG
           fprintf(stderr,"read:[%s]\n",inputline);
 #endif
@@ -170,8 +184,12 @@
         sscanf(inputline,"%u %u",&width,&height);
         if ( magic_found == 6 ) /* PPM file has maximum color-component value */
         {
-          fgets(inputline, 1024, inputfile);
-          sscanf(inputline,"%u",&ui_colormax);
+	  if (fgets(inputline, inputlinelength, inputfile) == NULL) {
+		  fprintf(stderr,"%s: ERROR -- unexpected end of file %s\n", prgname, name);
+		  fclose(inputfile);
+		  exit(1);
+	  }
+	  sscanf(inputline,"%u",&ui_colormax);
 	  colormax = (unsigned char) ui_colormax; /* this is safer */
         }
 #ifdef DEBUG
@@ -348,7 +366,7 @@
           /* skip the rest of the file if any data is still present */
           while ( !feof(inputfile) )
           {
-            fgets(inputline, 1024, inputfile);
+            fgets(inputline, inputlinelength, inputfile);
           }
 
           /* give out Bounding Box */
@@ -356,7 +374,7 @@
           printf("%%%%HiResBoundingBox: %f %f %f %f\n", hllx, hlly, hurx, hury);
         }
         else
-          fprintf(stderr,"%s: ERROR -- not enough memory to read in one row of the picture\n",prgname);
+          fprintf(stderr,"%s: ERROR -- not enough memory to read in one row of the picture\n", prgname);
 
 	fclose(inputfile);
         free(image_row);



More information about the tex-live-commits mailing list.