NetBSD/games/hack/hack.Decl.c
jsm ab8b63434d Make mostly gcc -W clean, and other cleanup:
Use const.
Add __noreturn__ attributes.
Add a __format__ attribute.
Add __unused__ attributes.
Use symbolic constants for open() and lseek().
Declare types of all function parameters; convert some function
definitions to ISO C form.
Ensure standard file descriptors are open on startup.
Check for errors writing output of makedefs.
Avoid duplicate definitions of variables.
2001-03-25 20:43:58 +00:00

54 lines
1.5 KiB
C

/* $NetBSD: hack.Decl.c,v 1.5 2001/03/25 20:43:59 jsm Exp $ */
/*
* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
*/
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: hack.Decl.c,v 1.5 2001/03/25 20:43:59 jsm Exp $");
#endif /* not lint */
#include "hack.h"
char nul[40]; /* contains zeros */
char plname[PL_NSIZ];/* player name */
char lock[PL_NSIZ + 4] = "1lock"; /* long enough for login name
* .99 */
boolean in_mklev, restoring;
struct rm levl[COLNO][ROWNO]; /* level map */
#ifndef QUEST
#include "def.mkroom.h"
struct mkroom rooms[MAXNROFROOMS + 1];
coord doors[DOORMAX];
#endif /* QUEST */
struct monst *fmon = 0;
struct trap *ftrap = 0;
struct gold *fgold = 0;
struct obj *fobj = 0, *fcobj = 0, *invent = 0, *uwep = 0, *uarm = 0, *uarm2 = 0,
*uarmh = 0, *uarms = 0, *uarmg = 0, *uright = 0, *uleft = 0,
*uchain = 0, *uball = 0;
struct flag flags;
struct you u;
struct monst youmonst; /* dummy; used as return value for boomhit */
xchar dlevel = 1;
xchar xupstair, yupstair, xdnstair, ydnstair;
char *save_cm = 0;
const char *killer, *nomovemsg;
long moves = 1;
long wailmsg = 0;
int multi = 0;
char genocided[60];
char fut_geno[60];
xchar curx, cury;
xchar seelx, seehx, seely, seehy; /* corners of lit room */
coord bhitpos;
const char quitchars[] = " \r\n\033";