summaryrefslogtreecommitdiffstats
path: root/larn
diff options
context:
space:
mode:
Diffstat (limited to 'larn')
-rw-r--r--larn/diag.c4
-rw-r--r--larn/global.c3
-rw-r--r--larn/header.h4
-rw-r--r--larn/io.c13
-rw-r--r--larn/main.c4
-rw-r--r--larn/monster.c3
-rw-r--r--larn/scores.c8
-rw-r--r--larn/signal.c4
-rw-r--r--larn/tok.c3
9 files changed, 28 insertions, 18 deletions
diff --git a/larn/diag.c b/larn/diag.c
index bc4dda74..e9ca5953 100644
--- a/larn/diag.c
+++ b/larn/diag.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: diag.c,v 1.5 1995/03/23 08:33:20 cgd Exp $";
+static char rcsid[] = "$NetBSD: diag.c,v 1.6 1995/04/24 12:23:49 cgd Exp $";
#endif /* not lint */
/* diag.c Larn is copyrighted 1986 by Noah Morgan. */
@@ -148,7 +148,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/larn/global.c b/larn/global.c
index 9be6c0d6..8e7049ea 100644
--- a/larn/global.c
+++ b/larn/global.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: global.c,v 1.3 1995/03/23 08:33:26 cgd Exp $";
+static char rcsid[] = "$NetBSD: global.c,v 1.4 1995/04/24 12:23:52 cgd Exp $";
#endif /* not lint */
/* global.c Larn is copyrighted 1986 by Noah Morgan.
@@ -23,6 +23,7 @@ static char rcsid[] = "$NetBSD: global.c,v 1.3 1995/03/23 08:33:26 cgd Exp $";
*/
#include "header.h"
+#include <string.h>
extern int score[],srcount,dropflag;
extern int random;/* the random number seed */
extern short playerx,playery,lastnum;
diff --git a/larn/header.h b/larn/header.h
index 2dfec532..01b7487b 100644
--- a/larn/header.h
+++ b/larn/header.h
@@ -1,4 +1,4 @@
-/* $NetBSD: header.h,v 1.6 1995/04/22 07:34:05 cgd Exp $ */
+/* $NetBSD: header.h,v 1.7 1995/04/24 12:23:54 cgd Exp $ */
/* header.h Larn is copyrighted 1986 by Noah Morgan. */
@@ -355,7 +355,7 @@ extern struct _itm itm[];
char *fortune(),*getenv(),*getlogin(),*lgetw(),*lgetl(),*ctime();
char *tmcapcnv(),*tgetstr(),*tgoto();
-long paytaxes(),lgetc(),lrint(),time();
+long paytaxes(),lgetc(),lrint();
unsigned long readnum();
void *malloc();
diff --git a/larn/io.c b/larn/io.c
index ded2ac2a..dc91b346 100644
--- a/larn/io.c
+++ b/larn/io.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: io.c,v 1.3 1995/03/23 08:33:38 cgd Exp $";
+static char rcsid[] = "$NetBSD: io.c,v 1.4 1995/04/24 12:23:57 cgd Exp $";
#endif /* not lint */
/* io.c Larn is copyrighted 1986 by Noah Morgan.
@@ -60,6 +60,7 @@ static char rcsid[] = "$NetBSD: io.c,v 1.3 1995/03/23 08:33:38 cgd Exp $";
*/
#include "header.h"
+#include <string.h>
#ifdef SYSV /* system III or system V */
#include <termio.h>
@@ -851,15 +852,15 @@ lflush()
#endif VT100
#ifndef VT100
-static int index=0;
+static int vindex=0;
/*
* putchar(ch) Print one character in decoded output buffer.
*/
int putchar(c)
int c;
{
- outbuf[index++] = c;
- if (index >= BUFBIG) flush_buf();
+ outbuf[vindex++] = c;
+ if (vindex >= BUFBIG) flush_buf();
}
/*
@@ -867,8 +868,8 @@ int c;
*/
flush_buf()
{
- if (index) write(lfd, outbuf, index);
- index = 0;
+ if (vindex) write(lfd, outbuf, vindex);
+ vindex = 0;
}
/*
diff --git a/larn/main.c b/larn/main.c
index 35339177..fcacc3cd 100644
--- a/larn/main.c
+++ b/larn/main.c
@@ -1,11 +1,13 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: main.c,v 1.6 1995/04/22 07:34:07 cgd Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.7 1995/04/24 12:24:01 cgd Exp $";
#endif /* not lint */
/* main.c */
#include <sys/types.h>
#include "header.h"
#include <pwd.h>
+#include <string.h>
+
static char copyright[]="\nLarn is copyrighted 1986 by Noah Morgan.\n";
int srcount=0; /* line counter for showstr() */
int dropflag=0; /* if 1 then don't lookforobject() next round */
diff --git a/larn/monster.c b/larn/monster.c
index 1178bd66..68d60c23 100644
--- a/larn/monster.c
+++ b/larn/monster.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: monster.c,v 1.3 1995/03/23 08:33:50 cgd Exp $";
+static char rcsid[] = "$NetBSD: monster.c,v 1.4 1995/04/24 12:24:05 cgd Exp $";
#endif /* not lint */
/*
@@ -101,6 +101,7 @@ static char rcsid[] = "$NetBSD: monster.c,v 1.3 1995/03/23 08:33:50 cgd Exp $";
*
*/
#include "header.h"
+#include <string.h>
struct isave /* used for altar reality */
{
diff --git a/larn/scores.c b/larn/scores.c
index cd9fd9e2..8a2fac26 100644
--- a/larn/scores.c
+++ b/larn/scores.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: scores.c,v 1.4 1995/03/23 08:34:15 cgd Exp $";
+static char rcsid[] = "$NetBSD: scores.c,v 1.5 1995/04/24 12:24:08 cgd Exp $";
#endif /* not lint */
/* scores.c Larn is copyrighted 1986 by Noah Morgan.
@@ -29,6 +29,7 @@ static char rcsid[] = "$NetBSD: scores.c,v 1.4 1995/03/23 08:34:15 cgd Exp $";
#include <sys/times.h>
#include <sys/stat.h>
#include "header.h"
+#include <string.h>
struct scofmt /* This is the structure for the scoreboard */
{
@@ -55,7 +56,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
@@ -472,7 +473,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 */
{
diff --git a/larn/signal.c b/larn/signal.c
index e12b1314..93773147 100644
--- a/larn/signal.c
+++ b/larn/signal.c
@@ -1,9 +1,11 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: signal.c,v 1.3 1995/03/23 08:34:18 cgd Exp $";
+static char rcsid[] = "$NetBSD: signal.c,v 1.4 1995/04/24 12:24:12 cgd Exp $";
#endif /* not lint */
#include <signal.h>
#include "header.h" /* "Larn is copyrighted 1986 by Noah Morgan.\n" */
+#include <string.h>
+
#define BIT(a) (1<<((a)-1))
extern char savefilename[],wizard,predostuff,nosignal;
static s2choose() /* text to be displayed if ^C during intro screen */
diff --git a/larn/tok.c b/larn/tok.c
index 5b9e2610..32aca694 100644
--- a/larn/tok.c
+++ b/larn/tok.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: tok.c,v 1.3 1995/03/23 08:34:23 cgd Exp $";
+static char rcsid[] = "$NetBSD: tok.c,v 1.4 1995/04/24 12:24:14 cgd Exp $";
#endif /* not lint */
/* tok.c Larn is copyrighted 1986 by Noah Morgan. */
@@ -11,6 +11,7 @@ static char rcsid[] = "$NetBSD: tok.c,v 1.3 1995/03/23 08:34:23 cgd Exp $";
#include <sys/ioctl.h>
#endif SYSV
#include "header.h"
+#include <string.h>
static char lastok=0;
int yrepcount=0,dayplay=0;