summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>2000-01-21 07:10:40 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>2000-01-21 07:10:40 +0000
commitfe82135071dcc362271ce7ec3bd50fcb3dc37506 (patch)
tree62d23505fbb775f9bbf9b63a7564c1fdf45324e9 /games
parenta52e1c95da50bb837af5115ddd64acadbaac607b (diff)
Hide cursor if possible
Diffstat (limited to 'games')
-rw-r--r--games/grdc/grdc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/games/grdc/grdc.c b/games/grdc/grdc.c
index 0b6f2d28c0e..487e7ea1c71 100644
--- a/games/grdc/grdc.c
+++ b/games/grdc/grdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grdc.c,v 1.6 2000/01/20 12:31:33 d Exp $ */
+/* $OpenBSD: grdc.c,v 1.7 2000/01/21 07:10:39 pjanzen Exp $ */
/*
* Grand digital clock for curses compatible terminals
* Usage: grdc [-s] [n] -- run for n seconds (default infinity)
@@ -58,6 +58,7 @@ main(argc, argv)
int n = 0;
struct timeval nowtv;
struct timespec delay;
+ char *hc;
/* revoke privs */
setegid(getgid());
@@ -82,6 +83,9 @@ main(argc, argv)
attrset(COLOR_PAIR(2));
}
+ if ((hc = tigetstr("civis")) != 0 && hc != (char *)-1)
+ putp(hc);
+
clear();
refresh();
while(--argc > 0) {
@@ -164,6 +168,8 @@ main(argc, argv)
if (sigtermed) {
standend();
+ if ((hc = tigetstr("cnorm")) > 0 && hc != (char *)-1)
+ putp(hc);
clear();
refresh();
endwin();
@@ -172,6 +178,8 @@ main(argc, argv)
}
} while(--n);
standend();
+ if ((hc = tigetstr("cnorm")) > 0 && hc != (char *)-1)
+ putp(hc);
clear();
refresh();
endwin();
@@ -215,4 +223,3 @@ movto(int line, int col)
{
move(line, col);
}
-