aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-01-24 11:07:08 +0000
committerMatt Fleming <matt.fleming@intel.com>2013-01-24 11:09:27 +0000
commit6911cf7e57a870f887042ccb4c580165d868d25c (patch)
tree129ac31fb2aaca4c356be8240fe07d4f21ee768a /com32/elflink
parent7c42c59ebd9d33efe3a5f12542580a8c1379447d (diff)
downloadsyslinux-6911cf7e57a870f887042ccb4c580165d868d25c.tar.gz
syslinux-6911cf7e57a870f887042ccb4c580165d868d25c.tar.xz
syslinux-6911cf7e57a870f887042ccb4c580165d868d25c.zip
ldlinux: Clear screen on ASCII 12 (form feed) in DISPLAY file
The ansi code won't handle \f the way we want, so we need to explicitly clear the screen and reset the cursor position, like the old 4.x code. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/elflink')
-rw-r--r--com32/elflink/ldlinux/msg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/com32/elflink/ldlinux/msg.c b/com32/elflink/ldlinux/msg.c
index 2efcc792..46927168 100644
--- a/com32/elflink/ldlinux/msg.c
+++ b/com32/elflink/ldlinux/msg.c
@@ -89,6 +89,11 @@ static inline void msg_ctrl_o(void)
NextCharJump = msg_setbg;
}
+static void msg_formfeed(void)
+{
+ printf("\033[2J\033[H");
+}
+
static void msg_novga(void)
{
syslinux_force_text_mode();
@@ -191,6 +196,9 @@ static void msg_putchar(uint8_t ch)
break;
case 0x0D: /* Ignore <CR> */
break;
+ case 0x0C: /* <FF> = clear screen */
+ msg_formfeed();
+ break;
case 0x19: /* <EM> = return to text mode */
msg_novga();
break;