Change variable types from long to time_t if they are passed to time()

by reference.
This commit is contained in:
John Birrell 1998-05-09 10:09:00 +00:00
parent 7acec2e638
commit f6d6e5ef22
4 changed files with 7 additions and 6 deletions

View File

@ -148,7 +148,7 @@ short oldx,oldy;
short lasthx=0,lasthy=0; /* location of monster last hit by player */
short nobeep=0; /* true if program is not to beep */
/* unsigned long randx=33601; /* the random number seed */
long initialtime=0; /* time playing began */
time_t initialtime=0; /* time playing began */
long gtime=0; /* the clock for the game */
long outstanding_taxes=0; /* present tax bill from score file */
long c[100],cbak[100]; /* the character description arrays */

View File

@ -3,7 +3,6 @@
#include <sys/times.h>
#include <sys/stat.h>
#include "header.h"
extern long int initialtime;
extern int rmst,maxitm,lasttime;
extern char nosignal;
static struct tms cputime;
@ -144,7 +143,7 @@ diagdrawscreen()
/*
to save the game in a file
*/
static long int zzz=0;
static time_t zzz=0;
savegame(fname)
char *fname;
{

View File

@ -350,7 +350,8 @@ extern short diroffx[],diroffy[],hitflag,hit2flag,hit3flag,hitp[MAXX][MAXY];
extern short iarg[MAXX][MAXY],ivenarg[],lasthx,lasthy,lastnum,lastpx,lastpy;
extern short nobeep,oldx,oldy,playerx,playery;
extern int dayplay,enable_scroll,srcount,yrepcount,userid,wisid,lfd,fd;
extern long initialtime,outstanding_taxes,skill[],gtime,c[],cbak[];
extern time_t initialtime;
extern long outstanding_taxes,skill[],gtime,c[],cbak[];
extern struct cel *cell;
extern struct monst monster[];
extern struct sphere *spheres;

View File

@ -51,7 +51,7 @@ struct wscofmt /* This is the structure for the winning scoreboard */
struct log_fmt /* 102 bytes struct for the log file */
{
long score; /* the players score */
long diedtime; /* time when game was over */
time_t diedtime; /* time when game was over */
short cavelev; /* level in caves */
short diff; /* difficulty player played at */
#ifdef EXTRA
@ -468,7 +468,8 @@ died(x)
{
register int f,win;
char ch,*mod;
long zzz,i;
time_t zzz;
long i;
struct tms cputime;
if (c[LIFEPROT]>0) /* if life protection */
{