summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>1998-11-28 09:25:57 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>1998-11-28 09:25:57 +0000
commitaa2370b3f80656512ff68fd5eab06b3eb140443c (patch)
treeff09ff00bba46fb550e011df790ef777ce886013
parentabfb7490653ddc89fda0005dc8bfed11facc07c7 (diff)
Clear up a warning: printw doesn't take a const char, printf does
-rw-r--r--games/phantasia/main.c3
-rw-r--r--games/phantasia/misc.c17
2 files changed, 8 insertions, 12 deletions
diff --git a/games/phantasia/main.c b/games/phantasia/main.c
index 4795c679659..d157d7484a8 100644
--- a/games/phantasia/main.c
+++ b/games/phantasia/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.4 1998/07/10 09:46:47 downsj Exp $ */
+/* $OpenBSD: main.c,v 1.5 1998/11/28 09:25:53 pjanzen Exp $ */
/* $NetBSD: main.c,v 1.3 1995/04/24 12:24:37 cgd Exp $ */
/*
@@ -1320,5 +1320,4 @@ bool doexit;
if (doexit)
exit(0);
- /*NOTREACHED*/
}
diff --git a/games/phantasia/misc.c b/games/phantasia/misc.c
index 2a9635a51e9..ef7c9535dd1 100644
--- a/games/phantasia/misc.c
+++ b/games/phantasia/misc.c
@@ -1429,7 +1429,7 @@ readmessage()
/
/ MODULES CALLED: wclear(), cleanup()
/
-/ GLOBAL INPUTS: errno, *stdscr, printw(), printf(), Windows
+/ GLOBAL INPUTS: errno, *stdscr, printf(), Windows
/
/ GLOBAL OUTPUTS: none
/
@@ -1441,19 +1441,16 @@ readmessage()
error(whichfile)
char *whichfile;
{
- int (*funcp) __P((const char *, ...));
+ int er;
+ er = errno;
if (Windows)
- {
- funcp = printw;
clear();
- }
- else
- funcp = printf;
+ cleanup(FALSE);
- (*funcp)("An unrecoverable error has occurred reading %s. (errno = %d)\n", whichfile, errno);
- (*funcp)("Please run 'setup' to determine the problem.\n");
- cleanup(TRUE);
+ printf("An unrecoverable error has occurred reading %s.\n(errno = %d)\n", whichfile, er);
+ printf("Please run 'setup' to determine the problem.\n");
+ exit(1);
/*NOTREACHED*/
}
/* */