]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - hack/hack.mon.c
cgram: rewrite completely, fixing bugs and style
[bsdgames-darwin.git] / hack / hack.mon.c
index 9f6e7e97f6e116ad4d593ea0b7cbfb1b56feb9a7..8dd587ecb64161aaa3490bada286f6c59c841129 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: hack.mon.c,v 1.11 2011/05/30 03:11:15 joerg 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,
@@ -63,7 +63,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: hack.mon.c,v 1.11 2011/05/30 03:11:15 joerg Exp $");
+__RCSID("$NetBSD: hack.mon.c,v 1.14 2011/08/07 06:03:45 dholland Exp $");
 #endif                         /* not lint */
 
 #include <stdlib.h>
@@ -71,10 +71,6 @@ __RCSID("$NetBSD: hack.mon.c,v 1.11 2011/05/30 03:11:15 joerg Exp $");
 #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;
@@ -769,7 +765,7 @@ dmonsfree(void)
        struct monst   *mtmp;
        while ((mtmp = fdmon) != NULL) {
                fdmon = mtmp->nmon;
-               free((char *) mtmp);
+               free(mtmp);
        }
 }
 
@@ -852,6 +848,7 @@ killed(struct monst *mtmp)
        {
                int             ul = u.ulevel;
                int             ml = mdat->mlevel;
+               int tmp2;
 
                if (ul < 14)    /* points are given based on present and
                                 * future level */