summaryrefslogtreecommitdiffstats
path: root/hunt/hunt/playit.c
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1997-10-11 08:13:40 +0000
committerlukem <lukem@NetBSD.org>1997-10-11 08:13:40 +0000
commit00c616df1fcdefe33be74ec3f41f39b0c3852e5c (patch)
tree8187488c95dae0e421541d7cbc113dd3e6a76eac /hunt/hunt/playit.c
parent553d721d7a1deaf8fc7b01155b66150ce13f2783 (diff)
downloadbsdgames-darwin-00c616df1fcdefe33be74ec3f41f39b0c3852e5c.tar.gz
bsdgames-darwin-00c616df1fcdefe33be74ec3f41f39b0c3852e5c.tar.zst
bsdgames-darwin-00c616df1fcdefe33be74ec3f41f39b0c3852e5c.zip
use err/warn instead of perror
Diffstat (limited to 'hunt/hunt/playit.c')
-rw-r--r--hunt/hunt/playit.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/hunt/hunt/playit.c b/hunt/hunt/playit.c
index e6776673..5d558aa2 100644
--- a/hunt/hunt/playit.c
+++ b/hunt/hunt/playit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: playit.c,v 1.2 1997/10/10 16:32:43 lukem Exp $ */
+/* $NetBSD: playit.c,v 1.3 1997/10/11 08:13:44 lukem Exp $ */
/*
* Hunt
* Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
@@ -7,10 +7,11 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: playit.c,v 1.2 1997/10/10 16:32:43 lukem Exp $");
+__RCSID("$NetBSD: playit.c,v 1.3 1997/10/11 08:13:44 lukem Exp $");
#endif /* not lint */
# include <sys/file.h>
+# include <err.h>
# include <errno.h>
# include <curses.h>
# include <ctype.h>
@@ -572,10 +573,8 @@ redraw_screen()
if (first) {
curscr = newwin(SCREEN_HEIGHT, SCREEN_WIDTH, 0, 0);
- if (curscr == NULL) {
- fprintf(stderr, "Can't create curscr\n");
- exit(1);
- }
+ if (curscr == NULL)
+ errx(1, "Can't create curscr");
# if !defined(BSD_RELEASE) || BSD_RELEASE < 44
for (i = 0; i < SCREEN_HEIGHT; i++)
curscr->_y[i] = screen[i];