summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-09-24 04:53:49 +0000
committerache <ache@FreeBSD.org>1997-09-24 04:53:49 +0000
commit78f940e7b6b86220067ab198dfa3128c67511d5b (patch)
treef6b7022ff06414438a544bba4df3535698ce0626
parent297678a001aafa7f8ae3bc00b18772b660f9c510 (diff)
downloadFreeBSD-src-78f940e7b6b86220067ab198dfa3128c67511d5b.zip
FreeBSD-src-78f940e7b6b86220067ab198dfa3128c67511d5b.tar.gz
Use srandomdev
-rw-r--r--games/mille/mille.c6
-rw-r--r--games/mille/mille.h1
-rw-r--r--games/mille/roll.c1
3 files changed, 2 insertions, 6 deletions
diff --git a/games/mille/mille.c b/games/mille/mille.c
index ccde952..e9789b4 100644
--- a/games/mille/mille.c
+++ b/games/mille/mille.c
@@ -94,11 +94,7 @@ reg char *av[]; {
leaveok(Score, TRUE);
leaveok(Miles, TRUE);
clearok(curscr, TRUE);
-# ifndef PROF
- srandom(getpid());
-# else
- srandom(0);
-# endif
+ srandomdev();
crmode();
noecho();
signal(SIGINT, rub);
diff --git a/games/mille/mille.h b/games/mille/mille.h
index 7d146b2..49a7bd2 100644
--- a/games/mille/mille.h
+++ b/games/mille/mille.h
@@ -37,6 +37,7 @@
# include <ctype.h>
# include <curses.h>
# include <string.h>
+# include <stdlib.h>
/*
* @(#)mille.h 1.1 (Berkeley) 4/1/82
diff --git a/games/mille/roll.c b/games/mille/roll.c
index 4500920..31ac766 100644
--- a/games/mille/roll.c
+++ b/games/mille/roll.c
@@ -48,7 +48,6 @@ roll(ndie, nsides)
reg int ndie, nsides; {
reg int tot;
- extern unsigned int random();
tot = 0;
while (ndie--)
OpenPOWER on IntegriCloud