From f78fa3c59d578c46bc3279b5bddbc11a291e994f Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Tue, 27 Jun 2006 17:11:57 +0000 Subject: [PATCH] - working basic ansi termnal extension for mucurses --- src/tests/curses_scr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tests/curses_scr.c b/src/tests/curses_scr.c index 292e534f..6c298976 100644 --- a/src/tests/curses_scr.c +++ b/src/tests/curses_scr.c @@ -23,9 +23,9 @@ void _init_screen( struct _curses_screen *scr __unused ) { } void _exit_screen( struct _curses_screen *scr __unused ) { + printf("%c[1;1H",ESC); + printf("%c[2J",ESC); tcsetattr(fileno(stdin),TCSANOW,&original); - printf("%c[0",ESC); - printf("%c[u",ESC); } 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 ) { // print rendition (character) //printf("char is \"%d\"", c ); putchar( c ); + fflush(stdout); // There must be a better way to do this... } int _getc( struct _curses_screen *scr __unused ) {