summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-05-09 11:03:03 +0000
committerjb <jb@FreeBSD.org>1998-05-09 11:03:03 +0000
commiteee6720ad6008af62fc00167df79f7a65f97579f (patch)
tree24e6d55c8f64cfac3e557989c19745e3c540240f /games
parent0c487350e516ac158d6c981e38d8bcd7f3854ebd (diff)
downloadFreeBSD-src-eee6720ad6008af62fc00167df79f7a65f97579f.zip
FreeBSD-src-eee6720ad6008af62fc00167df79f7a65f97579f.tar.gz
Add #include string.h to get prototypes and change variables from long
to time_t where they are passed to time() and localtime() by reference.
Diffstat (limited to 'games')
-rw-r--r--games/phantasia/gamesupport.c5
-rw-r--r--games/phantasia/main.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/games/phantasia/gamesupport.c b/games/phantasia/gamesupport.c
index bea933a..24aae31 100644
--- a/games/phantasia/gamesupport.c
+++ b/games/phantasia/gamesupport.c
@@ -2,6 +2,7 @@
* gamesupport.c - auxiliary routines for support of Phantasia
*/
+#include <string.h>
#include "include.h"
/************************************************************************
@@ -61,7 +62,7 @@ int c; /* input */
int today; /* day of year of today */
int temp; /* temporary variable */
long loc; /* location in player file */
-long now; /* time now */
+time_t now; /* time now */
double dtemp; /* temporary variable */
bool *bptr; /* pointer to bool item to change */
double *dptr; /* pointer to double item to change */
@@ -624,7 +625,7 @@ purgeoldplayers()
{
int today; /* day of year for today */
int daysold; /* how many days since the character has been used */
-long ltime; /* time in seconds */
+time_t ltime; /* time in seconds */
long loc = 0L; /* location in file */
time(&ltime);
diff --git a/games/phantasia/main.c b/games/phantasia/main.c
index f412d09..2f24352 100644
--- a/games/phantasia/main.c
+++ b/games/phantasia/main.c
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <pwd.h>
+#include <string.h>
/*
* The program allocates as much file space as it needs to store characters,
@@ -100,7 +101,7 @@ char **argv;
bool noheader = FALSE; /* set if don't want header */
bool headeronly = FALSE; /* set if only want header */
bool examine = FALSE; /* set if examine a character */
-long seconds; /* for time of day */
+time_t seconds; /* for time of day */
double dtemp; /* for temporary calculations */
initialstate(); /* init globals */
OpenPOWER on IntegriCloud