From 3aeb29356b1d04adbcb9f01be35923d17a46a6c7 Mon Sep 17 00:00:00 2001 From: hpa Date: Fri, 5 Mar 1999 15:08:35 +0000 Subject: [PATCH] Bug fixes. --- sys2ansi.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys2ansi.pl b/sys2ansi.pl index bcd07cc..5a0c1ca 100755 --- a/sys2ansi.pl +++ b/sys2ansi.pl @@ -1,13 +1,16 @@ #!/usr/bin/perl +# $Id$ # # Perl script to convert a Syslinux-format screen to PC-ANSI # @ansicol = (0,4,2,6,1,5,3,7); while ( read(STDIN, $ch, 1) > 0 ) { - if ( $ch == '\x1A' ) { # EOF + if ( $ch eq "\x1A" ) { # EOF last; - } elsif ( $ch == '\x13' ) { # Attribute change + } elsif ( $ch eq "\x0C" ) { # Clear screen + print "\x1b[2J"; + } elsif ( $ch eq "\x0F" ) { # Attribute change if ( read(STDIN, $attr, 2) == 2 ) { $attr = hex $attr; print "\x1b[0;"; -- 2.7.4