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

Loading…
Cancel
Save