Module Name: src
Committed By: ahoka
Date: Sat Dec 19 19:27:53 UTC 2009
Modified Files:
src/games/tetris: screen.c
Log Message:
Hide the cursor during the game.
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/games/tetris/screen.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/tetris/screen.c
diff -u src/games/tetris/screen.c:1.24 src/games/tetris/screen.c:1.25
--- src/games/tetris/screen.c:1.24 Wed Aug 12 08:51:21 2009
+++ src/games/tetris/screen.c Sat Dec 19 19:27:53 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: screen.c,v 1.24 2009/08/12 08:51:21 dholland Exp $ */
+/* $NetBSD: screen.c,v 1.25 2009/12/19 19:27:53 ahoka Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -84,7 +84,9 @@
*LLstr, /* last line, first column */
*pcstr, /* pad character */
*TEstr, /* end cursor motion mode */
- *TIstr; /* begin cursor motion mode */
+ *TIstr, /* begin cursor motion mode */
+ *VIstr, /* make cursor invisible */
+ *VEstr; /* make cursor appear normal */
char
*SEstr, /* end standout mode */
*SOstr; /* begin standout mode */
@@ -111,6 +113,8 @@
{"so", &SOstr},
{"te", &TEstr},
{"ti", &TIstr},
+ {"vi", &VIstr},
+ {"ve", &VEstr},
{"up", &UP}, /* cursor up */
{ {0}, NULL}
};
@@ -299,6 +303,8 @@
*/
if (TIstr)
putstr(TIstr); /* termcap(5) says this is not padded */
+ if (VIstr)
+ putstr(VIstr); /* termcap(5) says this is not padded */
if (tstp != SIG_IGN)
(void) signal(SIGTSTP, scr_stop);
if (ttou != SIG_IGN)
@@ -329,6 +335,8 @@
/* exit screen mode */
if (TEstr)
putstr(TEstr); /* termcap(5) says this is not padded */
+ if (VEstr)
+ putstr(VEstr); /* termcap(5) says this is not padded */
(void) fflush(stdout);
(void) tcsetattr(0, TCSADRAIN, &oldtt);
isset = 0;