Use ANSI escape sequence to reset and clear terminal, rather than using
authorMichael Brown <mcb30@etherboot.org>
Tue, 19 Dec 2006 00:33:36 +0000 (00:33 +0000)
committerMichael Brown <mcb30@etherboot.org>
Tue, 19 Dec 2006 00:33:36 +0000 (00:33 +0000)
the (slow) werase().

src/hci/mucurses/ansi_screen.c
src/hci/mucurses/wininit.c

index c078d60..01fbb8b 100644 (file)
@@ -5,6 +5,8 @@ unsigned short _COLS = 80;
 unsigned short _LINES = 25;
 
 static void ansiscr_init ( struct _curses_screen *scr __unused ) {
+       /* Reset terminal attributes and clear screen */
+       printf ( "\033[0m\033[2J" );
 }
 
 static void ansiscr_exit ( struct _curses_screen *scr __unused ) {
index bfda09c..86ad0fa 100644 (file)
@@ -17,8 +17,6 @@ WINDOW *initscr ( void ) {
        stdscr->scr->init( stdscr->scr );
        stdscr->height = LINES;
        stdscr->width = COLS;
-       werase( stdscr );
-
        return stdscr;
 }