summaryrefslogtreecommitdiff
path: root/sys2ansi.pl
diff options
context:
space:
mode:
authorhpa <hpa>2001-03-28 21:48:30 +0000
committerhpa <hpa>2001-03-28 21:48:30 +0000
commit3255473d905d98e3ca9e0ea96c248ae8d5372bde (patch)
tree296650a0be77613457f7c730834fdb7d26b72904 /sys2ansi.pl
parent19edf5c5bcf2e031f604c89e4d48b72b7bad4f37 (diff)
downloadsyslinux-3255473d905d98e3ca9e0ea96c248ae8d5372bde.tar.gz
Ignore carriage return characters -- same behaviour as syslinux
Diffstat (limited to 'sys2ansi.pl')
-rwxr-xr-xsys2ansi.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys2ansi.pl b/sys2ansi.pl
index bd7fd5ab..d4b47db1 100755
--- a/sys2ansi.pl
+++ b/sys2ansi.pl
@@ -2,6 +2,7 @@
# $Id$
#
# Perl script to convert a Syslinux-format screen to PC-ANSI
+# to display in a color xterm or on the Linux console
#
@ansicol = (0,4,2,6,1,5,3,7);
@@ -25,8 +26,9 @@ while ( read(STDIN, $ch, 1) > 0 ) {
printf "%d;%dm",
$ansicol[$attr >> 4] + 40, $ansicol[$attr & 7] + 30;
}
+ } elsif ( $ch eq "\x0D" ) { # <CR> <Ctrl-M> Carriage return
+ # Ignore
} else {
print $ch;
}
}
-