summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-05-09 10:09:00 +0000
committerjb <jb@FreeBSD.org>1998-05-09 10:09:00 +0000
commit50ed7e732dd016ba1a1860e4161ab104aa1e1c62 (patch)
tree973977f3f39951a46b6eb803ba37b1343a48bc34 /games
parent6ad82c9881f369ad361ab4d49106c28f15f2fd2d (diff)
downloadFreeBSD-src-50ed7e732dd016ba1a1860e4161ab104aa1e1c62.zip
FreeBSD-src-50ed7e732dd016ba1a1860e4161ab104aa1e1c62.tar.gz
Change variable types from long to time_t if they are passed to time()
by reference.
Diffstat (limited to 'games')
-rw-r--r--games/larn/data.c2
-rw-r--r--games/larn/diag.c3
-rw-r--r--games/larn/header.h3
-rw-r--r--games/larn/scores.c5
4 files changed, 7 insertions, 6 deletions
diff --git a/games/larn/data.c b/games/larn/data.c
index 01154a4..1e6fcdf 100644
--- a/games/larn/data.c
+++ b/games/larn/data.c
@@ -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 */
diff --git a/games/larn/diag.c b/games/larn/diag.c
index 0996558..53bdfd3 100644
--- a/games/larn/diag.c
+++ b/games/larn/diag.c
@@ -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;
{
diff --git a/games/larn/header.h b/games/larn/header.h
index 1a5be70..72eab13 100644
--- a/games/larn/header.h
+++ b/games/larn/header.h
@@ -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;
diff --git a/games/larn/scores.c b/games/larn/scores.c
index a5a8807..0b32d42 100644
--- a/games/larn/scores.c
+++ b/games/larn/scores.c
@@ -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 */
{
OpenPOWER on IntegriCloud