summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>1993-04-18 21:52:18 +0000
committermycroft <mycroft@NetBSD.org>1993-04-18 21:52:18 +0000
commit9b85680687e77d758ed4d5f002375aa6f88dc803 (patch)
treec56ea44ec5afb5b70ac6ca16fafdc70a663e3a79
parentd244d8703e3d0edbd492dca367d74db166e8a687 (diff)
downloadbsdgames-darwin-9b85680687e77d758ed4d5f002375aa6f88dc803.tar.gz
bsdgames-darwin-9b85680687e77d758ed4d5f002375aa6f88dc803.tar.zst
bsdgames-darwin-9b85680687e77d758ed4d5f002375aa6f88dc803.zip
Cleanup for GCC 2.
-rw-r--r--dm/dm.c3
-rw-r--r--fortune/fortune/fortune.c2
-rw-r--r--hack/hack.apply.c2
-rw-r--r--hack/hack.invent.c2
-rw-r--r--hack/hack.mkshop.c2
-rw-r--r--ppt/ppt.c2
-rw-r--r--quiz/rxp.c6
-rw-r--r--snake/snake/move.c13
-rw-r--r--snake/snake/snake.c4
-rw-r--r--worms/worms.c5
10 files changed, 20 insertions, 21 deletions
diff --git a/dm/dm.c b/dm/dm.c
index bf820688..bbd0c447 100644
--- a/dm/dm.c
+++ b/dm/dm.c
@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)dm.c 5.16 (Berkeley) 2/28/91";
#include <nlist.h>
#include <stdio.h>
#include <ctype.h>
+#include <string.h>
#include "pathnames.h"
extern int errno;
@@ -89,7 +90,7 @@ main(argc, argv)
play(args)
char **args;
{
- char pbuf[MAXPATHLEN], *strcpy(), *strerror();
+ char pbuf[MAXPATHLEN];
(void)strcpy(pbuf, _PATH_HIDE);
(void)strcpy(pbuf + sizeof(_PATH_HIDE) - 1, game);
diff --git a/fortune/fortune/fortune.c b/fortune/fortune/fortune.c
index af138220..4475102c 100644
--- a/fortune/fortune/fortune.c
+++ b/fortune/fortune/fortune.c
@@ -57,6 +57,7 @@ static char sccsid[] = "@(#)fortune.c 5.13 (Berkeley) 4/8/91";
# include <sys/dir.h>
# include <stdio.h>
# include <assert.h>
+# include <stdlib.h>
# include "strfile.h"
# include "pathnames.h"
@@ -925,7 +926,6 @@ get_fort()
{
register FILEDESC *fp;
register int choice;
- long random();
if (File_list->next == NULL || File_list->percent == NO_PROB)
fp = File_list;
diff --git a/hack/hack.apply.c b/hack/hack.apply.c
index ebdf82ad..18da738d 100644
--- a/hack/hack.apply.c
+++ b/hack/hack.apply.c
@@ -4,7 +4,7 @@
#include "hack.h"
#include "def.edog.h"
#include "def.mkroom.h"
-extern struct monst *bchit();
+static struct monst *bchit();
extern struct obj *addinv();
extern struct trap *maketrap();
extern int (*occupation)();
diff --git a/hack/hack.invent.c b/hack/hack.invent.c
index c4620ca1..66949b87 100644
--- a/hack/hack.invent.c
+++ b/hack/hack.invent.c
@@ -7,7 +7,7 @@ extern struct obj *splitobj();
extern struct obj zeroobj;
extern char morc;
extern char quitchars[];
-char *xprname();
+static char *xprname();
#ifndef NOWORM
#include "def.wseg.h"
diff --git a/hack/hack.mkshop.c b/hack/hack.mkshop.c
index 9d99a22d..6553eee0 100644
--- a/hack/hack.mkshop.c
+++ b/hack/hack.mkshop.c
@@ -1,6 +1,7 @@
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* hack.mkshop.c - version 1.0.3 */
+#include <stdlib.h>
#ifndef QUEST
#include "hack.h"
#include "def.mkroom.h"
@@ -21,7 +22,6 @@ register struct monst *shk;
#ifdef WIZARD
/* first determine shoptype */
if(wizard){
- extern char *getenv();
register char *ep = getenv("SHOPTYPE");
if(ep){
if(*ep == 'z' || *ep == 'Z'){
diff --git a/ppt/ppt.c b/ppt/ppt.c
index 41b8e8e0..77086333 100644
--- a/ppt/ppt.c
+++ b/ppt/ppt.c
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)ppt.c 5.4 (Berkeley) 6/1/90";
#include <stdio.h>
-void putppt();
+static void putppt();
main(argc, argv)
int argc;
diff --git a/quiz/rxp.c b/quiz/rxp.c
index 7adf8b5f..8fe76a9e 100644
--- a/quiz/rxp.c
+++ b/quiz/rxp.c
@@ -77,9 +77,9 @@ typedef short Rxp_t; /* type for regexp tokens */
static Rxp_t rxpbuf[RXP_LINE_SZ]; /* compiled regular expression buffer */
char rxperr[128]; /* parser error message */
-int rxp__compile __P((char *, int));
-char *rxp__expand __P((int));
-int rxp__match __P((char *, int, Rxp_t *, Rxp_t *, char *));
+static int rxp__compile __P((char *, int));
+static char *rxp__expand __P((int));
+static int rxp__match __P((char *, int, Rxp_t *, Rxp_t *, char *));
int
rxp_compile(s)
diff --git a/snake/snake/move.c b/snake/snake/move.c
index decddf6d..95f4f3fd 100644
--- a/snake/snake/move.c
+++ b/snake/snake/move.c
@@ -386,29 +386,24 @@ pch(c)
}
}
-apr(ps, fmt)
+apr(ps, fmt, ap)
struct point *ps;
char *fmt;
+ _VA_LIST_ ap;
{
struct point p;
- va_list ap;
p.line = ps->line+1; p.col = ps->col+1;
move(&p);
- va_start(ap, fmt);
(void)vsprintf(str, fmt, ap);
- va_end(ap);
pstring(str);
}
-pr(fmt)
+pr(fmt, ap)
char *fmt;
+ _VA_LIST_ ap;
{
- va_list ap;
-
- va_start(ap, fmt);
(void)vsprintf(str, fmt, ap);
- va_end(ap);
pstring(str);
}
diff --git a/snake/snake/snake.c b/snake/snake/snake.c
index 686465e7..7450bd51 100644
--- a/snake/snake/snake.c
+++ b/snake/snake/snake.c
@@ -56,6 +56,8 @@ static char sccsid[] = "@(#)snake.c 5.10 (Berkeley) 2/28/91";
#include <fcntl.h>
#include <pwd.h>
#include <errno.h>
+#include <stdlib.h>
+#include <time.h>
#include "snake.h"
#include "pathnames.h"
@@ -97,8 +99,6 @@ char **argv;
extern char *optarg;
extern int optind;
int ch, i, j, k;
- time_t time();
- long atol();
void stop();
(void)time(&tv);
diff --git a/worms/worms.c b/worms/worms.c
index 0e780361..370c2e0e 100644
--- a/worms/worms.c
+++ b/worms/worms.c
@@ -60,6 +60,7 @@ static char sccsid[] = "@(#)worms.c 5.9 (Berkeley) 2/28/91";
*/
#include <sys/types.h>
#include <stdio.h>
+#include <stdlib.h>
#ifdef USG
#include <termio.h>
#else
@@ -179,6 +180,8 @@ static struct worm {
short *xpos, *ypos;
} *worm;
+char *tgetstr(), *tgoto();
+
main(argc, argv)
int argc;
char **argv;
@@ -195,7 +198,7 @@ main(argc, argv)
void onsig();
short **ref;
char *AL, *BC, *CM, *EI, *HO, *IC, *IM, *IP, *SR;
- char *field, tcb[100], *mp, *malloc(), *getenv(), *tgetstr(), *tgoto();
+ char *field, tcb[100], *mp;
long random();
#ifdef USG
struct termio sg;