-/* $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,
#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>
#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);
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,
}
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) ();
#ifdef MAIL
ckmailstatus();
#endif
- rhack((char *) 0);
+ rhack(NULL);
}
if (multi && multi % 7 == 0)
(void) fflush(stdout);