git@sv
/
enscript.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Elaborated the --footer option
[enscript.git]
/
scripts
/
sliceprint.in
diff --git
a/scripts/sliceprint.in
b/scripts/sliceprint.in
index b56b8ddebb719ca955085d96a03897525347e600..c542a93dd5a4c45e0bb5b6a62212662b3e647be1 100644
(file)
--- a/
scripts/sliceprint.in
+++ b/
scripts/sliceprint.in
@@
-25,12
+25,13
@@
#
$enscript = "enscript";
#
$enscript = "enscript";
+$ENV{LC_ALL} = "C"; # we parse enscript's output
$program = $0;
$program =~ s/.*\///g;
sub usage {
$program = $0;
$program =~ s/.*\///g;
sub usage {
- warn "Usage: $program [ENSCRIPT_OPTION]... [FILE]...\n";
+ warn "Usage: $program [
-oFILE] [
ENSCRIPT_OPTION]... [FILE]...\n";
}
# Handle arguments.
}
# Handle arguments.
@@
-65,14
+66,15
@@
$slice = 0;
while (1) {
$slice++;
if (defined($output_file)) {
while (1) {
$slice++;
if (defined($output_file)) {
- $cmd = "$enscript" . $args . " --slice=$slice -p"
+ $cmd = "$enscript
" . $args . " --slice=$slice -p"
. $output_file . "." . $slice . " " . $files;
} else {
. $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`;
}
print "printing slice $slice...\n";
$result = `$cmd 2>&1`;
- if ($result !~ ".*lines were.*") {
+ print $result;
+ if ($result !~ ".*line.* were wrapped.*") {
last;
}
}
last;
}
}