enscript (1.6.4-11) unstable; urgency=low

  * sliceprint: fix enscript call (program was completely broken), and
    complete manpage (Closes: #393791).

 -- Christoph Berg <myon@debian.org>  Wed, 25 Oct 2006 02:21:08 +0200

--- enscript-1.6.4.orig/scripts/sliceprint.in
+++ enscript-1.6.4/scripts/sliceprint.in
@@ -27,12 +27,13 @@
 #
 
 $enscript = "enscript";
+$ENV{LC_ALL} = "C"; # we parse enscript's output
 
 $program = $0;
 $program =~ s/.*\///g;
 
 sub usage {
-    warn "Usage: $program [ENSCRIPT_OPTION]... [FILE]...\n";
+    warn "Usage: $program [-oFILE] [ENSCRIPT_OPTION]... [FILE]...\n";
 }
 
 # Handle arguments.
@@ -67,14 +68,15 @@
 while (1) {
     $slice++;
     if (defined($output_file)) {
-	$cmd = "$enscript" . $args . " --slice=$slice -p"
+	$cmd = "$enscript " . $args . " --slice=$slice -p"
 	    . $output_file . "." . $slice . " " . $files;
     } else {
-	$cmd = "$enscript" . $args . " --slice=$slice" . $files;
+	$cmd = "$enscript " . $args . " --slice=$slice" . $files;
     }
     print "printing slice $slice...\n";
     $result = `$cmd 2>&1`;
-    if ($result !~ ".*lines were.*") {
+    print $result;
+    if ($result !~ ".*line.* were wrapped.*") {
 	last;
     }
 }
only in patch2:
unchanged:
--- enscript-1.6.4.orig/scripts/sliceprint.1
+++ enscript-1.6.4/scripts/sliceprint.1
@@ -25,12 +25,12 @@
 sliceprint \- slice documents with long lines.
 
 .SH SYNOPSIS
-.B sliceprint \f1[\f2enscript_options\f1]\f3 \f1[\f2files\f1]\f3
+.B sliceprint \f1[\-o\f2file\f1]\f3 \f1[\f2enscript_options\f1]\f3 \f1[\f2files\f1]\f3
 
 .SH DESCRIPTION
 
-XXX
-
+\f3Sliceprint\f1 is a wrapper around the \f3enscript(1)\f1\ \-\-slice option.
+Output slices are written to \f2file\f1.1, \f2file\f1.2 and so on.
 
 .SH SEE ALSO
 enscript(1)
