summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adventure/io.c5
-rw-r--r--adventure/wizard.c5
-rw-r--r--atc/include.h5
-rw-r--r--backgammon/backgammon/main.c6
-rw-r--r--backgammon/common_source/back.h4
-rw-r--r--backgammon/common_source/fancy.c5
-rw-r--r--backgammon/common_source/subs.c6
-rw-r--r--battlestar/externs.h3
-rw-r--r--bcd/bcd.c3
-rw-r--r--boggle/boggle/bog.c9
-rw-r--r--boggle/boggle/extern.h4
-rw-r--r--boggle/boggle/mach.c15
-rw-r--r--boggle/boggle/timer.c8
-rw-r--r--canfield/canfield/canfield.c5
-rw-r--r--fortune/strfile/strfile.c5
-rw-r--r--hack/hack.o_init.c4
-rw-r--r--hack/hack.termcap.c3
-rw-r--r--hack/makedefs.c3
-rw-r--r--hangman/hangman.h3
-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
-rw-r--r--monop/getinp.c5
-rw-r--r--monop/monop.h4
-rw-r--r--phantasia/gamesupport.c6
-rw-r--r--phantasia/include.h3
-rw-r--r--phantasia/macros.h4
-rw-r--r--phantasia/main.c6
-rw-r--r--phantasia/phantglobs.h4
-rw-r--r--phantasia/setup.c6
-rw-r--r--primes/primes.c10
-rw-r--r--robots/robots.h3
-rw-r--r--rogue/machdep.c8
-rw-r--r--rogue/rogue.h6
-rw-r--r--sail/dr_1.c10
-rw-r--r--sail/dr_2.c6
-rw-r--r--sail/externs.h3
-rw-r--r--sail/pl_4.c6
-rw-r--r--sail/pl_5.c6
-rw-r--r--sail/pl_main.c8
-rw-r--r--sail/sync.c16
-rw-r--r--snake/snake/snake.c8
-rw-r--r--snake/snake/snake.h3
-rw-r--r--snake/snscore/snscore.c5
-rw-r--r--trek/computer.c6
-rw-r--r--trek/dumpgame.c6
-rw-r--r--trek/getpar.c6
-rw-r--r--trek/phaser.c6
-rw-r--r--trek/setup.c8
-rw-r--r--trek/shield.c6
-rw-r--r--worm/worm.c5
-rw-r--r--wump/wump.c5
58 files changed, 184 insertions, 147 deletions
diff --git a/adventure/io.c b/adventure/io.c
index feb52c5d..86f0c850 100644
--- a/adventure/io.c
+++ b/adventure/io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.2 1995/03/21 12:05:05 cgd Exp $ */
+/* $NetBSD: io.c,v 1.3 1995/04/24 12:21:37 cgd Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: io.c,v 1.2 1995/03/21 12:05:05 cgd Exp $";
+static char rcsid[] = "$NetBSD: io.c,v 1.3 1995/04/24 12:21:37 cgd Exp $";
#endif
#endif /* not lint */
@@ -50,6 +50,7 @@ static char rcsid[] = "$NetBSD: io.c,v 1.2 1995/03/21 12:05:05 cgd Exp $";
#include "hdr.h"
#include <stdio.h>
+#include <string.h>
getin(wrd1,wrd2) /* get command from user */
diff --git a/adventure/wizard.c b/adventure/wizard.c
index e6607b3e..aee942e2 100644
--- a/adventure/wizard.c
+++ b/adventure/wizard.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wizard.c,v 1.2 1995/03/21 12:05:15 cgd Exp $ */
+/* $NetBSD: wizard.c,v 1.3 1995/04/24 12:21:41 cgd Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -42,13 +42,14 @@
#if 0
static char sccsid[] = "@(#)wizard.c 8.1 (Berkeley) 6/2/93";
#else
-static char rcsid[] = "$NetBSD: wizard.c,v 1.2 1995/03/21 12:05:15 cgd Exp $";
+static char rcsid[] = "$NetBSD: wizard.c,v 1.3 1995/04/24 12:21:41 cgd Exp $";
#endif
#endif /* not lint */
/* Re-coding of advent in C: privileged operations */
# include "hdr.h"
+#include <string.h>
datime(d,t)
int *d,*t;
diff --git a/atc/include.h b/atc/include.h
index 2e8865a7..b6ca43b2 100644
--- a/atc/include.h
+++ b/atc/include.h
@@ -1,4 +1,4 @@
-/* $NetBSD: include.h,v 1.3 1995/03/21 15:04:08 cgd Exp $ */
+/* $NetBSD: include.h,v 1.4 1995/04/24 12:21:46 cgd Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -48,6 +48,8 @@
*/
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <pwd.h>
@@ -61,7 +63,6 @@
#ifdef SYSV
#include <fcntl.h>
#include <unistd.h>
-#include <string.h>
#include <sys/utsname.h>
#endif
diff --git a/backgammon/backgammon/main.c b/backgammon/backgammon/main.c
index 44cf07bb..78bf69e2 100644
--- a/backgammon/backgammon/main.c
+++ b/backgammon/backgammon/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.2 1995/03/21 15:05:06 cgd Exp $ */
+/* $NetBSD: main.c,v 1.3 1995/04/24 12:21:52 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: main.c,v 1.2 1995/03/21 15:05:06 cgd Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.3 1995/04/24 12:21:52 cgd Exp $";
#endif
#endif /* not lint */
@@ -184,7 +184,7 @@ char **argv;
tflag = 0; /* error! */
writel (noteach);
- exit();
+ exit(1);
} else { /* if not rules, then
* instructions */
writel (need);
diff --git a/backgammon/common_source/back.h b/backgammon/common_source/back.h
index 0e556c41..567c936b 100644
--- a/backgammon/common_source/back.h
+++ b/backgammon/common_source/back.h
@@ -1,4 +1,4 @@
-/* $NetBSD: back.h,v 1.3 1995/03/21 15:05:28 cgd Exp $ */
+/* $NetBSD: back.h,v 1.4 1995/04/24 12:22:06 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -36,6 +36,8 @@
*/
#include <sgtty.h>
+#include <stdlib.h>
+#include <string.h>
#define rnum(r) (random()%r)
#define D0 dice[0]
diff --git a/backgammon/common_source/fancy.c b/backgammon/common_source/fancy.c
index 1cc7ee05..cb7818fa 100644
--- a/backgammon/common_source/fancy.c
+++ b/backgammon/common_source/fancy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fancy.c,v 1.3 1995/03/21 15:05:40 cgd Exp $ */
+/* $NetBSD: fancy.c,v 1.4 1995/04/24 12:22:09 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)fancy.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: fancy.c,v 1.3 1995/03/21 15:05:40 cgd Exp $";
+static char rcsid[] = "$NetBSD: fancy.c,v 1.4 1995/04/24 12:22:09 cgd Exp $";
#endif
#endif /* not lint */
@@ -85,6 +85,7 @@ int realr;
int realc;
void addbuf();
+extern char *tgoto(), *tgetstr();
fboard () {
register int i, j, l;
diff --git a/backgammon/common_source/subs.c b/backgammon/common_source/subs.c
index 1baefbe5..f6ca2b58 100644
--- a/backgammon/common_source/subs.c
+++ b/backgammon/common_source/subs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: subs.c,v 1.3 1995/03/21 15:05:54 cgd Exp $ */
+/* $NetBSD: subs.c,v 1.4 1995/04/24 12:22:12 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)subs.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: subs.c,v 1.3 1995/03/21 15:05:54 cgd Exp $";
+static char rcsid[] = "$NetBSD: subs.c,v 1.4 1995/04/24 12:22:12 cgd Exp $";
#endif
#endif /* not lint */
@@ -434,7 +434,7 @@ getout () {
/* fix terminal status */
fixtty (old);
- exit();
+ exit(0);
}
roll () {
register char c;
diff --git a/battlestar/externs.h b/battlestar/externs.h
index 2af7978b..ab7f0203 100644
--- a/battlestar/externs.h
+++ b/battlestar/externs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: externs.h,v 1.4 1995/03/21 15:07:25 cgd Exp $ */
+/* $NetBSD: externs.h,v 1.5 1995/04/24 12:22:18 cgd Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,6 +37,7 @@
#include <signal.h>
#include <stdio.h>
+#include <string.h>
#define BITS (8 * sizeof (int))
diff --git a/bcd/bcd.c b/bcd/bcd.c
index ea554a34..69ee9a13 100644
--- a/bcd/bcd.c
+++ b/bcd/bcd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bcd.c,v 1.5 1995/03/21 15:08:15 cgd Exp $ */
+/* $NetBSD: bcd.c,v 1.6 1995/04/24 12:22:23 cgd Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -79,6 +79,7 @@ static char sccsid[] = "@(#)bcd.c 8.2 (Berkeley) 3/20/94";
#include <sys/types.h>
#include <stdio.h>
+#include <string.h>
#include <ctype.h>
u_short holes[256] = {
diff --git a/boggle/boggle/bog.c b/boggle/boggle/bog.c
index 5b3ee888..9a601fd2 100644
--- a/boggle/boggle/bog.c
+++ b/boggle/boggle/bog.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bog.c,v 1.4 1995/03/21 12:14:30 cgd Exp $ */
+/* $NetBSD: bog.c,v 1.5 1995/04/24 12:22:32 cgd Exp $ */
/*-
* Copyright (c) 1993
@@ -46,7 +46,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)bog.c 8.1 (Berkeley) 6/11/93";
#else
-static char rcsid[] = "$NetBSD: bog.c,v 1.4 1995/03/21 12:14:30 cgd Exp $";
+static char rcsid[] = "$NetBSD: bog.c,v 1.5 1995/04/24 12:22:32 cgd Exp $";
#endif
#endif /* not lint */
@@ -54,6 +54,7 @@ static char rcsid[] = "$NetBSD: bog.c,v 1.4 1995/03/21 12:14:30 cgd Exp $";
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <time.h>
#include "bog.h"
@@ -110,7 +111,7 @@ int tnmwords = 0, tnpwords = 0;
#include <setjmp.h>
jmp_buf env;
-long start_t;
+time_t start_t;
static FILE *dictfp;
@@ -288,7 +289,7 @@ playgame()
{
/* Can't use register variables if setjmp() is used! */
int i, *p, *q;
- long t;
+ time_t t;
char buf[MAXWORDLEN + 1];
ngames++;
diff --git a/boggle/boggle/extern.h b/boggle/boggle/extern.h
index fdd886df..fb0614ec 100644
--- a/boggle/boggle/extern.h
+++ b/boggle/boggle/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.2 1995/03/21 12:14:36 cgd Exp $ */
+/* $NetBSD: extern.h,v 1.3 1995/04/24 12:22:37 cgd Exp $ */
/*-
* Copyright (c) 1993
@@ -61,7 +61,7 @@ void prtable __P((char *[],
void putstr __P((char *));
void redraw __P((void));
void results __P((void));
-int setup __P((int, long));
+int setup __P((int, time_t));
void showboard __P((char *));
void showstr __P((char *, int));
void showword __P((int));
diff --git a/boggle/boggle/mach.c b/boggle/boggle/mach.c
index 9e8104c9..622f03c6 100644
--- a/boggle/boggle/mach.c
+++ b/boggle/boggle/mach.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mach.c,v 1.2 1995/03/21 12:14:40 cgd Exp $ */
+/* $NetBSD: mach.c,v 1.3 1995/04/24 12:22:41 cgd Exp $ */
/*-
* Copyright (c) 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)mach.c 8.1 (Berkeley) 6/11/93";
#else
-static char rcsid[] = "$NetBSD: mach.c,v 1.2 1995/03/21 12:14:40 cgd Exp $";
+static char rcsid[] = "$NetBSD: mach.c,v 1.3 1995/04/24 12:22:41 cgd Exp $";
#endif
#endif /* not lint */
@@ -56,6 +56,7 @@ static char rcsid[] = "$NetBSD: mach.c,v 1.2 1995/03/21 12:14:40 cgd Exp $";
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <time.h>
#include "bog.h"
@@ -85,7 +86,7 @@ static void winch_catcher __P((int));
int
setup(sflag, seed)
int sflag;
- long seed;
+ time_t seed;
{
extern int debug;
@@ -291,8 +292,8 @@ static int gone;
void
stoptime()
{
- extern long start_t;
- long t;
+ extern time_t start_t;
+ time_t t;
(void)time(&t);
gone = (int) (t - start_t);
@@ -304,8 +305,8 @@ stoptime()
void
starttime()
{
- extern long start_t;
- long t;
+ extern time_t start_t;
+ time_t t;
(void)time(&t);
start_t = t - (long) gone;
diff --git a/boggle/boggle/timer.c b/boggle/boggle/timer.c
index d9d85f87..6f9a0430 100644
--- a/boggle/boggle/timer.c
+++ b/boggle/boggle/timer.c
@@ -1,4 +1,4 @@
-/* $NetBSD: timer.c,v 1.2 1995/03/21 12:14:44 cgd Exp $ */
+/* $NetBSD: timer.c,v 1.3 1995/04/24 12:22:45 cgd Exp $ */
/*-
* Copyright (c) 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)timer.c 8.2 (Berkeley) 2/22/94";
#else
-static char rcsid[] = "$NetBSD: timer.c,v 1.2 1995/03/21 12:14:44 cgd Exp $";
+static char rcsid[] = "$NetBSD: timer.c,v 1.3 1995/04/24 12:22:45 cgd Exp $";
#endif
#endif /* not lint */
@@ -67,9 +67,9 @@ int
timerch()
{
extern int tlimit;
- extern long start_t;
+ extern time_t start_t;
extern jmp_buf env;
- long prevt, t;
+ time_t prevt, t;
int col, remaining, row;
getyx(stdscr, row, col);
diff --git a/canfield/canfield/canfield.c b/canfield/canfield/canfield.c
index d9e335b4..08123493 100644
--- a/canfield/canfield/canfield.c
+++ b/canfield/canfield/canfield.c
@@ -1,4 +1,4 @@
-/* $NetBSD: canfield.c,v 1.5 1995/03/21 15:08:32 cgd Exp $ */
+/* $NetBSD: canfield.c,v 1.6 1995/04/24 12:22:54 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)canfield.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: canfield.c,v 1.5 1995/03/21 15:08:32 cgd Exp $";
+static char rcsid[] = "$NetBSD: canfield.c,v 1.6 1995/04/24 12:22:54 cgd Exp $";
#endif
#endif /* not lint */
@@ -64,6 +64,7 @@ static char rcsid[] = "$NetBSD: canfield.c,v 1.5 1995/03/21 15:08:32 cgd Exp $";
#include <termios.h>
#include <ctype.h>
#include <signal.h>
+#include <string.h>
#include <termios.h>
#include "pathnames.h"
diff --git a/fortune/strfile/strfile.c b/fortune/strfile/strfile.c
index 3b8b20d8..641b8bc8 100644
--- a/fortune/strfile/strfile.c
+++ b/fortune/strfile/strfile.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strfile.c,v 1.3 1995/03/23 08:28:47 cgd Exp $ */
+/* $NetBSD: strfile.c,v 1.4 1995/04/24 12:23:09 cgd Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -46,13 +46,14 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: strfile.c,v 1.3 1995/03/23 08:28:47 cgd Exp $";
+static char rcsid[] = "$NetBSD: strfile.c,v 1.4 1995/04/24 12:23:09 cgd Exp $";
#endif
#endif /* not lint */
# include <machine/endian.h>
# include <sys/param.h>
# include <stdio.h>
+# include <string.h>
# include <ctype.h>
# include "strfile.h"
diff --git a/hack/hack.o_init.c b/hack/hack.o_init.c
index ccda56b5..a9480b7b 100644
--- a/hack/hack.o_init.c
+++ b/hack/hack.o_init.c
@@ -3,13 +3,13 @@
*/
#ifndef lint
-static char rcsid[] = "$NetBSD: hack.o_init.c,v 1.3 1995/03/23 08:31:06 cgd Exp $";
+static char rcsid[] = "$NetBSD: hack.o_init.c,v 1.4 1995/04/24 12:23:27 cgd Exp $";
#endif /* not lint */
#include "config.h" /* for typedefs */
#include "def.objects.h"
#include "hack.onames.h" /* for LAST_GEM */
-extern char *index();
+#include <string.h>
int
letindex(let) register char let; {
diff --git a/hack/hack.termcap.c b/hack/hack.termcap.c
index 939514b7..a853d698 100644
--- a/hack/hack.termcap.c
+++ b/hack/hack.termcap.c
@@ -3,10 +3,11 @@
*/
#ifndef lint
-static char rcsid[] = "$NetBSD: hack.termcap.c,v 1.3 1995/03/23 08:31:36 cgd Exp $";
+static char rcsid[] = "$NetBSD: hack.termcap.c,v 1.4 1995/04/24 12:23:34 cgd Exp $";
#endif /* not lint */
#include <stdio.h>
+#include <string.h>
#include "config.h" /* for ROWNO and COLNO */
#include "def.flag.h" /* for flags.nonull */
extern char *tgetstr(), *tgoto(), *getenv();
diff --git a/hack/makedefs.c b/hack/makedefs.c
index 550e3e95..e0567032 100644
--- a/hack/makedefs.c
+++ b/hack/makedefs.c
@@ -3,10 +3,11 @@
*/
#ifndef lint
-static char rcsid[] = "$NetBSD: makedefs.c,v 1.3 1995/03/23 08:32:24 cgd Exp $";
+static char rcsid[] = "$NetBSD: makedefs.c,v 1.4 1995/04/24 12:23:39 cgd Exp $";
#endif /* not lint */
#include <stdio.h>
+#include <string.h>
/* construct definitions of object constants */
#define LINSZ 1000
diff --git a/hangman/hangman.h b/hangman/hangman.h
index 7d7bf484..7452b3ec 100644
--- a/hangman/hangman.h
+++ b/hangman/hangman.h
@@ -1,4 +1,4 @@
-/* $NetBSD: hangman.h,v 1.4 1995/03/23 08:32:48 cgd Exp $ */
+/* $NetBSD: hangman.h,v 1.5 1995/04/24 12:23:44 cgd Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -40,6 +40,7 @@
# include <sys/stat.h>
# include <ctype.h>
# include <signal.h>
+# include <string.h>
# include "pathnames.h"
# define MINLEN 6
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;
diff --git a/monop/getinp.c b/monop/getinp.c
index d46a9a0f..b9e5fcc0 100644
--- a/monop/getinp.c
+++ b/monop/getinp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getinp.c,v 1.3 1995/03/23 08:34:39 cgd Exp $ */
+/* $NetBSD: getinp.c,v 1.4 1995/04/24 12:24:20 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,11 +37,12 @@
#if 0
static char sccsid[] = "@(#)getinp.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: getinp.c,v 1.3 1995/03/23 08:34:39 cgd Exp $";
+static char rcsid[] = "$NetBSD: getinp.c,v 1.4 1995/04/24 12:24:20 cgd Exp $";
#endif
#endif /* not lint */
# include <stdio.h>
+# include <string.h>
# include <ctype.h>
# define reg register
diff --git a/monop/monop.h b/monop/monop.h
index 1f6110c1..2bc82dab 100644
--- a/monop/monop.h
+++ b/monop/monop.h
@@ -1,4 +1,4 @@
-/* $NetBSD: monop.h,v 1.3 1995/03/23 08:35:00 cgd Exp $ */
+/* $NetBSD: monop.h,v 1.4 1995/04/24 12:24:23 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -36,6 +36,8 @@
*/
# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
# define reg register
# define shrt char
diff --git a/phantasia/gamesupport.c b/phantasia/gamesupport.c
index b1be5e4d..e4742b0f 100644
--- a/phantasia/gamesupport.c
+++ b/phantasia/gamesupport.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gamesupport.c,v 1.2 1995/03/24 03:58:43 cgd Exp $ */
+/* $NetBSD: gamesupport.c,v 1.3 1995/04/24 12:24:28 cgd Exp $ */
/*
* gamesupport.c - auxiliary routines for support of Phantasia
@@ -63,7 +63,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 */
@@ -626,7 +626,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/phantasia/include.h b/phantasia/include.h
index c9b4f7c6..db661e38 100644
--- a/phantasia/include.h
+++ b/phantasia/include.h
@@ -1,4 +1,4 @@
-/* $NetBSD: include.h,v 1.2 1995/03/24 03:58:45 cgd Exp $ */
+/* $NetBSD: include.h,v 1.3 1995/04/24 12:24:31 cgd Exp $ */
/*
* include.h - includes all important files for Phantasia
@@ -11,6 +11,7 @@
#include <signal.h>
#include <time.h>
#include <errno.h>
+#include <string.h>
#include "macros.h"
#include "phantdefs.h"
diff --git a/phantasia/macros.h b/phantasia/macros.h
index 6c46c868..39b003c3 100644
--- a/phantasia/macros.h
+++ b/phantasia/macros.h
@@ -1,4 +1,4 @@
-/* $NetBSD: macros.h,v 1.2 1995/03/24 03:58:52 cgd Exp $ */
+/* $NetBSD: macros.h,v 1.3 1995/04/24 12:24:34 cgd Exp $ */
/*
* macros.h - macro definitions for Phantasia
@@ -7,7 +7,9 @@
#define ROLL(BASE,INTERVAL) floor((BASE) + (INTERVAL) * drandom())
#define SGN(X) ((X) < 0 ? -1 : 1)
#define CIRCLE(X, Y) floor(distance(X, 0.0, Y, 0.0) / 125.0 + 1)
+#undef MAX
#define MAX(A, B) ((A) > (B) ? (A) : (B))
+#undef MIN
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#define ILLCMD() mvaddstr(5, 0, Illcmd)
#define MAXMOVE() (Player.p_level * 1.5 + 1)
diff --git a/phantasia/main.c b/phantasia/main.c
index 2e01b692..a40dfb0c 100644
--- a/phantasia/main.c
+++ b/phantasia/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.2 1995/03/24 03:58:54 cgd Exp $ */
+/* $NetBSD: main.c,v 1.3 1995/04/24 12:24:37 cgd Exp $ */
/*
* Phantasia 3.3.2 -- Interterminal fantasy game
@@ -102,7 +102,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 */
@@ -369,7 +369,7 @@ initialstate()
error(_PATH_VOID);
/*NOTREACHED*/
- srandom((unsigned) time((long *) NULL)); /* prime random numbers */
+ srandom((unsigned) time(NULL)); /* prime random numbers */
}
/* */
/************************************************************************
diff --git a/phantasia/phantglobs.h b/phantasia/phantglobs.h
index eeec1305..cdbe43c4 100644
--- a/phantasia/phantglobs.h
+++ b/phantasia/phantglobs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: phantglobs.h,v 1.2 1995/03/24 03:59:38 cgd Exp $ */
+/* $NetBSD: phantglobs.h,v 1.3 1995/04/24 12:24:39 cgd Exp $ */
/*
* phantglobs.h - global declarations for Phantasia
@@ -59,7 +59,7 @@ extern char Somebetter[];
extern char Nobetter[];
/* library functions and system calls */
-extern long time();
+/* extern long time(); */
extern char *getlogin();
extern char *getpass();
extern char *strchr();
diff --git a/phantasia/setup.c b/phantasia/setup.c
index ee61b9c2..c9acd978 100644
--- a/phantasia/setup.c
+++ b/phantasia/setup.c
@@ -1,12 +1,12 @@
-/* $NetBSD: setup.c,v 1.3 1995/03/24 04:00:51 cgd Exp $ */
+/* $NetBSD: setup.c,v 1.4 1995/04/24 12:24:41 cgd Exp $ */
/*
* setup.c - set up all files for Phantasia
*/
-#include "include.h"
#include <sys/param.h>
#include <sys/stat.h>
#include <stdlib.h>
+#include "include.h"
/* */
/************************************************************************
/
@@ -77,7 +77,7 @@ main(argc, argv)
argc -= optind;
argv += optind;
- srandom((unsigned) time((long *) NULL)); /* prime random numbers */
+ srandom((unsigned) time(NULL)); /* prime random numbers */
umask(0117); /* only owner can read/write created files */
diff --git a/primes/primes.c b/primes/primes.c
index 57e00731..868d994f 100644
--- a/primes/primes.c
+++ b/primes/primes.c
@@ -1,4 +1,4 @@
-/* $NetBSD: primes.c,v 1.4 1995/03/23 08:35:55 cgd Exp $ */
+/* $NetBSD: primes.c,v 1.5 1995/04/24 12:24:47 cgd Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -46,7 +46,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)primes.c 8.4 (Berkeley) 3/21/94";
#else
-static char rcsid[] = "$NetBSD: primes.c,v 1.4 1995/03/23 08:35:55 cgd Exp $";
+static char rcsid[] = "$NetBSD: primes.c,v 1.5 1995/04/24 12:24:47 cgd Exp $";
#endif
#endif /* not lint */
@@ -308,10 +308,10 @@ primes(start, stop)
do {
/* determine the factor's initial sieve point */
q = (char *)(start%factor); /* temp storage for mod */
- if ((int)q & 0x1) {
- q = &table[(factor-(int)q)/2];
+ if ((long)q & 0x1) {
+ q = &table[(factor-(long)q)/2];
} else {
- q = &table[q ? factor-((int)q/2) : 0];
+ q = &table[q ? factor-((long)q/2) : 0];
}
/* sive for our current factor */
for ( ; q < tab_lim; q += factor) {
diff --git a/robots/robots.h b/robots/robots.h
index 63bf7cd6..15261c50 100644
--- a/robots/robots.h
+++ b/robots/robots.h
@@ -1,4 +1,4 @@
-/* $NetBSD: robots.h,v 1.4 1995/04/22 10:09:11 cgd Exp $ */
+/* $NetBSD: robots.h,v 1.5 1995/04/24 12:24:54 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,6 +37,7 @@
# include <curses.h>
# include <setjmp.h>
+# include <string.h>
/*
* miscellaneous constants
diff --git a/rogue/machdep.c b/rogue/machdep.c
index baedb47b..96848910 100644
--- a/rogue/machdep.c
+++ b/rogue/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.3 1995/04/22 10:27:39 cgd Exp $ */
+/* $NetBSD: machdep.c,v 1.4 1995/04/24 12:25:01 cgd Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)machdep.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: machdep.c,v 1.3 1995/04/22 10:27:39 cgd Exp $";
+static char rcsid[] = "$NetBSD: machdep.c,v 1.4 1995/04/24 12:25:01 cgd Exp $";
#endif
#endif /* not lint */
@@ -304,7 +304,7 @@ md_gct(rt_buf)
struct rogue_time *rt_buf;
{
struct tm *t, *localtime();
- long seconds;
+ time_t seconds;
time(&seconds);
t = localtime(&seconds);
@@ -338,7 +338,7 @@ char *fname;
struct rogue_time *rt_buf;
{
struct stat sbuf;
- long seconds;
+ time_t seconds;
struct tm *t;
stat(fname, &sbuf);
diff --git a/rogue/rogue.h b/rogue/rogue.h
index 94e37db9..c9b09874 100644
--- a/rogue/rogue.h
+++ b/rogue/rogue.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rogue.h,v 1.3 1995/04/22 10:28:14 cgd Exp $ */
+/* $NetBSD: rogue.h,v 1.4 1995/04/24 12:25:04 cgd Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -428,9 +428,7 @@ extern object level_monsters;
/* external routine declarations.
*/
-char *strcpy();
-char *strncpy();
-char *strcat();
+#include <string.h>
char *mon_name();
char *get_ench_color();
diff --git a/sail/dr_1.c b/sail/dr_1.c
index 75605b37..de4c8c5f 100644
--- a/sail/dr_1.c
+++ b/sail/dr_1.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dr_1.c,v 1.3 1995/04/22 10:36:46 cgd Exp $ */
+/* $NetBSD: dr_1.c,v 1.4 1995/04/24 12:25:10 cgd Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)dr_1.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: dr_1.c,v 1.3 1995/04/22 10:36:46 cgd Exp $";
+static char rcsid[] = "$NetBSD: dr_1.c,v 1.4 1995/04/24 12:25:10 cgd Exp $";
#endif
#endif /* not lint */
@@ -187,7 +187,7 @@ int key;
makesignal(from, "boarders from %s repelled", to);
(void) sprintf(message, "killed in melee: %d. %s: %d",
totalto, from->shipname, totalfrom);
- Write(W_SIGNAL, to, 1, (int) message, 0, 0, 0);
+ Write(W_SIGNAL, to, 1, (long) message, 0, 0, 0);
if (key)
return 1;
} else if (strengthto >= fromstrength * 3) {
@@ -219,10 +219,10 @@ int key;
}
(void) sprintf(message, "captured by the %s!",
to->shipname);
- Write(W_SIGNAL, from, 1, (int) message, 0, 0, 0);
+ Write(W_SIGNAL, from, 1, (long) message, 0, 0, 0);
(void) sprintf(message, "killed in melee: %d. %s: %d",
totalto, from->shipname, totalfrom);
- Write(W_SIGNAL, to, 1, (int) message, 0, 0, 0);
+ Write(W_SIGNAL, to, 1, (long) message, 0, 0, 0);
mento = 0;
return 0;
}
diff --git a/sail/dr_2.c b/sail/dr_2.c
index 1e76dc6f..fbe58ba4 100644
--- a/sail/dr_2.c
+++ b/sail/dr_2.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dr_2.c,v 1.3 1995/04/22 10:36:48 cgd Exp $ */
+/* $NetBSD: dr_2.c,v 1.4 1995/04/24 12:25:12 cgd Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)dr_2.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: dr_2.c,v 1.3 1995/04/22 10:36:48 cgd Exp $";
+static char rcsid[] = "$NetBSD: dr_2.c,v 1.4 1995/04/24 12:25:12 cgd Exp $";
#endif
#endif /* not lint */
@@ -116,7 +116,7 @@ prizecheck()
continue;
if (sp->specs->crew1 + sp->specs->crew2 + sp->specs->crew3 > sp->file->pcrew * 6) {
Write(W_SIGNAL, sp, 1,
- (int)"prize crew overthrown", 0, 0, 0);
+ (long)"prize crew overthrown", 0, 0, 0);
Write(W_POINTS, sp->file->captured, 0, sp->file->captured->file->points - 2 * sp->specs->pts, 0, 0, 0);
Write(W_CAPTURED, sp, 0, -1, 0, 0, 0);
}
diff --git a/sail/externs.h b/sail/externs.h
index 0894881d..ad28a387 100644
--- a/sail/externs.h
+++ b/sail/externs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: externs.h,v 1.3 1995/04/22 10:36:55 cgd Exp $ */
+/* $NetBSD: externs.h,v 1.4 1995/04/24 12:25:15 cgd Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,6 +37,7 @@
#include <stdio.h>
#include <signal.h>
+#include <string.h>
#include <ctype.h>
#include <setjmp.h>
#include "machdep.h"
diff --git a/sail/pl_4.c b/sail/pl_4.c
index b5ea560e..535ed86b 100644
--- a/sail/pl_4.c
+++ b/sail/pl_4.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_4.c,v 1.3 1995/04/22 10:37:10 cgd Exp $ */
+/* $NetBSD: pl_4.c,v 1.4 1995/04/24 12:25:17 cgd Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)pl_4.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: pl_4.c,v 1.3 1995/04/22 10:37:10 cgd Exp $";
+static char rcsid[] = "$NetBSD: pl_4.c,v 1.4 1995/04/24 12:25:17 cgd Exp $";
#endif
#endif /* not lint */
@@ -80,7 +80,7 @@ acceptsignal()
;
p[-1] = '"';
*p = 0;
- Write(W_SIGNAL, ms, 1, (int)buf, 0, 0, 0);
+ Write(W_SIGNAL, ms, 1, (long)buf, 0, 0, 0);
}
lookout()
diff --git a/sail/pl_5.c b/sail/pl_5.c
index 938f0e87..f8df3291 100644
--- a/sail/pl_5.c
+++ b/sail/pl_5.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_5.c,v 1.3 1995/04/22 10:37:12 cgd Exp $ */
+/* $NetBSD: pl_5.c,v 1.4 1995/04/24 12:25:21 cgd Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)pl_5.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: pl_5.c,v 1.3 1995/04/22 10:37:12 cgd Exp $";
+static char rcsid[] = "$NetBSD: pl_5.c,v 1.4 1995/04/24 12:25:21 cgd Exp $";
#endif
#endif /* not lint */
@@ -145,7 +145,7 @@ acceptmove()
(void) strcpy(movebuf, buf);
else
(void) strcpy(movebuf, "d");
- Write(W_MOVE, ms, 1, (int)movebuf, 0, 0, 0);
+ Write(W_MOVE, ms, 1, (long)movebuf, 0, 0, 0);
Signal("Helm: %s.", (struct ship *)0, movebuf);
}
diff --git a/sail/pl_main.c b/sail/pl_main.c
index f31ef33e..9bd466a6 100644
--- a/sail/pl_main.c
+++ b/sail/pl_main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_main.c,v 1.4 1995/04/22 10:37:20 cgd Exp $ */
+/* $NetBSD: pl_main.c,v 1.5 1995/04/24 12:25:25 cgd Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)pl_main.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: pl_main.c,v 1.4 1995/04/22 10:37:20 cgd Exp $";
+static char rcsid[] = "$NetBSD: pl_main.c,v 1.5 1995/04/24 12:25:25 cgd Exp $";
#endif
#endif /* not lint */
@@ -211,7 +211,7 @@ reprint:
captain[strlen(captain) - 1] = '\0';
}
captain[sizeof captain - 1] = '\0';
- Write(W_CAPTAIN, ms, 1, (int)captain, 0, 0, 0);
+ Write(W_CAPTAIN, ms, 1, (long)captain, 0, 0, 0);
for (n = 0; n < 2; n++) {
char buf[10];
@@ -247,6 +247,6 @@ reprint:
initscreen();
draw_board();
(void) sprintf(message, "Captain %s assuming command", captain);
- Write(W_SIGNAL, ms, 1, (int)message, 0, 0, 0);
+ Write(W_SIGNAL, ms, 1, (long)message, 0, 0, 0);
newturn();
}
diff --git a/sail/sync.c b/sail/sync.c
index ec4fc61d..20ab46cd 100644
--- a/sail/sync.c
+++ b/sail/sync.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sync.c,v 1.3 1995/04/22 10:37:26 cgd Exp $ */
+/* $NetBSD: sync.c,v 1.4 1995/04/24 12:25:28 cgd Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)sync.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: sync.c,v 1.3 1995/04/22 10:37:26 cgd Exp $";
+static char rcsid[] = "$NetBSD: sync.c,v 1.4 1995/04/24 12:25:28 cgd Exp $";
#endif
#endif /* not lint */
@@ -61,6 +61,7 @@ makesignal(from, fmt, ship, a, b, c)
struct ship *from;
char *fmt;
register struct ship *ship;
+ long a, b, c;
{
char message[80];
@@ -70,7 +71,7 @@ makesignal(from, fmt, ship, a, b, c)
(void) sprintf(message, fmt,
ship->shipname, colours(ship),
sterncolour(ship), a, b, c);
- Write(W_SIGNAL, from, 1, (int)message, 0, 0, 0);
+ Write(W_SIGNAL, from, 1, (long)message, 0, 0, 0);
}
#include <sys/types.h>
@@ -125,7 +126,7 @@ Write(type, ship, isstr, a, b, c, d)
int type;
struct ship *ship;
char isstr;
- int a, b, c, d;
+ long a, b, c, d;
{
if (isstr)
(void) sprintf(sync_bp, "%d %d %d %s\n",
@@ -145,7 +146,8 @@ Sync()
{
sig_t sighup, sigint;
register n;
- int type, shipnum, isstr, a, b, c, d;
+ int type, shipnum, isstr;
+ long a, b, c, d;
char buf[80];
char erred = 0;
extern errno;
@@ -200,7 +202,7 @@ Sync()
*p = 0;
for (p = buf; *p == ' '; p++)
;
- a = (int)p;
+ a = (long)p;
b = c = d = 0;
} else
if (fscanf(sync_fp, "%d%d%d%d", &a, &b, &c, &d) != 4)
@@ -232,7 +234,7 @@ out:
sync_update(type, ship, a, b, c, d)
int type;
register struct ship *ship;
- int a, b, c, d;
+ long a, b, c, d;
{
switch (type) {
case W_DBP: {
diff --git a/snake/snake/snake.c b/snake/snake/snake.c
index 1b8ecfdc..089121cc 100644
--- a/snake/snake/snake.c
+++ b/snake/snake/snake.c
@@ -1,4 +1,4 @@
-/* $NetBSD: snake.c,v 1.6 1995/04/22 10:18:17 cgd Exp $ */
+/* $NetBSD: snake.c,v 1.7 1995/04/24 12:25:34 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)snake.c 8.2 (Berkeley) 1/7/94";
#else
-static char rcsid[] = "$NetBSD: snake.c,v 1.6 1995/04/22 10:18:17 cgd Exp $";
+static char rcsid[] = "$NetBSD: snake.c,v 1.7 1995/04/24 12:25:34 cgd Exp $";
#endif
#endif /* not lint */
@@ -97,7 +97,7 @@ char ch, savec;
char *kl, *kr, *ku, *kd;
int fast=1;
int repeat=1;
-long tv;
+time_t tv;
char *tn;
main(argc,argv)
@@ -887,7 +887,7 @@ logit(msg)
char *msg;
{
FILE *logfile;
- long t;
+ time_t t;
if ((logfile=fopen(_PATH_LOGFILE, "a")) != NULL) {
time(&t);
diff --git a/snake/snake/snake.h b/snake/snake/snake.h
index bdbd1362..fda11923 100644
--- a/snake/snake/snake.h
+++ b/snake/snake/snake.h
@@ -1,4 +1,4 @@
-/* $NetBSD: snake.h,v 1.3 1995/04/22 08:34:38 cgd Exp $ */
+/* $NetBSD: snake.h,v 1.4 1995/04/24 12:25:38 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -36,6 +36,7 @@
*/
# include <stdio.h>
+# include <string.h>
# include <assert.h>
# include <sys/types.h>
# include <sgtty.h>
diff --git a/snake/snscore/snscore.c b/snake/snscore/snscore.c
index 8ad6b59a..a45babca 100644
--- a/snake/snscore/snscore.c
+++ b/snake/snscore/snscore.c
@@ -1,4 +1,4 @@
-/* $NetBSD: snscore.c,v 1.4 1995/04/22 08:34:43 cgd Exp $ */
+/* $NetBSD: snscore.c,v 1.5 1995/04/24 12:25:43 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)snscore.c 8.1 (Berkeley) 7/19/93";
#else
-static char rcsid[] = "$NetBSD: snscore.c,v 1.4 1995/04/22 08:34:43 cgd Exp $";
+static char rcsid[] = "$NetBSD: snscore.c,v 1.5 1995/04/24 12:25:43 cgd Exp $";
#endif
#endif /* not lint */
@@ -51,6 +51,7 @@ static char rcsid[] = "$NetBSD: snscore.c,v 1.4 1995/04/22 08:34:43 cgd Exp $";
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "pathnames.h"
char *recfile = _PATH_RAWSCORES;
diff --git a/trek/computer.c b/trek/computer.c
index fba590ad..dbf5e614 100644
--- a/trek/computer.c
+++ b/trek/computer.c
@@ -1,4 +1,4 @@
-/* $NetBSD: computer.c,v 1.3 1995/04/22 10:58:39 cgd Exp $ */
+/* $NetBSD: computer.c,v 1.4 1995/04/24 12:25:51 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)computer.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: computer.c,v 1.3 1995/04/22 10:58:39 cgd Exp $";
+static char rcsid[] = "$NetBSD: computer.c,v 1.4 1995/04/24 12:25:51 cgd Exp $";
#endif
#endif /* not lint */
@@ -123,7 +123,7 @@ computer()
while (1)
{
r = getcodpar("\nRequest", Cputab);
- switch ((int)r->value)
+ switch ((long)r->value)
{
case 1: /* star chart */
diff --git a/trek/dumpgame.c b/trek/dumpgame.c
index b512d8e9..17e7e7a1 100644
--- a/trek/dumpgame.c
+++ b/trek/dumpgame.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dumpgame.c,v 1.3 1995/04/22 10:58:46 cgd Exp $ */
+/* $NetBSD: dumpgame.c,v 1.4 1995/04/24 12:25:54 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)dumpgame.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: dumpgame.c,v 1.3 1995/04/22 10:58:46 cgd Exp $";
+static char rcsid[] = "$NetBSD: dumpgame.c,v 1.4 1995/04/24 12:25:54 cgd Exp $";
#endif
#endif /* not lint */
@@ -147,7 +147,7 @@ int fd1;
register int fd;
register struct dump *d;
register int i;
- int junk;
+ long junk;
fd = fd1;
diff --git a/trek/getpar.c b/trek/getpar.c
index f2370f10..77bfa360 100644
--- a/trek/getpar.c
+++ b/trek/getpar.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getpar.c,v 1.3 1995/04/22 10:58:57 cgd Exp $ */
+/* $NetBSD: getpar.c,v 1.4 1995/04/24 12:25:57 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)getpar.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: getpar.c,v 1.3 1995/04/22 10:58:57 cgd Exp $";
+static char rcsid[] = "$NetBSD: getpar.c,v 1.4 1995/04/24 12:25:57 cgd Exp $";
#endif
#endif /* not lint */
@@ -109,7 +109,7 @@ char *s;
struct cvntab *r;
r = getcodpar(s, Yntab);
- return ((int) r->value);
+ return ((long) r->value);
}
diff --git a/trek/phaser.c b/trek/phaser.c
index b3d4ea3c..24b713a3 100644
--- a/trek/phaser.c
+++ b/trek/phaser.c
@@ -1,4 +1,4 @@
-/* $NetBSD: phaser.c,v 1.3 1995/04/22 10:59:17 cgd Exp $ */
+/* $NetBSD: phaser.c,v 1.4 1995/04/24 12:26:02 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)phaser.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: phaser.c,v 1.3 1995/04/22 10:59:17 cgd Exp $";
+static char rcsid[] = "$NetBSD: phaser.c,v 1.4 1995/04/24 12:26:02 cgd Exp $";
#endif
#endif /* not lint */
@@ -144,7 +144,7 @@ phaser()
if (!manual)
{
ptr = getcodpar("Manual or automatic", Matab);
- manual = (int) ptr->value;
+ manual = (long) ptr->value;
}
if (!manual && damaged(COMPUTER))
{
diff --git a/trek/setup.c b/trek/setup.c
index 7b67e6da..ce752026 100644
--- a/trek/setup.c
+++ b/trek/setup.c
@@ -1,4 +1,4 @@
-/* $NetBSD: setup.c,v 1.3 1995/04/22 10:59:26 cgd Exp $ */
+/* $NetBSD: setup.c,v 1.4 1995/04/24 12:26:06 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: setup.c,v 1.3 1995/04/22 10:59:26 cgd Exp $";
+static char rcsid[] = "$NetBSD: setup.c,v 1.4 1995/04/24 12:26:06 cgd Exp $";
#endif
#endif /* not lint */
@@ -90,7 +90,7 @@ setup()
while (1)
{
r = getcodpar("What length game", Lentab);
- Game.length = (int) r->value;
+ Game.length = (long) r->value;
if (Game.length == 0)
{
if (restartgame())
@@ -100,7 +100,7 @@ setup()
break;
}
r = getcodpar("What skill game", Skitab);
- Game.skill = (int) r->value;
+ Game.skill = (long) r->value;
Game.tourn = 0;
getstrpar("Enter a password", Game.passwd, 14, 0);
if (sequal(Game.passwd, "tournament"))
diff --git a/trek/shield.c b/trek/shield.c
index 6b5d56fc..a2345dc1 100644
--- a/trek/shield.c
+++ b/trek/shield.c
@@ -1,4 +1,4 @@
-/* $NetBSD: shield.c,v 1.3 1995/04/22 10:59:28 cgd Exp $ */
+/* $NetBSD: shield.c,v 1.4 1995/04/24 12:26:09 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)shield.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: shield.c,v 1.3 1995/04/22 10:59:28 cgd Exp $";
+static char rcsid[] = "$NetBSD: shield.c,v 1.4 1995/04/24 12:26:09 cgd Exp $";
#endif
#endif /* not lint */
@@ -115,7 +115,7 @@ int f;
if (f <= 0 && !testnl())
{
r = getcodpar("Up or down", Udtab);
- i = (int) r->value;
+ i = (long) r->value;
}
else
{
diff --git a/worm/worm.c b/worm/worm.c
index cbf4caae..df34c410 100644
--- a/worm/worm.c
+++ b/worm/worm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: worm.c,v 1.5 1995/04/22 07:56:23 cgd Exp $ */
+/* $NetBSD: worm.c,v 1.6 1995/04/24 12:26:16 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)worm.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: worm.c,v 1.5 1995/04/22 07:56:23 cgd Exp $";
+static char rcsid[] = "$NetBSD: worm.c,v 1.6 1995/04/24 12:26:16 cgd Exp $";
#endif
#endif /* not lint */
@@ -55,6 +55,7 @@ static char rcsid[] = "$NetBSD: worm.c,v 1.5 1995/04/22 07:56:23 cgd Exp $";
#include <ctype.h>
#include <curses.h>
#include <signal.h>
+#include <stdlib.h>
#include <termios.h>
#define newlink() (struct body *) malloc(sizeof (struct body));
diff --git a/wump/wump.c b/wump/wump.c
index 18e8401c..536324ef 100644
--- a/wump/wump.c
+++ b/wump/wump.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wump.c,v 1.3 1995/04/22 08:19:51 cgd Exp $ */
+/* $NetBSD: wump.c,v 1.4 1995/04/24 12:26:22 cgd Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)wump.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: wump.c,v 1.3 1995/04/22 08:19:51 cgd Exp $";
+static char rcsid[] = "$NetBSD: wump.c,v 1.4 1995/04/24 12:26:22 cgd Exp $";
#endif
#endif /* not lint */
@@ -60,6 +60,7 @@ static char rcsid[] = "$NetBSD: wump.c,v 1.3 1995/04/22 08:19:51 cgd Exp $";
#include <sys/types.h>
#include <sys/file.h>
#include <stdio.h>
+#include <string.h>
#include "pathnames.h"
/* some defines to spec out what our wumpus cave should look like */