Bug#181971: psptools: psplpr loops with --dontincfeatures option
Package: psptools
Version: 1.2.2-7
Severity: normal
Tags: patch
Hi,
Using option "--dontincfeatures" makes psplpr looping:
$ psplpr --dontincfeatures -o - < foo.ps
%!PS-Adobe-2.0
[...]
%%BeginSetup
%%Feature: *Resolution 600dpi
%%Feature: *Resolution 600dpi
%%Feature: *Resolution 600dpi
[... line repeated infinitely ...]
foo.ps is a simple file generated with latex+dvips (which I can
provide if needed).
I tried to trace the problem and found that the following patch solves
the problem. But as I don't speak Perl natively and I have no idea
what psplpr is supposed to do here, I don't know if it is correct.
--- psplpr.pl.in~ Fri Feb 21 14:22:52 2003
+++ psplpr.pl.in Fri Feb 21 21:32:13 2003
@@ -402,7 +402,7 @@
$_ = readpsline($conformant);
};
- while ($_) {
+ for ( ; $_ ; $_ = readpsline($conformant)) {
if (!$code) {
last if (!/^%%/);
}
@@ -476,7 +476,6 @@
}
}
- $_ = readpsline($conformant);
}
return ($_, $ps);
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux dinadan 2.4.19-686 #1 Tue Nov 19 00:52:59 EST 2002 i686
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro
Versions of packages psptools depends on:
ii perl 5.6.1-8.2 Larry Wall's Practical Extraction
--
Arnaud
Reply to: