浏览代码

- working basic ansi termnal extension for mucurses

tags/v0.9.3
Dan Lynch 19 年前
父节点
当前提交
f78fa3c59d
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3
    2
      src/tests/curses_scr.c

+ 3
- 2
src/tests/curses_scr.c 查看文件

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 ) {

正在加载...
取消
保存