From f3087f06ac098064514c3cc4e896d0d63c7697d4 Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 24 Sep 1997 05:28:05 +0000 Subject: Use srandomdev --- games/phantasia/convert.c | 2 +- games/phantasia/include.h | 1 + games/phantasia/main.c | 2 +- games/phantasia/setup.c | 3 +-- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'games/phantasia') diff --git a/games/phantasia/convert.c b/games/phantasia/convert.c index b18c5e9..ace262a 100644 --- a/games/phantasia/convert.c +++ b/games/phantasia/convert.c @@ -56,7 +56,7 @@ FILE *oldcharac, *newcharac; /* to open old and new files */ exit(1); } - srandom((unsigned) time((long *) NULL)); /* prime random numbers */ + srandomdev(); while (fread((char *) &Oldplayer, sizeof(struct oldplayer), 1, oldcharac) == 1) /* read and convert old structures into new */ diff --git a/games/phantasia/include.h b/games/phantasia/include.h index bfaa8a7..812b5a5 100644 --- a/games/phantasia/include.h +++ b/games/phantasia/include.h @@ -9,6 +9,7 @@ #include #include #include +#include #include "macros.h" #include "phantdefs.h" diff --git a/games/phantasia/main.c b/games/phantasia/main.c index 90ddcba..3ed01dd 100644 --- a/games/phantasia/main.c +++ b/games/phantasia/main.c @@ -367,7 +367,7 @@ initialstate() error(_PATH_VOID); /*NOTREACHED*/ - srandom((unsigned) time((long *) NULL)); /* prime random numbers */ + srandomdev(); } /* */ /************************************************************************ diff --git a/games/phantasia/setup.c b/games/phantasia/setup.c index 330afb0..5caac3d 100644 --- a/games/phantasia/setup.c +++ b/games/phantasia/setup.c @@ -4,7 +4,6 @@ #include "include.h" #include #include -#include #include /* */ /************************************************************************ @@ -75,7 +74,7 @@ main(argc, argv) argc -= optind; argv += optind; - srandom((unsigned) time((long *) NULL)); /* prime random numbers */ + srandomdev(); umask(0117); /* only owner can read/write created files */ -- cgit v1.1