Use srandomdev

This commit is contained in:
Andrey A. Chernov 1997-09-24 04:53:49 +00:00
parent 659ca5500f
commit 5842a4acb8
3 changed files with 2 additions and 6 deletions

View File

@ -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);

View File

@ -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

View File

@ -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--)