summaryrefslogtreecommitdiff
path: root/games/worms
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>1999-10-29 03:59:07 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>1999-10-29 03:59:07 +0000
commit3031e759e4f1015a4d016f6d1d288472d6e7f1dd (patch)
treec1efd8faf4c8470ab86f1e338305d50775740276 /games/worms
parentada8046059288501276f4440523f531e7de5f58a (diff)
srandom() for variety.
Diffstat (limited to 'games/worms')
-rw-r--r--games/worms/worms.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/games/worms/worms.c b/games/worms/worms.c
index 72b834d2cf1..b5c0296209a 100644
--- a/games/worms/worms.c
+++ b/games/worms/worms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: worms.c,v 1.8 1998/08/19 07:42:24 pjanzen Exp $ */
+/* $OpenBSD: worms.c,v 1.9 1999/10/29 03:59:06 pjanzen Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)worms.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: worms.c,v 1.8 1998/08/19 07:42:24 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: worms.c,v 1.9 1999/10/29 03:59:06 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -71,6 +71,7 @@ static char rcsid[] = "$OpenBSD: worms.c,v 1.8 1998/08/19 07:42:24 pjanzen Exp $
#include <stdio.h>
#include <stdlib.h>
#include <term.h>
+#include <time.h>
#include <unistd.h>
static struct options {
@@ -254,6 +255,7 @@ main(argc, argv)
exit(1);
}
+ srandom(time((time_t *)NULL));
if (!(term = getenv("TERM"))) {
(void)fprintf(stderr, "worms: no TERM environment variable.\n");
exit(1);