summaryrefslogtreecommitdiff
path: root/Build/source/utils
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2021-07-03 17:37:52 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2021-07-03 17:37:52 +0000
commitbdf9538e0059f4eb2f16b808c9b8f18ec6db045c (patch)
treeb3a5003327fe9e824edf0976ceb9bf927e75066e /Build/source/utils
parent82aec187d20c4cb1129672000486a9c581fb2351 (diff)
ps2eps-1.70
git-svn-id: svn://tug.org/texlive/trunk@59818 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils')
-rw-r--r--Build/source/utils/README2
-rw-r--r--Build/source/utils/ps2eps/ChangeLog5
-rw-r--r--Build/source/utils/ps2eps/TLpatches/ChangeLog5
-rw-r--r--Build/source/utils/ps2eps/TLpatches/TL-Changes6
-rw-r--r--Build/source/utils/ps2eps/TLpatches/patch-01-warnings12
-rw-r--r--Build/source/utils/ps2eps/TLpatches/patch-02-WIN32-bug8
-rw-r--r--Build/source/utils/ps2eps/TLpatches/patch-03-PERL6
-rw-r--r--Build/source/utils/ps2eps/TLpatches/patch-04-whitespace59
-rw-r--r--Build/source/utils/ps2eps/TLpatches/patch-05-write-bin8
-rw-r--r--Build/source/utils/ps2eps/TLpatches/patch-06-unused28
-rwxr-xr-xBuild/source/utils/ps2eps/configure20
-rw-r--r--Build/source/utils/ps2eps/configure.ac2
-rw-r--r--Build/source/utils/ps2eps/ps2eps-src/Changes.txt13
-rw-r--r--Build/source/utils/ps2eps/ps2eps-src/Latest_is_1.70 (renamed from Build/source/utils/ps2eps/ps2eps-src/Latest_is_1.68)0
-rw-r--r--Build/source/utils/ps2eps/ps2eps-src/README.txt2
-rwxr-xr-xBuild/source/utils/ps2eps/ps2eps-src/bin/ps2eps.pl25
-rw-r--r--Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/bbox.12
-rw-r--r--Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/ps2eps.119
-rw-r--r--Build/source/utils/ps2eps/ps2eps-src/src/C/bbox.c44
19 files changed, 149 insertions, 117 deletions
diff --git a/Build/source/utils/README b/Build/source/utils/README
index 652ab95421c..7c9b8c94554 100644
--- a/Build/source/utils/README
+++ b/Build/source/utils/README
@@ -26,7 +26,7 @@ m-tx 0.63a - checked 29apr18
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
diff --git a/Build/source/utils/ps2eps/ChangeLog b/Build/source/utils/ps2eps/ChangeLog
index a1cc4564ae6..db4fe38803f 100644
--- a/Build/source/utils/ps2eps/ChangeLog
+++ b/Build/source/utils/ps2eps/ChangeLog
@@ -1,3 +1,8 @@
+2021-07-03 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ Import ps2eps-1.70.
+ * configure.ac: version 1.70.
+
2016-02-22 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* Makefile.am, configure.ac: New convention.
diff --git a/Build/source/utils/ps2eps/TLpatches/ChangeLog b/Build/source/utils/ps2eps/TLpatches/ChangeLog
index d5ec275323f..e56cf176b42 100644
--- a/Build/source/utils/ps2eps/TLpatches/ChangeLog
+++ b/Build/source/utils/ps2eps/TLpatches/ChangeLog
@@ -1,3 +1,8 @@
+2021-07-03 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ Import ps2eps-1.70, patches adapted.
+ * patch-06-unused (removed): Fixed upstream.
+
2012-12-07 Peter Breitenlohner <peb@mppmu.mpg.de>
* patch-06-unused (new): Drop unused variable (gcc-4.6 warning).
diff --git a/Build/source/utils/ps2eps/TLpatches/TL-Changes b/Build/source/utils/ps2eps/TLpatches/TL-Changes
index 4384be0aad6..e34d3936d65 100644
--- a/Build/source/utils/ps2eps/TLpatches/TL-Changes
+++ b/Build/source/utils/ps2eps/TLpatches/TL-Changes
@@ -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 @@ Remove:
bin/win32/
doc/html/
doc/pdf/
-
+ src/C/Makefile
diff --git a/Build/source/utils/ps2eps/TLpatches/patch-01-warnings b/Build/source/utils/ps2eps/TLpatches/patch-01-warnings
index 254cc12007e..bafc667c364 100644
--- a/Build/source/utils/ps2eps/TLpatches/patch-01-warnings
+++ b/Build/source/utils/ps2eps/TLpatches/patch-01-warnings
@@ -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 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
{
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 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
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
diff --git a/Build/source/utils/ps2eps/TLpatches/patch-02-WIN32-bug b/Build/source/utils/ps2eps/TLpatches/patch-02-WIN32-bug
index febf91d94ac..dac234e9777 100644
--- a/Build/source/utils/ps2eps/TLpatches/patch-02-WIN32-bug
+++ b/Build/source/utils/ps2eps/TLpatches/patch-02-WIN32-bug
@@ -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)
diff --git a/Build/source/utils/ps2eps/TLpatches/patch-03-PERL b/Build/source/utils/ps2eps/TLpatches/patch-03-PERL
index a87d185c1ed..b673cbb8f0a 100644
--- a/Build/source/utils/ps2eps/TLpatches/patch-03-PERL
+++ b/Build/source/utils/ps2eps/TLpatches/patch-03-PERL
@@ -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;
diff --git a/Build/source/utils/ps2eps/TLpatches/patch-04-whitespace b/Build/source/utils/ps2eps/TLpatches/patch-04-whitespace
index 22271309343..2d1cd15abc7 100644
--- a/Build/source/utils/ps2eps/TLpatches/patch-04-whitespace
+++ b/Build/source/utils/ps2eps/TLpatches/patch-04-whitespace
@@ -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,14 +42,13 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
* 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;
- 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,16 +68,16 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
- 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 **/
- 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 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
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 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
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 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
*/
/* 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 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
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 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
} /* 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 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
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 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
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 @@ diff -ur ps2eps-1.68.orig/src/C/bbox.c ps2eps-1.68/src/C/bbox.c
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);
diff --git a/Build/source/utils/ps2eps/TLpatches/patch-05-write-bin b/Build/source/utils/ps2eps/TLpatches/patch-05-write-bin
index d16ce672e4f..f2b488edd6a 100644
--- a/Build/source/utils/ps2eps/TLpatches/patch-05-write-bin
+++ b/Build/source/utils/ps2eps/TLpatches/patch-05-write-bin
@@ -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);
diff --git a/Build/source/utils/ps2eps/TLpatches/patch-06-unused b/Build/source/utils/ps2eps/TLpatches/patch-06-unused
deleted file mode 100644
index 31f6ef217bf..00000000000
--- a/Build/source/utils/ps2eps/TLpatches/patch-06-unused
+++ /dev/null
@@ -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 );
-
diff --git a/Build/source/utils/ps2eps/configure b/Build/source/utils/ps2eps/configure
index d6fea74a74e..0809a0f64a6 100755
--- a/Build/source/utils/ps2eps/configure
+++ b/Build/source/utils/ps2eps/configure
@@ -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@tug.org>.
#
@@ -610,8 +610,8 @@ MAKEFLAGS=
# 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@tug.org'
PACKAGE_URL=''
@@ -1278,7 +1278,7 @@ if test "$ac_init_help" = "long"; then
# 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 @@ fi
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 @@ fi
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 @@ cat >config.log <<_ACEOF
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 @@ fi
# 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 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# 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 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
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\\"
diff --git a/Build/source/utils/ps2eps/configure.ac b/Build/source/utils/ps2eps/configure.ac
index 5c0264a42a3..7917842e062 100644
--- a/Build/source/utils/ps2eps/configure.ac
+++ b/Build/source/utils/ps2eps/configure.ac
@@ -6,7 +6,7 @@ dnl This file is free software; the copyright holder
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@tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([ps2eps-src/bin/ps2eps.pl])
diff --git a/Build/source/utils/ps2eps/ps2eps-src/Changes.txt b/Build/source/utils/ps2eps/ps2eps-src/Changes.txt
index ef0c46602cd..669bbcc92df 100644
--- a/Build/source/utils/ps2eps/ps2eps-src/Changes.txt
+++ b/Build/source/utils/ps2eps/ps2eps-src/Changes.txt
@@ -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 @@ revision 1.32 (not released)
-------------
date: 2001/04/06 22:31:27
- Fixed case sensitiveness when checking for suffix replacement
- (thanks to Erik Jørgensen)
+ (thanks to Erik Jørgensen)
----------------------------
revision 1.31
-------------
diff --git a/Build/source/utils/ps2eps/ps2eps-src/Latest_is_1.68 b/Build/source/utils/ps2eps/ps2eps-src/Latest_is_1.70
index e69de29bb2d..e69de29bb2d 100644
--- a/Build/source/utils/ps2eps/ps2eps-src/Latest_is_1.68
+++ b/Build/source/utils/ps2eps/ps2eps-src/Latest_is_1.70
diff --git a/Build/source/utils/ps2eps/ps2eps-src/README.txt b/Build/source/utils/ps2eps/ps2eps-src/README.txt
index 0f9784de357..7e961c2714e 100644
--- a/Build/source/utils/ps2eps/ps2eps-src/README.txt
+++ b/Build/source/utils/ps2eps/ps2eps-src/README.txt
@@ -14,7 +14,7 @@ UPDATES
=======
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:
diff --git a/Build/source/utils/ps2eps/ps2eps-src/bin/ps2eps.pl b/Build/source/utils/ps2eps/ps2eps-src/bin/ps2eps.pl
index 7daa8752bff..dfa32b4d8a9 100755
--- a/Build/source/utils/ps2eps/ps2eps-src/bin/ps2eps.pl
+++ b/Build/source/utils/ps2eps/ps2eps-src/bin/ps2eps.pl
@@ -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 @@ else
$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 @@ $trytofixps= 1; # try to fix postscript code
$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 @@ $licensetxt= "\
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 @@ $licensetxt= "\
" 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 @@ $licensetxt= "\
" -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 @@ GetOptions('f|force' => \$forceoverwrite,
'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 @@ while ($infname= (shift @filenames))
{
$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 @@ while ($infname= (shift @filenames))
$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;
diff --git a/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/bbox.1 b/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/bbox.1
index 64696f32645..f2454a833d7 100644
--- a/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/bbox.1
+++ b/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/bbox.1
@@ -3,7 +3,7 @@
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@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
diff --git a/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/ps2eps.1 b/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/ps2eps.1
index d74e88ca34f..ee7fb829a74 100644
--- a/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/ps2eps.1
+++ b/Build/source/utils/ps2eps/ps2eps-src/doc/man/man1/ps2eps.1
@@ -3,17 +3,17 @@
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@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 @@ documents. It calculates correct Bounding Boxes for those EPS files and
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 @@ instructions are added around the original postscript code by
\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
diff --git a/Build/source/utils/ps2eps/ps2eps-src/src/C/bbox.c b/Build/source/utils/ps2eps/ps2eps-src/src/C/bbox.c
index 0e5b42224c8..d6bcd83c4ad 100644
--- a/Build/source/utils/ps2eps/ps2eps-src/src/C/bbox.c
+++ b/Build/source/utils/ps2eps/ps2eps-src/src/C/bbox.c
@@ -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 @@ void readppm_and_calcbb(const char *name,
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 @@ void readppm_and_calcbb(const char *name,
{
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 @@ void readppm_and_calcbb(const char *name,
{
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 @@ void readppm_and_calcbb(const char *name,
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 @@ void readppm_and_calcbb(const char *name,
/* 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 @@ void readppm_and_calcbb(const char *name,
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);