/*
- * $Id: rain.c,v 1.11 1997/09/18 18:36:46 tom Exp $
+ * $Id: rain.c,v 1.14 1999/11/13 23:39:07 tom Exp $
*/
#include <test.priv.h>
if (has_colors()) {
int bg = COLOR_BLACK;
start_color();
-#ifdef NCURSES_VERSION
+#ifdef HAVE_USE_DEFAULT_COLORS
if (use_default_colors() == OK)
bg = -1;
#endif
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);
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.);
}