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.
This commit is contained in:
John Birrell 1998-05-09 11:03:03 +00:00
parent d62b710a47
commit 386849d36b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35888
2 changed files with 5 additions and 3 deletions

View file

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

View file

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