Browse Source

Use ANSI escape sequence to reset and clear terminal, rather than using

the (slow) werase().
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
e7cc1c6c35
2 changed files with 2 additions and 2 deletions
  1. 2
    0
      src/hci/mucurses/ansi_screen.c
  2. 0
    2
      src/hci/mucurses/wininit.c

+ 2
- 0
src/hci/mucurses/ansi_screen.c View File

5
 unsigned short _LINES = 25;
5
 unsigned short _LINES = 25;
6
 
6
 
7
 static void ansiscr_init ( struct _curses_screen *scr __unused ) {
7
 static void ansiscr_init ( struct _curses_screen *scr __unused ) {
8
+	/* Reset terminal attributes and clear screen */
9
+	printf ( "\033[0m\033[2J" );
8
 }
10
 }
9
 
11
 
10
 static void ansiscr_exit ( struct _curses_screen *scr __unused ) {
12
 static void ansiscr_exit ( struct _curses_screen *scr __unused ) {

+ 0
- 2
src/hci/mucurses/wininit.c View File

17
 	stdscr->scr->init( stdscr->scr );
17
 	stdscr->scr->init( stdscr->scr );
18
 	stdscr->height = LINES;
18
 	stdscr->height = LINES;
19
 	stdscr->width = COLS;
19
 	stdscr->width = COLS;
20
-	werase( stdscr );
21
-
22
 	return stdscr;
20
 	return stdscr;
23
 }
21
 }
24
 
22
 

Loading…
Cancel
Save