From 0d5d0f3019746e765e8a0fc418c6687b41001bee Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 26 Sep 2010 21:04:21 +0200 Subject: Deleting useless `psresize2.pl' --- psresize2.pl | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/psresize2.pl b/psresize2.pl index 67e9d4a..0a0910d 100755 --- a/psresize2.pl +++ b/psresize2.pl @@ -4,7 +4,6 @@ use Getopt::Long qw(:config posix_default no_ignore_case gnu_compat bundling auto_version auto_help); use Pod::Usage; -use IPC::Open2; use IPC::Open3; use POSIX qw(floor); use strict; @@ -238,7 +237,7 @@ if (defined $crop) { # cat > $auxfile while () { - print FINAUX $_ or die "Can't print: $!"; + print FINAUX or die "Can't print: $!"; } close FINAUX or die "Can't close: $!"; close FIN or die "Can't close: $!"; @@ -293,12 +292,10 @@ if (defined $crop) { # in background, once the Bounding Box has been read pipe *READ, *WRITE or die "Can't pipe: $!"; - while () { - print WRITE $_; - if ($_ =~ m/^\%\%BoundingBox: (\d+) (\d+) (\d+) (\d+)/) { - @bbox = ($1, $2, $3, $4); - last; - } + while (not (@bbox) && defined (my $l = )) { + print WRITE $l; + @bbox = ($1, $2, $3, $4) + if ($l =~ m/^\%\%BoundingBox: (\d+) (\d+) (\d+) (\d+)/); } die "Cannot guess input page size!" unless @bbox; @@ -309,7 +306,7 @@ if (defined $crop) { close READ or die "Can't close: $!";; while () { - print WRITE $_; + print WRITE; } exit; } @@ -367,7 +364,7 @@ EOF # Body while () { - print FOUT $_ or die "Can't print: $!"; + print FOUT or die "Can't print: $!"; # PStoPSclip hack: increase clipping box by 10 if ($_ =~ m/^userdict\/PStoPSclip{0 0 moveto$/) { -- cgit v1.2.3