fix redundant decls and nested externs. while I am here change my copyright
to TNF.
This commit is contained in:
parent
1f9a3967e4
commit
bc32159d26
@ -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));
|
||||
|
@ -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;
|
||||
|
@ -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++;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user