]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - hack/hack.u_init.c
games/hack: Fix -Wstringop-truncation warning.
[bsdgames-darwin.git] / hack / hack.u_init.c
index 5bed1e5ee4cb825c544390c82a5973ad97cdac2b..d284911579f02b906179e216092be78939d6ec91 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: hack.u_init.c,v 1.11 2009/08/12 07:28:41 dholland Exp $        */
+/*     $NetBSD: hack.u_init.c,v 1.13 2011/08/06 19:32:58 dholland Exp $        */
 
 /*
  * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: hack.u_init.c,v 1.11 2009/08/12 07:28:41 dholland Exp $");
+__RCSID("$NetBSD: hack.u_init.c,v 1.13 2011/08/06 19:32:58 dholland Exp $");
 #endif                         /* not lint */
 
 #include <ctype.h>
@@ -184,7 +184,7 @@ u_init(void)
        printf("\nAre you an experienced player? [ny] ");
 
        while (!strchr("ynYN \n\004", (exper = readchar())))
-               bell();
+               sound_bell();
        if (exper == '\004')    /* Give him an opportunity to get out */
                end_of_input();
        printf("%c\n", exper);  /* echo */
@@ -218,7 +218,7 @@ u_init(void)
                if (pc == '\004')       /* Give him the opportunity to get
                                         * out */
                        end_of_input();
-               bell();
+               sound_bell();
        }
        if (pc == '\n')
                pc = 0;
@@ -377,16 +377,8 @@ ini_inv(struct trobj *trop)
                if (obj->olet == WEAPON_SYM)
                        if (!uwep)
                                setuwep(obj);
-#ifndef PYRAMID_BUG
                if (--trop->trquan)
                        continue;       /* make a similar object */
-#else
-               if (trop->trquan) {     /* check if zero first */
-                       --trop->trquan;
-                       if (trop->trquan)
-                               continue;       /* make a similar object */
-               }
-#endif /* PYRAMID_BUG */
                trop++;
        }
 }