diff options
author | Michael Brown | 2006-12-20 02:30:40 +0100 |
---|---|---|
committer | Michael Brown | 2006-12-20 02:30:40 +0100 |
commit | 82ec3fc5ccfcd32c8a08ec6591f855fbe7686c1b (patch) | |
tree | c27de41e3448de84537cf258bdc78380d61dce69 /src/hci/mucurses | |
parent | Add "exit --help" to preempt the pedants. (diff) | |
download | ipxe-82ec3fc5ccfcd32c8a08ec6591f855fbe7686c1b.tar.gz ipxe-82ec3fc5ccfcd32c8a08ec6591f855fbe7686c1b.tar.xz ipxe-82ec3fc5ccfcd32c8a08ec6591f855fbe7686c1b.zip |
Reset screen on exit as well as entry
Diffstat (limited to 'src/hci/mucurses')
-rw-r--r-- | src/hci/mucurses/ansi_screen.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/hci/mucurses/ansi_screen.c b/src/hci/mucurses/ansi_screen.c index b230b2b5..aef86f41 100644 --- a/src/hci/mucurses/ansi_screen.c +++ b/src/hci/mucurses/ansi_screen.c @@ -4,7 +4,7 @@ unsigned short _COLS = 80; unsigned short _LINES = 24; -static void ansiscr_init ( struct _curses_screen *scr ) { +static void ansiscr_reset ( struct _curses_screen *scr ) { /* Reset terminal attributes and clear screen */ scr->attrs = 0; scr->curs_x = 0; @@ -12,9 +12,6 @@ static void ansiscr_init ( struct _curses_screen *scr ) { printf ( "\033[0m\033[2J\033[1;1H" ); } -static void ansiscr_exit ( struct _curses_screen *scr __unused ) { -} - static void ansiscr_movetoyx ( struct _curses_screen *scr, unsigned int y, unsigned int x ) { if ( ( x != scr->curs_x ) || ( y != scr->curs_y ) ) { @@ -60,8 +57,8 @@ static bool ansiscr_peek ( struct _curses_screen *scr __unused ) { } SCREEN _ansi_screen = { - .init = ansiscr_init, - .exit = ansiscr_exit, + .init = ansiscr_reset, + .exit = ansiscr_reset, .movetoyx = ansiscr_movetoyx, .putc = ansiscr_putc, .getc = ansiscr_getc, |