projects
/
Printer-Zebra.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
43a8a9f
)
implement ! fill one to end of line compression
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 5 Feb 2012 18:21:47 +0000
(19:21 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 5 Feb 2012 18:21:47 +0000
(19:21 +0100)
ZPL2pbm.pl
patch
|
blob
|
history
diff --git
a/ZPL2pbm.pl
b/ZPL2pbm.pl
index
860f28b
..
e439ae4
100755
(executable)
--- a/
ZPL2pbm.pl
+++ b/
ZPL2pbm.pl
@@
-44,6
+44,11
@@
while( $line ) {
$l = $w * 2 if $l == 0;
warn "# $p ZERO-to-EOL $c [$l]\n";
$out .= "0" x $l;
+ } elsif ( $c eq '!' ) {
+ my $l = ( $w * 2 ) - length($out) % ( $w * 2 );
+ $l = $w * 2 if $l == 0;
+ warn "# $p ONE-to-EOL $c [$l]\n";
+ $out .= "1" x $l;
} elsif ( $c eq ':' ) {
$out .= length($out) > $w ? substr($out,-$w*2) : "00" x $w;
warn "# $p :\n";