Home | History | Annotate | Line # | Download | only in huntd
hunt.h revision 1.8
      1  1.8      wiz /*	$NetBSD: hunt.h,v 1.8 2003/06/11 12:00:22 wiz Exp $	*/
      2  1.3    perry 
      3  1.1      mrg /*
      4  1.8      wiz  * Copyright (c) 1983-2003, Regents of the University of California.
      5  1.8      wiz  * All rights reserved.
      6  1.8      wiz  *
      7  1.8      wiz  * Redistribution and use in source and binary forms, with or without
      8  1.8      wiz  * modification, are permitted provided that the following conditions are
      9  1.8      wiz  * met:
     10  1.8      wiz  *
     11  1.8      wiz  * + Redistributions of source code must retain the above copyright
     12  1.8      wiz  *   notice, this list of conditions and the following disclaimer.
     13  1.8      wiz  * + Redistributions in binary form must reproduce the above copyright
     14  1.8      wiz  *   notice, this list of conditions and the following disclaimer in the
     15  1.8      wiz  *   documentation and/or other materials provided with the distribution.
     16  1.8      wiz  * + Neither the name of the University of California, San Francisco nor
     17  1.8      wiz  *   the names of its contributors may be used to endorse or promote
     18  1.8      wiz  *   products derived from this software without specific prior written
     19  1.8      wiz  *   permission.
     20  1.8      wiz  *
     21  1.8      wiz  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
     22  1.8      wiz  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     23  1.8      wiz  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
     24  1.8      wiz  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     25  1.8      wiz  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     26  1.8      wiz  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     27  1.8      wiz  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     28  1.8      wiz  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     29  1.8      wiz  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     30  1.8      wiz  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     31  1.8      wiz  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32  1.1      mrg  */
     33  1.1      mrg 
     34  1.1      mrg # include "bsd.h"
     35  1.1      mrg 
     36  1.1      mrg # include	<stdio.h>
     37  1.1      mrg # include	<string.h>
     38  1.1      mrg # ifdef LOG
     39  1.1      mrg # include	<syslog.h>
     40  1.1      mrg # endif
     41  1.1      mrg # if !defined(TERMINFO) && BSD_RELEASE < 44
     42  1.1      mrg # include	<sgtty.h>
     43  1.1      mrg # else
     44  1.1      mrg # include	<sys/ioctl.h>
     45  1.1      mrg # endif
     46  1.1      mrg # include	<sys/types.h>
     47  1.1      mrg # include	<sys/uio.h>
     48  1.7  mycroft # include	<sys/poll.h>
     49  1.1      mrg # ifdef	INTERNET
     50  1.1      mrg # include	<netinet/in.h>
     51  1.1      mrg # include	<netdb.h>
     52  1.1      mrg # include	<arpa/inet.h>
     53  1.1      mrg # ifdef BROADCAST
     54  1.1      mrg # include	<net/if.h>
     55  1.1      mrg # endif
     56  1.1      mrg # else
     57  1.1      mrg # include	<sys/un.h>
     58  1.1      mrg # endif
     59  1.1      mrg 
     60  1.1      mrg # ifdef	INTERNET
     61  1.1      mrg # define	SOCK_FAMILY	AF_INET
     62  1.1      mrg # else
     63  1.1      mrg # define	SOCK_FAMILY	AF_UNIX
     64  1.1      mrg # define	AF_UNIX_HACK		/* 4.2 hack; leaves files around */
     65  1.1      mrg # endif
     66  1.1      mrg 
     67  1.1      mrg /*
     68  1.1      mrg  * Preprocessor define dependencies
     69  1.1      mrg  */
     70  1.1      mrg # if defined(VOLCANO) && !defined(OOZE)
     71  1.1      mrg # define OOZE
     72  1.1      mrg # endif
     73  1.1      mrg # if defined(BOOTS) && !defined(FLY)
     74  1.1      mrg # define FLY
     75  1.1      mrg # endif
     76  1.1      mrg # if !defined(REFLECT) && !defined(RANDOM)
     77  1.1      mrg # define RANDOM
     78  1.1      mrg # endif
     79  1.1      mrg # ifdef TERMINFO
     80  1.1      mrg /* mvcur() in terminfo needs the curses library to be initialized to not
     81  1.1      mrg  * coredump, so give up and use it. */
     82  1.1      mrg # define USE_CURSES
     83  1.1      mrg # endif
     84  1.1      mrg 
     85  1.1      mrg /* decrement version number for each change in startup protocol */
     86  1.1      mrg # define	HUNT_VERSION		-1
     87  1.1      mrg 
     88  1.1      mrg # define	ADDCH		('a' | 0200)
     89  1.1      mrg # define	MOVE		('m' | 0200)
     90  1.1      mrg # define	REFRESH		('r' | 0200)
     91  1.1      mrg # define	CLRTOEOL	('c' | 0200)
     92  1.1      mrg # define	ENDWIN		('e' | 0200)
     93  1.1      mrg # define	CLEAR		('C' | 0200)
     94  1.1      mrg # define	REDRAW		('R' | 0200)
     95  1.1      mrg # define	LAST_PLAYER	('l' | 0200)
     96  1.1      mrg # define	BELL		('b' | 0200)
     97  1.1      mrg # define	READY		('g' | 0200)
     98  1.1      mrg 
     99  1.1      mrg /*
    100  1.1      mrg  * Choose MAXPL and MAXMON carefully.  The screen is assumed to be
    101  1.1      mrg  * 23 lines high and will only tolerate (MAXPL == 17 && MAXMON == 0)
    102  1.1      mrg  * or (MAXPL + MAXMON <= 16).
    103  1.1      mrg  */
    104  1.1      mrg # ifdef MONITOR
    105  1.1      mrg # define	MAXPL		15
    106  1.1      mrg # define	MAXMON		1
    107  1.1      mrg # else
    108  1.1      mrg # define	MAXPL		17
    109  1.7  mycroft # define	MAXMON		0
    110  1.1      mrg # endif
    111  1.1      mrg # define	SHORTLEN	2		/* sizeof (network short) */
    112  1.1      mrg # define	LONGLEN		4		/* sizeof (network long) */
    113  1.1      mrg # define	NAMELEN		20
    114  1.1      mrg # define	MSGLEN		SCREEN_WIDTH
    115  1.1      mrg # define	DECAY		50.0
    116  1.1      mrg 
    117  1.1      mrg # define	NASCII		128
    118  1.1      mrg 
    119  1.1      mrg # define	WIDTH	51
    120  1.1      mrg # define	WIDTH2	64	/* Next power of 2 >= WIDTH (for fast access) */
    121  1.1      mrg # define	HEIGHT	23
    122  1.1      mrg # define	UBOUND	1
    123  1.1      mrg # define	DBOUND	(HEIGHT - 1)
    124  1.1      mrg # define	LBOUND	1
    125  1.1      mrg # define	RBOUND	(WIDTH - 1)
    126  1.1      mrg 
    127  1.1      mrg # define	SCREEN_HEIGHT	24
    128  1.1      mrg # define	SCREEN_WIDTH	80
    129  1.1      mrg # define	SCREEN_WIDTH2	128	/* Next power of 2 >= SCREEN_WIDTH */
    130  1.1      mrg 
    131  1.1      mrg # define	STAT_LABEL_COL	60
    132  1.1      mrg # define	STAT_VALUE_COL	74
    133  1.1      mrg # define	STAT_NAME_COL	61
    134  1.1      mrg # define	STAT_SCAN_COL	(STAT_NAME_COL + 5)
    135  1.1      mrg # define	STAT_AMMO_ROW	0
    136  1.1      mrg # define	STAT_GUN_ROW	1
    137  1.1      mrg # define	STAT_DAM_ROW	2
    138  1.1      mrg # define	STAT_KILL_ROW	3
    139  1.1      mrg # define	STAT_PLAY_ROW	5
    140  1.1      mrg # ifdef MONITOR
    141  1.1      mrg # define	STAT_MON_ROW	(STAT_PLAY_ROW + MAXPL + 1)
    142  1.1      mrg # endif
    143  1.1      mrg # define	STAT_NAME_LEN	18
    144  1.1      mrg 
    145  1.1      mrg # define	DOOR	'#'
    146  1.1      mrg # define	WALL1	'-'
    147  1.1      mrg # define	WALL2	'|'
    148  1.1      mrg # define	WALL3	'+'
    149  1.1      mrg # ifdef REFLECT
    150  1.1      mrg # define	WALL4	'/'
    151  1.1      mrg # define	WALL5	'\\'
    152  1.1      mrg # endif
    153  1.1      mrg # define	KNIFE	'K'
    154  1.1      mrg # define	SHOT	':'
    155  1.1      mrg # define	GRENADE	'o'
    156  1.1      mrg # define	SATCHEL	'O'
    157  1.1      mrg # define	BOMB	'@'
    158  1.1      mrg # define	MINE	';'
    159  1.1      mrg # define	GMINE	'g'
    160  1.1      mrg # ifdef	OOZE
    161  1.1      mrg # define	SLIME	'$'
    162  1.1      mrg # endif
    163  1.1      mrg # ifdef	VOLCANO
    164  1.1      mrg # define	LAVA	'~'
    165  1.1      mrg # endif
    166  1.1      mrg # ifdef DRONE
    167  1.1      mrg # define	DSHOT	'?'
    168  1.1      mrg # endif
    169  1.1      mrg # ifdef FLY
    170  1.1      mrg # define	FALL	'F'
    171  1.1      mrg # endif
    172  1.1      mrg # ifdef BOOTS
    173  1.1      mrg # define	NBOOTS		2
    174  1.1      mrg # define	BOOT		'b'
    175  1.1      mrg # define	BOOT_PAIR	'B'
    176  1.1      mrg # endif
    177  1.1      mrg # define	SPACE	' '
    178  1.1      mrg 
    179  1.1      mrg # define	ABOVE	'i'
    180  1.1      mrg # define	BELOW	'!'
    181  1.1      mrg # define	RIGHT	'}'
    182  1.1      mrg # define	LEFTS	'{'
    183  1.1      mrg # ifdef FLY
    184  1.1      mrg # define	FLYER	'&'
    185  1.1      mrg # define	isplayer(c)	(c == LEFTS || c == RIGHT ||\
    186  1.1      mrg 				c == ABOVE || c == BELOW || c == FLYER)
    187  1.1      mrg # else
    188  1.1      mrg # define	isplayer(c)	(c == LEFTS || c == RIGHT ||\
    189  1.1      mrg 				c == ABOVE || c == BELOW)
    190  1.1      mrg # endif
    191  1.1      mrg 
    192  1.1      mrg # define	NORTH	01
    193  1.1      mrg # define	SOUTH	02
    194  1.1      mrg # define	EAST	010
    195  1.1      mrg # define	WEST	020
    196  1.1      mrg 
    197  1.1      mrg # ifndef TRUE
    198  1.1      mrg # define	TRUE	1
    199  1.1      mrg # define	FALSE	0
    200  1.1      mrg # endif
    201  1.1      mrg # undef CTRL
    202  1.1      mrg # define	CTRL(x)	((x) & 037)
    203  1.1      mrg 
    204  1.1      mrg # define	BULSPD		5		/* bullets movement speed */
    205  1.1      mrg # define	ISHOTS		15
    206  1.1      mrg # define	NSHOTS		5
    207  1.1      mrg # define	MAXNCSHOT	2
    208  1.1      mrg # define	MAXDAM		10
    209  1.1      mrg # define	MINDAM		5
    210  1.1      mrg # define	STABDAM		2
    211  1.1      mrg 
    212  1.1      mrg # define	BULREQ		1
    213  1.1      mrg # define	GRENREQ		9
    214  1.1      mrg # define	SATREQ		25
    215  1.1      mrg # define	BOMB7REQ	49
    216  1.1      mrg # define	BOMB9REQ	81
    217  1.1      mrg # define	BOMB11REQ	121
    218  1.1      mrg # define	BOMB13REQ	169
    219  1.1      mrg # define	BOMB15REQ	225
    220  1.1      mrg # define	BOMB17REQ	289
    221  1.1      mrg # define	BOMB19REQ	361
    222  1.1      mrg # define	BOMB21REQ	441
    223  1.1      mrg # define	MAXBOMB		11
    224  1.1      mrg # ifdef DRONE
    225  1.1      mrg # define	MINDSHOT	2	/* At least a satchel bomb */
    226  1.1      mrg # endif
    227  1.1      mrg extern int	shot_req[];
    228  1.1      mrg extern int	shot_type[];
    229  1.1      mrg # ifdef	OOZE
    230  1.1      mrg # define	SLIME_FACTOR	3
    231  1.1      mrg # define	SLIMEREQ	5
    232  1.1      mrg # define	SSLIMEREQ	10
    233  1.1      mrg # define	SLIME2REQ	15
    234  1.1      mrg # define	SLIME3REQ	20
    235  1.1      mrg # define	MAXSLIME	4
    236  1.1      mrg # define	SLIMESPEED	5
    237  1.1      mrg extern int	slime_req[];
    238  1.1      mrg # endif
    239  1.1      mrg # ifdef	VOLCANO
    240  1.1      mrg # define	LAVASPEED	1
    241  1.1      mrg # endif
    242  1.1      mrg 
    243  1.1      mrg # define	CLOAKLEN	20
    244  1.1      mrg # define	SCANLEN		(Nplayer * 20)
    245  1.1      mrg # define	EXPLEN		4
    246  1.1      mrg 
    247  1.1      mrg # define	Q_QUIT		0
    248  1.1      mrg # define	Q_CLOAK		1
    249  1.1      mrg # define	Q_FLY		2
    250  1.1      mrg # define	Q_SCAN		3
    251  1.1      mrg # define	Q_MESSAGE	4
    252  1.1      mrg 
    253  1.1      mrg # define	C_PLAYER	0
    254  1.1      mrg # define	C_MONITOR	1
    255  1.1      mrg # define	C_MESSAGE	2
    256  1.1      mrg # define	C_SCORES	3
    257  1.1      mrg 
    258  1.1      mrg # ifdef MONITOR
    259  1.1      mrg # define	C_TESTMSG()	(Query_driver ? C_MESSAGE :\
    260  1.1      mrg 				(Show_scores ? C_SCORES :\
    261  1.1      mrg 				(Am_monitor ? C_MONITOR :\
    262  1.1      mrg 				C_PLAYER)))
    263  1.1      mrg # else
    264  1.1      mrg # define	C_TESTMSG()	(Show_scores ? C_SCORES :\
    265  1.1      mrg 				(Query_driver ? C_MESSAGE :\
    266  1.1      mrg 				C_PLAYER))
    267  1.1      mrg # endif
    268  1.1      mrg 
    269  1.1      mrg # ifdef FLY
    270  1.1      mrg # define	_scan_char(pp)	(((pp)->p_scan < 0) ? ' ' : '*')
    271  1.1      mrg # define	_cloak_char(pp)	(((pp)->p_cloak < 0) ? _scan_char(pp) : '+')
    272  1.1      mrg # define	stat_char(pp)	(((pp)->p_flying < 0) ? _cloak_char(pp) : FLYER)
    273  1.1      mrg # else
    274  1.1      mrg # define	_scan_char(pp)	(((pp)->p_scan < 0) ? ' ' : '*')
    275  1.1      mrg # define	stat_char(pp)	(((pp)->p_cloak < 0) ? _scan_char(pp) : '+')
    276  1.1      mrg # endif
    277  1.1      mrg 
    278  1.1      mrg typedef int			FLAG;
    279  1.1      mrg typedef struct bullet_def	BULLET;
    280  1.1      mrg typedef struct expl_def		EXPL;
    281  1.1      mrg typedef struct player_def	PLAYER;
    282  1.1      mrg typedef struct ident_def	IDENT;
    283  1.1      mrg typedef struct regen_def	REGEN;
    284  1.1      mrg # ifdef	INTERNET
    285  1.1      mrg typedef struct sockaddr_in	SOCKET;
    286  1.1      mrg # else
    287  1.1      mrg typedef struct sockaddr_un	SOCKET;
    288  1.1      mrg # endif
    289  1.1      mrg 
    290  1.1      mrg struct ident_def {
    291  1.1      mrg 	char	i_name[NAMELEN];
    292  1.1      mrg 	char	i_team;
    293  1.1      mrg 	long	i_machine;
    294  1.1      mrg 	long	i_uid;
    295  1.1      mrg 	float	i_kills;
    296  1.1      mrg 	int	i_entries;
    297  1.1      mrg 	float	i_score;
    298  1.1      mrg 	int	i_absorbed;
    299  1.1      mrg 	int	i_faced;
    300  1.1      mrg 	int	i_shot;
    301  1.1      mrg 	int	i_robbed;
    302  1.1      mrg 	int	i_slime;
    303  1.1      mrg 	int	i_missed;
    304  1.1      mrg 	int	i_ducked;
    305  1.1      mrg 	int	i_gkills, i_bkills, i_deaths, i_stillb, i_saved;
    306  1.1      mrg 	IDENT	*i_next;
    307  1.1      mrg };
    308  1.1      mrg 
    309  1.1      mrg struct player_def {
    310  1.1      mrg 	IDENT	*p_ident;
    311  1.1      mrg 	char	p_over;
    312  1.1      mrg 	int	p_face;
    313  1.1      mrg 	int	p_undershot;
    314  1.1      mrg # ifdef	FLY
    315  1.1      mrg 	int	p_flying;
    316  1.1      mrg 	int	p_flyx, p_flyy;
    317  1.1      mrg # endif
    318  1.1      mrg # ifdef	BOOTS
    319  1.1      mrg 	int	p_nboots;
    320  1.1      mrg # endif
    321  1.1      mrg 	FILE	*p_output;
    322  1.1      mrg 	int	p_fd;
    323  1.1      mrg 	int	p_mask;
    324  1.1      mrg 	int	p_damage;
    325  1.1      mrg 	int	p_damcap;
    326  1.1      mrg 	int	p_ammo;
    327  1.1      mrg 	int	p_ncshot;
    328  1.1      mrg 	int	p_scan;
    329  1.1      mrg 	int	p_cloak;
    330  1.1      mrg 	int	p_x, p_y;
    331  1.1      mrg 	int	p_ncount;
    332  1.1      mrg 	int	p_nexec;
    333  1.1      mrg 	long	p_nchar;
    334  1.1      mrg 	char	p_death[MSGLEN];
    335  1.1      mrg 	char	p_maze[HEIGHT][WIDTH2];
    336  1.1      mrg 	int	p_curx, p_cury;
    337  1.1      mrg 	int	p_lastx, p_lasty;
    338  1.1      mrg 	char	p_cbuf[BUFSIZ];
    339  1.1      mrg };
    340  1.1      mrg 
    341  1.1      mrg struct bullet_def {
    342  1.1      mrg 	int	b_x, b_y;
    343  1.1      mrg 	int	b_face;
    344  1.1      mrg 	int	b_charge;
    345  1.1      mrg 	char	b_type;
    346  1.1      mrg 	char	b_size;
    347  1.1      mrg 	char	b_over;
    348  1.1      mrg 	PLAYER	*b_owner;
    349  1.1      mrg 	IDENT	*b_score;
    350  1.1      mrg 	FLAG	b_expl;
    351  1.1      mrg 	BULLET	*b_next;
    352  1.1      mrg };
    353  1.1      mrg 
    354  1.1      mrg struct expl_def {
    355  1.1      mrg 	int	e_x, e_y;
    356  1.1      mrg 	char	e_char;
    357  1.1      mrg 	EXPL	*e_next;
    358  1.1      mrg };
    359  1.1      mrg 
    360  1.1      mrg struct regen_def {
    361  1.1      mrg 	int	r_x, r_y;
    362  1.1      mrg 	REGEN	*r_next;
    363  1.1      mrg };
    364  1.1      mrg 
    365  1.1      mrg /*
    366  1.1      mrg  * external variables
    367  1.1      mrg  */
    368  1.1      mrg 
    369  1.1      mrg extern FLAG	Last_player;
    370  1.1      mrg 
    371  1.1      mrg extern char	Buf[BUFSIZ], Maze[HEIGHT][WIDTH2], Orig_maze[HEIGHT][WIDTH2];
    372  1.1      mrg 
    373  1.8      wiz extern char	*Driver;
    374  1.1      mrg 
    375  1.7  mycroft extern int	Nplayer, Socket, Status;
    376  1.7  mycroft extern struct	pollfd fdset[];
    377  1.1      mrg 
    378  1.1      mrg # ifdef INTERNET
    379  1.1      mrg extern u_short	Test_port;
    380  1.1      mrg # else
    381  1.8      wiz extern char	*Sock_name, *Stat_name;
    382  1.1      mrg # endif
    383  1.1      mrg 
    384  1.1      mrg # ifdef VOLCANO
    385  1.1      mrg extern int	volcano;
    386  1.1      mrg # endif
    387  1.1      mrg 
    388  1.1      mrg extern int	See_over[NASCII];
    389  1.1      mrg 
    390  1.1      mrg extern BULLET	*Bullets;
    391  1.1      mrg 
    392  1.1      mrg extern EXPL	*Expl[EXPLEN];
    393  1.1      mrg extern EXPL	*Last_expl;
    394  1.1      mrg 
    395  1.1      mrg extern IDENT	*Scores;
    396  1.1      mrg 
    397  1.1      mrg extern PLAYER	Player[MAXPL], *End_player;
    398  1.1      mrg # ifdef BOOTS
    399  1.1      mrg extern PLAYER	Boot[NBOOTS];
    400  1.1      mrg # endif
    401  1.1      mrg 
    402  1.1      mrg # ifdef MONITOR
    403  1.1      mrg extern FLAG	Am_monitor;
    404  1.1      mrg extern PLAYER	Monitor[MAXMON], *End_monitor;
    405  1.1      mrg # endif
    406  1.1      mrg 
    407  1.1      mrg # ifdef INTERNET
    408  1.1      mrg extern char	*Send_message;
    409  1.1      mrg # endif
    410  1.1      mrg 
    411  1.1      mrg extern char	map_key[256];
    412  1.1      mrg extern FLAG	no_beep;
    413  1.1      mrg 
    414  1.1      mrg /*
    415  1.1      mrg  * function types
    416  1.1      mrg  */
    417  1.1      mrg 
    418  1.2    lukem void		add_shot __P((int, int, int, char, int, PLAYER *, int, char));
    419  1.2    lukem int		answer __P((void));
    420  1.2    lukem void		bad_con __P((void));
    421  1.2    lukem void		bad_ver __P((void));
    422  1.2    lukem int		broadcast_vec __P((int, struct	sockaddr **));
    423  1.2    lukem void		ce __P((PLAYER *));
    424  1.2    lukem void		cgoto __P((PLAYER *, int, int));
    425  1.2    lukem void		check __P((PLAYER *, int, int));
    426  1.2    lukem void		checkdam __P((PLAYER *, PLAYER *, IDENT *, int, char));
    427  1.2    lukem void		clearwalls __P((void));
    428  1.2    lukem void		clear_eol __P((void));
    429  1.2    lukem void		clear_the_screen __P((void));
    430  1.2    lukem void		clrscr __P((PLAYER *));
    431  1.2    lukem BULLET	       *create_shot __P((int, int, int, char, int, int, PLAYER *,
    432  1.2    lukem 		    IDENT *, int, char));
    433  1.2    lukem void		do_connect __P((char *, char, long));
    434  1.2    lukem void		do_message __P((void));
    435  1.2    lukem void		drawmaze __P((PLAYER *));
    436  1.2    lukem void		drawplayer __P((PLAYER *, FLAG));
    437  1.2    lukem void		drawstatus __P((PLAYER *));
    438  1.2    lukem void		execute __P((PLAYER *));
    439  1.2    lukem void		faketalk __P((void));
    440  1.2    lukem void		find_driver __P((FLAG));
    441  1.2    lukem void		fixshots __P((int, int, char));
    442  1.2    lukem IDENT	       *get_ident __P((u_long, u_long, char *, char));
    443  1.2    lukem void		get_local_name __P((char *));
    444  1.2    lukem int		get_remote_name __P((char *));
    445  1.2    lukem BULLET	       *is_bullet __P((int, int));
    446  1.2    lukem void		look __P((PLAYER *));
    447  1.2    lukem void		makemaze __P((void));
    448  1.2    lukem void		message __P((PLAYER *, char *));
    449  1.2    lukem void		mon_execute __P((PLAYER *));
    450  1.2    lukem void		moveshots __P((void));
    451  1.2    lukem void		open_ctl __P((void));
    452  1.2    lukem int		opposite __P((int, char));
    453  1.2    lukem void		otto __P((int, int, char));
    454  1.2    lukem void		outch __P((PLAYER *, int));
    455  1.2    lukem void		outstr __P((PLAYER *, char *, int));
    456  1.2    lukem int		player_sym __P((PLAYER *, int, int));
    457  1.2    lukem PLAYER	       *play_at __P((int, int));
    458  1.2    lukem void		playit __P((void));
    459  1.2    lukem void		put_ch __P((char));
    460  1.2    lukem void		put_str __P((char *));
    461  1.2    lukem int		quit __P((int));
    462  1.2    lukem int		rand_dir __P((void));
    463  1.2    lukem int		rand_num __P((int));
    464  1.2    lukem void		redraw_screen __P((void));
    465  1.2    lukem void		rmnl __P((char *));
    466  1.2    lukem void		rollexpl __P((void));
    467  1.2    lukem void		see __P((PLAYER *, int));
    468  1.2    lukem void		sendcom __P((PLAYER *, int, ...));
    469  1.2    lukem void		showexpl __P((int, int, char));
    470  1.2    lukem void		showstat __P((PLAYER *));
    471  1.2    lukem void		start_driver __P((void));
    472  1.2    lukem void		stmonitor __P((PLAYER *));
    473  1.2    lukem void		stplayer __P((PLAYER *, int));
    474  1.2    lukem char		translate __P((char));
    475  1.5  hubertf SIGNAL_TYPE	cleanup __P((int)) __attribute__((__noreturn__));
    476  1.2    lukem SIGNAL_TYPE	intr __P((int));
    477  1.2    lukem SIGNAL_TYPE	sigalrm __P((int));
    478  1.2    lukem SIGNAL_TYPE	sigemt __P((int));
    479  1.2    lukem SIGNAL_TYPE	sigterm __P((int));
    480  1.2    lukem SIGNAL_TYPE	tstp __P((int));
    481