summaryrefslogtreecommitdiffstats
path: root/phantasia
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2009-08-31 08:27:16 +0000
committerdholland <dholland@NetBSD.org>2009-08-31 08:27:16 +0000
commitf317851cef910ed84d916f18ef477f31e735802d (patch)
treee275e53266046ba2d99b4ce26a427ee5a769a2ec /phantasia
parent261019cf959bb2b883a896cb49cb696257730a87 (diff)
downloadbsdgames-darwin-f317851cef910ed84d916f18ef477f31e735802d.tar.gz
bsdgames-darwin-f317851cef910ed84d916f18ef477f31e735802d.tar.zst
bsdgames-darwin-f317851cef910ed84d916f18ef477f31e735802d.zip
Dumping all system includes anything uses in one big header file is so 1986.
XXX: Removing unused declarations (thus, unused headers can trigger XXX: it) sometimes causes gcc to generate substantially different XXX: code. Dunno why but it looks rather like a gcc bug.
Diffstat (limited to 'phantasia')
-rw-r--r--phantasia/fight.c13
-rw-r--r--phantasia/gamesupport.c13
-rw-r--r--phantasia/include.h26
-rw-r--r--phantasia/interplayer.c15
-rw-r--r--phantasia/io.c20
-rw-r--r--phantasia/main.c23
-rw-r--r--phantasia/misc.c18
-rw-r--r--phantasia/phantglobs.c10
-rw-r--r--phantasia/setup.c19
9 files changed, 109 insertions, 48 deletions
diff --git a/phantasia/fight.c b/phantasia/fight.c
index ee4e15b1..1f01b9de 100644
--- a/phantasia/fight.c
+++ b/phantasia/fight.c
@@ -1,10 +1,19 @@
-/* $NetBSD: fight.c,v 1.12 2009/08/12 08:21:41 dholland Exp $ */
+/* $NetBSD: fight.c,v 1.13 2009/08/31 08:27:16 dholland Exp $ */
/*
* fight.c Phantasia monster fighting routines
*/
-#include "include.h"
+#include <math.h>
+#include <setjmp.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "macros.h"
+#include "phantdefs.h"
+#include "phantstruct.h"
+#include "phantglobs.h"
+
#undef bool
#include <curses.h>
diff --git a/phantasia/gamesupport.c b/phantasia/gamesupport.c
index b05f1ff5..c084519b 100644
--- a/phantasia/gamesupport.c
+++ b/phantasia/gamesupport.c
@@ -1,10 +1,19 @@
-/* $NetBSD: gamesupport.c,v 1.10 2009/05/25 23:08:45 dholland Exp $ */
+/* $NetBSD: gamesupport.c,v 1.11 2009/08/31 08:27:16 dholland Exp $ */
/*
* gamesupport.c - auxiliary routines for support of Phantasia
*/
-#include "include.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+
+#include "phantdefs.h"
+#include "phantstruct.h"
+#include "phantglobs.h"
+#include "pathnames.h"
+
#undef bool
#include <curses.h>
diff --git a/phantasia/include.h b/phantasia/include.h
deleted file mode 100644
index a765363b..00000000
--- a/phantasia/include.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* $NetBSD: include.h,v 1.6 2009/05/27 17:44:38 dholland Exp $ */
-
-/*
- * include.h - includes all important files for Phantasia
- */
-
-#include <ctype.h>
-#include <errno.h>
-#include <math.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-
-#ifndef __dead /* Not NetBSD */
-#define __dead
-#endif
-
-#include "macros.h"
-#include "phantdefs.h"
-#include "phantstruct.h"
-#include "phantglobs.h"
-#include "pathnames.h"
diff --git a/phantasia/interplayer.c b/phantasia/interplayer.c
index 3bb797d4..7f783681 100644
--- a/phantasia/interplayer.c
+++ b/phantasia/interplayer.c
@@ -1,10 +1,21 @@
-/* $NetBSD: interplayer.c,v 1.11 2009/08/12 08:21:41 dholland Exp $ */
+/* $NetBSD: interplayer.c,v 1.12 2009/08/31 08:27:16 dholland Exp $ */
/*
* interplayer.c - player to player routines for Phantasia
*/
-#include "include.h"
+#include <math.h>
+#include <setjmp.h>
+#include <stdio.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>
diff --git a/phantasia/io.c b/phantasia/io.c
index 239942ab..64f7e171 100644
--- a/phantasia/io.c
+++ b/phantasia/io.c
@@ -1,12 +1,26 @@
-/* $NetBSD: io.c,v 1.13 2009/08/12 08:21:41 dholland Exp $ */
+/* $NetBSD: io.c,v 1.14 2009/08/31 08:27:16 dholland Exp $ */
/*
* io.c - input/output routines for Phantasia
*/
-#include "include.h"
-#undef bool
#include <sys/cdefs.h>
+
+#include <ctype.h>
+#include <math.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdio.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>
static void catchalarm(int) __dead;
diff --git a/phantasia/main.c b/phantasia/main.c
index 7e480d0a..bd17453e 100644
--- a/phantasia/main.c
+++ b/phantasia/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.22 2009/08/12 08:21:41 dholland Exp $ */
+/* $NetBSD: main.c,v 1.23 2009/08/31 08:27:16 dholland Exp $ */
/*
* Phantasia 3.3.2 -- Interterminal fantasy game
@@ -27,10 +27,25 @@
* 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,
@@ -57,10 +72,6 @@
* 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);
diff --git a/phantasia/misc.c b/phantasia/misc.c
index 48909029..663bf519 100644
--- a/phantasia/misc.c
+++ b/phantasia/misc.c
@@ -1,10 +1,24 @@
-/* $NetBSD: misc.c,v 1.18 2009/08/12 08:21:41 dholland Exp $ */
+/* $NetBSD: misc.c,v 1.19 2009/08/31 08:27:16 dholland Exp $ */
/*
* misc.c Phantasia miscellaneous support routines
*/
-#include "include.h"
+#include <errno.h>
+#include <math.h>
+#include <setjmp.h>
+#include <signal.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>
diff --git a/phantasia/phantglobs.c b/phantasia/phantglobs.c
index 58769881..d20b3441 100644
--- a/phantasia/phantglobs.c
+++ b/phantasia/phantglobs.c
@@ -1,10 +1,16 @@
-/* $NetBSD: phantglobs.c,v 1.5 1999/09/08 21:17:54 jsm Exp $ */
+/* $NetBSD: phantglobs.c,v 1.6 2009/08/31 08:27:16 dholland Exp $ */
/*
* phantglobs.c - globals for Phantasia
*/
-#include "include.h"
+#include <setjmp.h>
+#include <stdio.h>
+
+#include "phantdefs.h"
+#include "phantstruct.h"
+#include "phantglobs.h"
+
double Circle; /* which circle player is in */
double Shield; /* force field thrown up in monster battle */
diff --git a/phantasia/setup.c b/phantasia/setup.c
index bdb9f74b..8d2cd6ed 100644
--- a/phantasia/setup.c
+++ b/phantasia/setup.c
@@ -1,4 +1,4 @@
-/* $NetBSD: setup.c,v 1.20 2009/05/27 17:44:38 dholland Exp $ */
+/* $NetBSD: setup.c,v 1.21 2009/08/31 08:27:16 dholland Exp $ */
/*
* setup.c - set up all files for Phantasia
@@ -8,10 +8,23 @@
#include <sys/cdefs.h>
#endif
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include "include.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifndef __dead /* Not NetBSD */
+#define __dead
+#endif
+
+#include "phantdefs.h"
+#include "phantstruct.h"
+#include "phantglobs.h"
+#include "pathnames.h"
int main(int, char *[]);
void Error(const char *, const char *) __dead;