]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - hack/hack.c
- enlarge buffer to avoid snprintf() truncation
[bsdgames-darwin.git] / hack / hack.c
index 72c2ee9c88fcf9da5b1a6d8e67c80dafa91eb97d..25a429c2c1ff362306e9daa6e9ae7dbb4193799d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: hack.c,v 1.8 2009/06/07 18:30:39 dholland Exp $        */
+/*     $NetBSD: hack.c,v 1.11 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.c,v 1.8 2009/06/07 18:30:39 dholland Exp $");
+__RCSID("$NetBSD: hack.c,v 1.11 2011/08/07 06:03:45 dholland Exp $");
 #endif                         /* not lint */
 
 #include "hack.h"
 #include "extern.h"
 
+static void movobj(struct obj *, int, int);
+static int inv_cnt(void);
+
 /*
  * called on movement: 1. when throwing ball+chain far away 2. when
  * teleporting 3. when walking out of a lit room
@@ -381,7 +384,7 @@ nodrag:     ;
                read_engr_at(u.ux, u.uy);
 }
 
-void
+static void
 movobj(struct obj *obj, int ox, int oy)
 {
        /* Some dirty programming to get display right */
@@ -456,7 +459,7 @@ pickup(int all)
 
                                pline("Pick up %s ? [ynaq]", doname(obj));
                                while (!strchr("ynaq ", (c = readchar())))
-                                       bell();
+                                       sound_bell();
                                if (c == 'q')
                                        return;
                                if (c == 'n')
@@ -597,7 +600,7 @@ lookaround(void)
                                        break;
                                if (flags.run != 1)
                                        goto stop;
-                               /* fall into next case */
+                               /* FALLTHROUGH */
                        case CORR_SYM:
                corr:
                                if (flags.run == 1 || flags.run == 3) {
@@ -947,7 +950,7 @@ inv_weight(void)
        return (wt - carrcap);
 }
 
-int
+static int
 inv_cnt(void)
 {
        struct obj *otmp = invent;