-/* $NetBSD: hack.mon.c,v 1.9 2009/06/07 18:30:39 dholland Exp $ */
+/* $NetBSD: hack.mon.c,v 1.14 2011/08/07 06:03:45 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.mon.c,v 1.9 2009/06/07 18:30:39 dholland Exp $");
+__RCSID("$NetBSD: hack.mon.c,v 1.14 2011/08/07 06:03:45 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
#include "extern.h"
#include "hack.mfndpos.h"
-#ifndef NULL
-#define NULL (char *) 0
-#endif
+static int warnlevel; /* used by movemon and dochugw */
+static long lastwarntime;
+static int lastwarnlev;
-int warnlevel; /* used by movemon and dochugw */
-long lastwarntime;
-int lastwarnlev;
-const char *const warnings[] = {
+static const char *const warnings[] = {
"white", "pink", "red", "ruby", "purple", "black"
};
+static int dochugw(struct monst *);
+static void mpickgold(struct monst *);
+static void mpickgems(struct monst *);
+static void dmonsfree(void);
+static int ishuman(struct monst *);
+
void
movemon(void)
{
}
void
-youswld(struct monst *mtmp, int dam, int die, const char *name)
+youswld(struct monst *mtmp, int dam, unsigned int die, const char *name)
{
if (mtmp != u.ustuck)
return;
#endif
}
-int
+static int
dochugw(struct monst *mtmp)
{
int x = mtmp->mx;
return (mmoved);
}
-void
+static void
mpickgold(struct monst *mtmp)
{
struct gold *gold;
}
}
-void
+static void
mpickgems(struct monst *mtmp)
{
struct obj *otmp;
* we do not free monsters immediately, in order to have their name available
* shortly after their demise
*/
-struct monst *fdmon; /* chain of dead monsters, need not to be
+static struct monst *fdmon; /* chain of dead monsters, need not to be
* saved */
void
fdmon = mtmp;
}
-void
+static void
dmonsfree(void)
{
struct monst *mtmp;
while ((mtmp = fdmon) != NULL) {
fdmon = mtmp->nmon;
- free((char *) mtmp);
+ free(mtmp);
}
}
{
int ul = u.ulevel;
int ml = mdat->mlevel;
+ int tmp2;
if (ul < 14) /* points are given based on present and
* future level */
pmon(mtmp);
}
-int
+static int
ishuman(struct monst *mtmp)
{
return (mtmp->data->mlet == '@');