]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - hack/hack.main.c
caesar: WARNS=6, strict bool mode
[bsdgames-darwin.git] / hack / hack.main.c
index 05bd88f910339e52e9ee9e54d95be8c378e000f1..5083a36e4af960c2c008a9cbde60a7870de383c1 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: hack.main.c,v 1.13 2009/06/29 23:05:33 dholland Exp $  */
+/*     $NetBSD: hack.main.c,v 1.17 2011/08/06 20:42:43 dholland Exp $  */
 
 /*
  * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: hack.main.c,v 1.13 2009/06/29 23:05:33 dholland Exp $");
+__RCSID("$NetBSD: hack.main.c,v 1.17 2011/08/06 20:42:43 dholland Exp $");
 #endif                         /* not lint */
 
 #include <signal.h>
@@ -90,7 +90,8 @@ const char     *catmore;      /* default pager */
 #endif
 char            SAVEF[PL_NSIZ + 11] = "save/"; /* save/99999player */
 char           *hname;         /* name of the game (argv[0] of call) */
-char            obuf[BUFSIZ];  /* BUFSIZ is defined in stdio.h */
+
+static char obuf[BUFSIZ];      /* BUFSIZ is defined in stdio.h */
 
 int main(int, char *[]);
 static void chdirx(const char *, boolean);
@@ -183,7 +184,7 @@ main(int argc, char *argv[])
        cls();
        u.uhp = 1;              /* prevent RIP on early quits */
        u.ux = FAR;             /* prevent nscr() */
-       (void) signal(SIGHUP, hangup);
+       (void) signal(SIGHUP, hang_up);
 
        /*
         * Find the creation date of this game,
@@ -417,8 +418,10 @@ not_recovered:
                }
                if (multi < 0) {
                        if (!++multi) {
-                               pline(nomovemsg ? nomovemsg :
-                                     "You can move again.");
+                               if (nomovemsg)
+                                       pline("%s", nomovemsg);
+                               else
+                                       pline("You can move again.");
                                nomovemsg = 0;
                                if (afternmv)
                                        (*afternmv) ();
@@ -468,7 +471,7 @@ not_recovered:
 #ifdef MAIL
                        ckmailstatus();
 #endif
-                       rhack((char *) 0);
+                       rhack(NULL);
                }
                if (multi && multi % 7 == 0)
                        (void) fflush(stdout);