Browse Source

- working basic ansi termnal extension for mucurses

tags/v0.9.3
Dan Lynch 18 years ago
parent
commit
f78fa3c59d
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      src/tests/curses_scr.c

+ 3
- 2
src/tests/curses_scr.c View File

@@ -23,9 +23,9 @@ void _init_screen( struct _curses_screen *scr __unused ) {
23 23
 }
24 24
 
25 25
 void _exit_screen( struct _curses_screen *scr __unused ) {
26
+	printf("%c[1;1H",ESC);
27
+	printf("%c[2J",ESC);
26 28
 	tcsetattr(fileno(stdin),TCSANOW,&original);
27
-	printf("%c[0",ESC);
28
-	printf("%c[u",ESC);
29 29
 }
30 30
 
31 31
 void _movetoyx( struct _curses_screen *scr __unused, unsigned int y, unsigned int x ) {
@@ -42,6 +42,7 @@ void _putc( struct _curses_screen *scr __unused, chtype c ) {
42 42
 	// print rendition (character)
43 43
 	//printf("char is \"%d\"", c );
44 44
 	putchar( c );
45
+	fflush(stdout); // There must be a better way to do this...
45 46
 }
46 47
 
47 48
 int _getc( struct _curses_screen *scr __unused ) {

Loading…
Cancel
Save