diff options
author | christos <christos@NetBSD.org> | 2001-02-05 00:37:43 +0000 |
---|---|---|
committer | christos <christos@NetBSD.org> | 2001-02-05 00:37:43 +0000 |
commit | dfc4e173d46d915ee76e5e481a35c6ce6c385633 (patch) | |
tree | 8a1aba09a64bec7fa75d106118c7ef0a7faff206 /hack | |
parent | 005f15c78e408f76e79e10fe47c2b0a59f754c02 (diff) | |
download | bsdgames-darwin-dfc4e173d46d915ee76e5e481a35c6ce6c385633.tar.gz bsdgames-darwin-dfc4e173d46d915ee76e5e481a35c6ce6c385633.tar.zst bsdgames-darwin-dfc4e173d46d915ee76e5e481a35c6ce6c385633.zip |
fix redundant decls and nested externs. while I am here change my copyright
to TNF.
Diffstat (limited to 'hack')
-rw-r--r-- | hack/extern.h | 51 | ||||
-rw-r--r-- | hack/hack.h | 5 | ||||
-rw-r--r-- | hack/hack.options.c | 6 | ||||
-rw-r--r-- | hack/hack.read.c | 6 | ||||
-rw-r--r-- | hack/hack.tty.c | 6 | ||||
-rw-r--r-- | hack/hack.unix.c | 7 |
6 files changed, 36 insertions, 45 deletions
diff --git a/hack/extern.h b/hack/extern.h index e9b7e0f1..c7dfcf69 100644 --- a/hack/extern.h +++ b/hack/extern.h @@ -1,7 +1,11 @@ -/* $NetBSD: extern.h,v 1.2 1999/10/04 23:27:01 lukem Exp $ */ +/* $NetBSD: extern.h,v 1.3 2001/02/05 00:37:43 christos Exp $ */ -/* - * Copyright (c) 1997 Christos Zoulas. All rights reserved. +/*- + * Copyright (c) 1997 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,20 +17,23 @@ * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: - * This product includes software developed by Christos Zoulas. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _EXTERN_H_ #define _EXTERN_H_ @@ -39,7 +46,6 @@ /* alloc.c */ long *alloc __P((unsigned)); -long *alloc __P((unsigned)); long *enlarge __P((char *, unsigned)); /* hack.apply.c */ @@ -60,12 +66,10 @@ int dopickup __P((void)); void pickup __P((int)); void lookaround __P((void)); int monster_nearby __P((void)); -int cansee __P((xchar, xchar)); int rroom __P((int, int)); int cansee __P((xchar, xchar)); int sgn __P((int)); void setsee __P((void)); -void setsee __P((void)); void nomul __P((int)); int abon __P((void)); int dbon __P((void)); @@ -451,7 +455,6 @@ int used __P((int)); /* hack.save.c */ int dosave __P((void)); -void hangup __P((int)); int dosave0 __P((int)); int dorecover __P((int)); struct obj *restobjchn __P((int)); @@ -466,15 +469,11 @@ void seemimic __P((struct monst *)); /* hack.shk.c */ void obfree __P((struct obj *, struct obj *)); -int inshop __P((void)); -int dopay __P((void)); void paybill __P((void)); -void replshk __P((struct monst *, struct monst *)); char *shkname __P((struct monst *)); void shkdead __P((struct monst *)); void replshk __P((struct monst *, struct monst *)); int inshop __P((void)); -void obfree __P((struct obj *, struct obj *)); int dopay __P((void)); struct bill_x; struct obj *bp_to_obj __P((struct bill_x *)); @@ -608,10 +607,6 @@ int gd_move __P((void)); void gddead __P((void)); void replgd __P((struct monst *, struct monst *)); void invault __P((void)); -void setgd __P((void)); -void invault __P((void)); -int gd_move __P((void)); -void replgd __P((struct monst *, struct monst *)); /* hack.version.c */ int doversion __P((void)); diff --git a/hack/hack.h b/hack/hack.h index e411ae1b..e343dfa2 100644 --- a/hack/hack.h +++ b/hack/hack.h @@ -1,4 +1,4 @@ -/* $NetBSD: hack.h,v 1.6 2001/01/16 02:50:28 cgd Exp $ */ +/* $NetBSD: hack.h,v 1.7 2001/02/05 00:37:43 christos Exp $ */ /* * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. @@ -147,7 +147,6 @@ extern char lock[]; extern char mlarge[]; extern char morc; extern char nul[]; -extern char pl_character[]; extern char plname[PL_NSIZ], pl_character[PL_CSIZ]; extern char quitchars[]; extern char sdir[]; /* defined in hack.c */ @@ -165,7 +164,6 @@ extern int nroom; extern long moves; extern long wailmsg; extern schar xdir[], ydir[]; /* idem */ -extern struct gold *fgold; extern struct monst *mydogs; extern struct monst youmonst; extern struct obj *billobjs; @@ -175,7 +173,6 @@ extern struct obj *uball; /* defined if PUNISHED */ extern struct obj *uchain; /* defined iff PUNISHED */ extern struct obj zeroobj; extern struct permonst li_dog, dog, la_dog; -extern struct permonst mons[CMNUM + 2]; extern struct permonst pm_eel; extern struct permonst pm_ghost; extern struct permonst pm_mail_daemon; diff --git a/hack/hack.options.c b/hack/hack.options.c index e9f30473..1bccb4d3 100644 --- a/hack/hack.options.c +++ b/hack/hack.options.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.options.c,v 1.4 1997/10/19 16:58:42 christos Exp $ */ +/* $NetBSD: hack.options.c,v 1.5 2001/02/05 00:37:43 christos Exp $ */ /* * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. @@ -6,10 +6,11 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.options.c,v 1.4 1997/10/19 16:58:42 christos Exp $"); +__RCSID("$NetBSD: hack.options.c,v 1.5 2001/02/05 00:37:43 christos Exp $"); #endif /* not lint */ #include <stdlib.h> +#include <unistd.h> #include "hack.h" #include "extern.h" @@ -121,7 +122,6 @@ parseoptions(opts, from_env) while (*op) { num = 1; if (digit(*op)) { -/*###124 [cc] warning: implicit declaration of function `atoi'%%%*/ num = atoi(op); while (digit(*op)) op++; diff --git a/hack/hack.read.c b/hack/hack.read.c index 60b684a5..53717f0f 100644 --- a/hack/hack.read.c +++ b/hack/hack.read.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.read.c,v 1.5 1998/08/30 09:19:37 veego Exp $ */ +/* $NetBSD: hack.read.c,v 1.6 2001/02/05 00:37:43 christos Exp $ */ /* * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. @@ -6,7 +6,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.read.c,v 1.5 1998/08/30 09:19:37 veego Exp $"); +__RCSID("$NetBSD: hack.read.c,v 1.6 2001/02/05 00:37:43 christos Exp $"); #endif /* not lint */ #include <stdlib.h> @@ -193,7 +193,6 @@ doread() } case SCR_GENOCIDE: { - extern char genocided[], fut_geno[]; char buf[BUFSZ]; struct monst *mtmp, *mtmp2; @@ -575,7 +574,6 @@ monstersym(ch) /* arnold@ucsfcgl */ char ch; { struct permonst *mp; - extern struct permonst pm_eel; /* * can't genocide certain monsters diff --git a/hack/hack.tty.c b/hack/hack.tty.c index f979e903..aa684692 100644 --- a/hack/hack.tty.c +++ b/hack/hack.tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.tty.c,v 1.7 2000/07/10 10:19:25 itojun Exp $ */ +/* $NetBSD: hack.tty.c,v 1.8 2001/02/05 00:37:43 christos Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)hack.tty.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: hack.tty.c,v 1.7 2000/07/10 10:19:25 itojun Exp $"); +__RCSID("$NetBSD: hack.tty.c,v 1.8 2001/02/05 00:37:43 christos Exp $"); #endif #endif /* not lint */ @@ -50,6 +50,7 @@ __RCSID("$NetBSD: hack.tty.c,v 1.7 2000/07/10 10:19:25 itojun Exp $"); */ #include <termios.h> +#include <termcap.h> #include "hack.h" #include "extern.h" @@ -73,7 +74,6 @@ struct termios inittyb, curttyb; void gettty() { - extern speed_t ospeed; if (tcgetattr(0, &inittyb) < 0) perror("Hack (gettty)"); curttyb = inittyb; diff --git a/hack/hack.unix.c b/hack/hack.unix.c index d640138d..a1f3d715 100644 --- a/hack/hack.unix.c +++ b/hack/hack.unix.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.unix.c,v 1.6 1999/04/25 19:08:34 kristerw Exp $ */ +/* $NetBSD: hack.unix.c,v 1.7 2001/02/05 00:37:43 christos Exp $ */ /* * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. @@ -6,7 +6,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.unix.c,v 1.6 1999/04/25 19:08:34 kristerw Exp $"); +__RCSID("$NetBSD: hack.unix.c,v 1.7 2001/02/05 00:37:43 christos Exp $"); #endif /* not lint */ /* This file collects some Unix dependencies; hack.pager.c contains some more */ @@ -36,6 +36,8 @@ __RCSID("$NetBSD: hack.unix.c,v 1.6 1999/04/25 19:08:34 kristerw Exp $"); #include "hack.h" /* mainly for strchr() which depends on BSD */ #include "extern.h" +extern int locknum; + void setrandom() @@ -209,7 +211,6 @@ veryold(fd) void getlock() { - extern int hackpid, locknum; int i = 0, fd; (void) fflush(stdout); |