-/* $NetBSD: main.c,v 1.22 2009/08/12 08:21:41 dholland Exp $ */
+/* $NetBSD: main.c,v 1.24 2019/02/03 03:19:25 mrg Exp $ */
/*
* Phantasia 3.3.2 -- Interterminal fantasy game
* AT&T is in no way connected with this game.
*/
-#include <sys/stat.h>
#include <sys/types.h>
+#include <sys/stat.h>
#include <err.h>
+#include <math.h>
#include <pwd.h>
+#include <setjmp.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+#include "phantdefs.h"
+#include "phantstruct.h"
+#include "phantglobs.h"
+#include "pathnames.h"
+
+#undef bool
+#include <curses.h>
/*
* The program allocates as much file space as it needs to store characters,
* main.c Main routines for Phantasia
*/
-#include "include.h"
-#undef bool
-#include <curses.h>
-
static void genchar(int);
static void initialstate(void);
static void neatstuff(void);
case 'a': /* all users */
activelist();
cleanup(TRUE);
+ __unreachable();
/* NOTREACHED */
case 'p': /* purge old players */
purgeoldplayers();
cleanup(TRUE);
+ __unreachable();
/* NOTREACHED */
case 'S': /* set 'Wizard' */
case 'm': /* monsters */
monstlist();
cleanup(TRUE);
+ __unreachable();
/* NOTREACHED */
case 'b': /* scoreboard */
scorelist();
cleanup(TRUE);
+ __unreachable();
/* NOTREACHED */
}
if (examine) {
changestats(FALSE);
cleanup(TRUE);
+ __unreachable();
/* NOTREACHED */
}
if (!noheader) {
titlelist();
purgeoldplayers(); /* clean up old characters */
}
- if (headeronly)
+ if (headeronly) {
cleanup(TRUE);
- /* NOTREACHED */
+ __unreachable();
+ /* NOTREACHED */
+ }
do
/* get the player structure filled */
case 'Q':
cleanup(TRUE);
+ __unreachable();
/* NOTREACHED */
default:
case '5': /* good-bye */
leavegame();
+ __unreachable();
/* NOTREACHED */
case '6': /* cloak */