|
@@ -4,7 +4,7 @@
|
4
|
4
|
unsigned short _COLS = 80;
|
5
|
5
|
unsigned short _LINES = 24;
|
6
|
6
|
|
7
|
|
-static void ansiscr_init ( struct _curses_screen *scr ) {
|
|
7
|
+static void ansiscr_reset ( struct _curses_screen *scr ) {
|
8
|
8
|
/* Reset terminal attributes and clear screen */
|
9
|
9
|
scr->attrs = 0;
|
10
|
10
|
scr->curs_x = 0;
|
|
@@ -12,9 +12,6 @@ static void ansiscr_init ( struct _curses_screen *scr ) {
|
12
|
12
|
printf ( "\033[0m\033[2J\033[1;1H" );
|
13
|
13
|
}
|
14
|
14
|
|
15
|
|
-static void ansiscr_exit ( struct _curses_screen *scr __unused ) {
|
16
|
|
-}
|
17
|
|
-
|
18
|
15
|
static void ansiscr_movetoyx ( struct _curses_screen *scr,
|
19
|
16
|
unsigned int y, unsigned int x ) {
|
20
|
17
|
if ( ( x != scr->curs_x ) || ( y != scr->curs_y ) ) {
|
|
@@ -60,8 +57,8 @@ static bool ansiscr_peek ( struct _curses_screen *scr __unused ) {
|
60
|
57
|
}
|
61
|
58
|
|
62
|
59
|
SCREEN _ansi_screen = {
|
63
|
|
- .init = ansiscr_init,
|
64
|
|
- .exit = ansiscr_exit,
|
|
60
|
+ .init = ansiscr_reset,
|
|
61
|
+ .exit = ansiscr_reset,
|
65
|
62
|
.movetoyx = ansiscr_movetoyx,
|
66
|
63
|
.putc = ansiscr_putc,
|
67
|
64
|
.getc = ansiscr_getc,
|