summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-03-02 00:49:19 +0000
committerKarl Berry <karl@freefriends.org>2008-03-02 00:49:19 +0000
commit4e9fc0e3d53260d7e727bff7669ef14dc9a6b5cf (patch)
tree13d1016777691ed0f0ffc8e891a0556034c21d98 /Master/texmf
parenta06fc6786b17effb92a4606ba6c81f68716ccb73 (diff)
update from ctan -- does it work on windows?
git-svn-id: svn://tug.org/texlive/trunk@6800 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rw-r--r--Master/texmf/scripts/epstopdf/epstopdf.pl69
1 files changed, 21 insertions, 48 deletions
diff --git a/Master/texmf/scripts/epstopdf/epstopdf.pl b/Master/texmf/scripts/epstopdf/epstopdf.pl
index 33dbc01f669..c50dcbbd96d 100644
--- a/Master/texmf/scripts/epstopdf/epstopdf.pl
+++ b/Master/texmf/scripts/epstopdf/epstopdf.pl
@@ -2,6 +2,17 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $
if 0;
use strict;
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
# Change by Thomas Esser, Sept. 1998: The above lines allows us to find
# perl along $PATH rather than guessing a fixed location. The above
# construction should work with most shells.
@@ -64,12 +75,17 @@ use strict;
# * Fixed a horrendous bug in the (atend) handling code
# 2007/01/24 v2.9.6sw (Staszek Wawrykiewicz)
# * patched to work also on Windows
+# 2007/05/15 v2.9.6tp (Theo Papadopoulo)
+# * Simplified the (atend) support
+# 2007/05/18 v.2.9.7gw (Gerben Wierda)
+# * Merged both supplied 2.9.6 versions
+# 2007/07/18 v.2.9.8gw
### program identification
my $program = "epstopdf";
-my $filedate="2007/01/24";
-my $fileversion="2.9.6sw";
-my $copyright = "Copyright 1998-2007 by Sebastian Rahtz et al.";
+my $filedate="2007/05/18";
+my $fileversion="2.9.8gw";
+my $copyright = "Copyright 1998-2001 by Sebastian Rahtz et al., 2002-2007 by Gerben Wierda et al. Free software under a BSD-style license.";
my $title = "\U$program\E $fileversion, $filedate - $copyright\n";
### ghostscript command name
@@ -218,7 +234,6 @@ else {
my $buf;
my $buflen;
my @bufarray;
-my @parsedbufarray; # for mytell/myseek
my $bufarraypos;
# We assume 2048 is big enough.
@@ -272,7 +287,6 @@ if ($buflen > 0) {
sub getline {
if ($#bufarray >= 0) {
$_ = shift( @bufarray);
- unshift( @parsedbufarray, $_); # for myseek and mytell
$bufarraypos += length( $_);
# debug "getline from array. bufarraypos = $bufarraypos";
# debug "*** READ: $_";
@@ -283,47 +297,6 @@ sub getline {
return( defined( $_));
}
-### mytell and myseek, work on <IN> only
-sub mytell {
- if ($#bufarray) {
- # debug "Telling ARRAY position $bufarraypos";
- return $bufarraypos;
- }
- else {
- my $pos = tell( IN);
- # debug "Telling FILE position $pos";
- return $pos;
- }
-}
-
-sub myseek {
- my $pos = shift;
- # debug "Seeking to position $pos in input";
- if ($pos < $buflen) {
- # debug "myseek position $pos < buffer size $buflen";
- # We were still parsing the array, reset to the end of buf and
- # move to the right line in the array.
- # Now, move stuff from the @parsedbufarray back until we are back at $pos
- my $tmpline;
- while ($bufarraypos > $pos) {
- # debug "myseek bufarray position $bufarraypos > position $pos";
- # we test on parsedbufarray to prevent an infinite loop on
- # a programming error (DEVELOP only)
- die "Programming error 1\n" unless $#parsedbufarray;
- $tmpline = shift( @parsedbufarray);
- $bufarraypos -= length( $tmpline);
- unshift( @bufarray, $tmpline);
- debug "*** UNREAD: $tmpline";
- }
- # debug "Returning to ARRAY size position $buflen (bufarraypos = $bufarraypos)";
- return seek( IN, $buflen, 0);
- }
- else {
- # debug "Seeking to FILE position $pos";
- return seek( IN, $pos, 0);
- }
-}
-
### scan first line
my $header = 0;
getline();
@@ -381,7 +354,7 @@ if ($header) {
"with option --filter";
last;
}
- my $pos = mytell();
+ my $pos = tell(OUT)+length($_);
debug "Current file position:", $pos;
# looking for %%BoundingBox
@@ -400,7 +373,7 @@ if ($header) {
}
# go back
- myseek( $pos) or error "Cannot go back to line \"$BBName (atend)\"";
+ seek( IN, $pos, 0) or error "Cannot go back to line \"$BBName (atend)\"";
last;
}