aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/test/rain.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2000-01-26 16:43:25 +0000
committerPeter Wemm <peter@FreeBSD.org>2000-01-26 16:43:25 +0000
commit1759abf3ae1a38b7578df7996346544b66e508ad (patch)
tree506da7a5cf693bf8780ad013837cbd67913bedbb /contrib/ncurses/test/rain.c
parent0e3d540892016a47f6a68ec9ba2879d35ce5f7c2 (diff)
downloadsrc-1759abf3ae1a38b7578df7996346544b66e508ad.tar.gz
src-1759abf3ae1a38b7578df7996346544b66e508ad.zip
Import ncurses-5.0-release to update the 5.0-prerelease that we had.vendor/ncurses/5.0
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=56639 svn path=/vendor/ncurses/5.0/; revision=56641; tag=vendor/ncurses/5.0
Diffstat (limited to 'contrib/ncurses/test/rain.c')
-rw-r--r--contrib/ncurses/test/rain.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/contrib/ncurses/test/rain.c b/contrib/ncurses/test/rain.c
index 4132a43826fe..646ab96ee639 100644
--- a/contrib/ncurses/test/rain.c
+++ b/contrib/ncurses/test/rain.c
@@ -1,5 +1,5 @@
/*
- * $Id: rain.c,v 1.11 1997/09/18 18:36:46 tom Exp $
+ * $Id: rain.c,v 1.13 1999/10/23 01:31:26 tom Exp $
*/
#include <test.priv.h>
@@ -100,6 +100,12 @@ float c;
curs_set(1);
endwin();
return(EXIT_SUCCESS);
+ case 's':
+ nodelay(stdscr, FALSE);
+ break;
+ case ' ':
+ nodelay(stdscr, TRUE);
+ break;
#ifdef KEY_RESIZE
case(KEY_RESIZE):
r = (float)(LINES - 4);
@@ -122,10 +128,6 @@ onsig(int n GCC_UNUSED)
static float
ranf(void)
{
- float rv;
- long r = rand();
-
- r &= 077777;
- rv =((float)r/32767.);
- return rv;
+ long r = (rand() & 077777);
+ return ((float) r / 32768.);
}