Use srandomdev
This commit is contained in:
parent
659ca5500f
commit
5842a4acb8
@ -94,11 +94,7 @@ reg char *av[]; {
|
|||||||
leaveok(Score, TRUE);
|
leaveok(Score, TRUE);
|
||||||
leaveok(Miles, TRUE);
|
leaveok(Miles, TRUE);
|
||||||
clearok(curscr, TRUE);
|
clearok(curscr, TRUE);
|
||||||
# ifndef PROF
|
srandomdev();
|
||||||
srandom(getpid());
|
|
||||||
# else
|
|
||||||
srandom(0);
|
|
||||||
# endif
|
|
||||||
crmode();
|
crmode();
|
||||||
noecho();
|
noecho();
|
||||||
signal(SIGINT, rub);
|
signal(SIGINT, rub);
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
# include <ctype.h>
|
# include <ctype.h>
|
||||||
# include <curses.h>
|
# include <curses.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
|
# include <stdlib.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @(#)mille.h 1.1 (Berkeley) 4/1/82
|
* @(#)mille.h 1.1 (Berkeley) 4/1/82
|
||||||
|
@ -48,7 +48,6 @@ roll(ndie, nsides)
|
|||||||
reg int ndie, nsides; {
|
reg int ndie, nsides; {
|
||||||
|
|
||||||
reg int tot;
|
reg int tot;
|
||||||
extern unsigned int random();
|
|
||||||
|
|
||||||
tot = 0;
|
tot = 0;
|
||||||
while (ndie--)
|
while (ndie--)
|
||||||
|
Loading…
Reference in New Issue
Block a user