summaryrefslogtreecommitdiff
path: root/snow.c
diff options
context:
space:
mode:
Diffstat (limited to 'snow.c')
-rw-r--r--snow.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/snow.c b/snow.c
index 1b67f59..3df5068 100644
--- a/snow.c
+++ b/snow.c
@@ -16,6 +16,7 @@
*/
#include <sys/ioctl.h>
+#include <sys/param.h>
#include <sys/queue.h>
#include <curses.h>
#include <signal.h>
@@ -37,6 +38,7 @@ TAILQ_HEAD(, particle) head;
extern int LINES;
extern int COLS;
static int d_flag = 0;
+
char flake[] = ".*#";
void
@@ -87,7 +89,7 @@ main()
pp->dy = random() % 3;
pp->y = 0;
pp->x = random() % COLS;
- pp->c = flake[random() % 3];
+ pp->c = flake[random() % nitems(flake)];
TAILQ_INSERT_HEAD(&head, pp, link);
refresh();