diff options
author | Roger Leigh <rleigh@debian.org> | 2008-10-26 16:11:05 +0000 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2008-10-26 16:11:05 +0000 |
commit | 3b59bb0a607ec27ea60f07d1cd5d1bbb4483c832 (patch) | |
tree | c119edaa8374e7b6387de7aa7d65b143732af5db /test/parse-escp2 | |
parent | eb5718390731a9746c556317e641320b671f2091 (diff) |
Imported Upstream version 4.2.7
Diffstat (limited to 'test/parse-escp2')
-rwxr-xr-x | test/parse-escp2 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/parse-escp2 b/test/parse-escp2 index 40163eb..50f2c14 100755 --- a/test/parse-escp2 +++ b/test/parse-escp2 @@ -55,6 +55,7 @@ sub do_remote_command { while (substr($stuff, 0, 2) =~ /[A-Z0-9][A-Z0-9]/) { print "\n"; printf "%08x ", $curpos; + my ($cmd) = substr($stuff, 0, 2); print substr($stuff, 0, 2); substr($stuff, 0, 2) = ""; $curpos += 2; @@ -62,7 +63,11 @@ sub do_remote_command { $nlchar = unpack("C", $lchar); $hchar = substr($stuff, 1, 1); $nhchar = unpack("C", $hchar); - $skipchars = ($nhchar * 256) + $nlchar; + if ($cmd eq "DF") { + $skipchars = 0; + } else { + $skipchars = ($nhchar * 256) + $nlchar; + } printf "%02x %02x ", $nlchar, $nhchar; substr($stuff, 0, 2) = ""; $curpos += 2; |