From f317851cef910ed84d916f18ef477f31e735802d Mon Sep 17 00:00:00 2001 From: dholland Date: Mon, 31 Aug 2009 08:27:16 +0000 Subject: 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. --- phantasia/fight.c | 13 +++++++++++-- phantasia/gamesupport.c | 13 +++++++++++-- phantasia/include.h | 26 -------------------------- phantasia/interplayer.c | 15 +++++++++++++-- phantasia/io.c | 20 +++++++++++++++++--- phantasia/main.c | 23 +++++++++++++++++------ phantasia/misc.c | 18 ++++++++++++++++-- phantasia/phantglobs.c | 10 ++++++++-- phantasia/setup.c | 19 ++++++++++++++++--- 9 files changed, 109 insertions(+), 48 deletions(-) delete mode 100644 phantasia/include.h (limited to 'phantasia') 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 +#include +#include +#include + +#include "macros.h" +#include "phantdefs.h" +#include "phantstruct.h" +#include "phantglobs.h" + #undef bool #include 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 +#include +#include +#include + +#include "phantdefs.h" +#include "phantstruct.h" +#include "phantglobs.h" +#include "pathnames.h" + #undef bool #include 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#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 +#include +#include +#include +#include + +#include "macros.h" +#include "phantdefs.h" +#include "phantstruct.h" +#include "phantglobs.h" +#include "pathnames.h" + #undef bool #include 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 + +#include +#include +#include +#include +#include +#include +#include + +#include "macros.h" +#include "phantdefs.h" +#include "phantstruct.h" +#include "phantglobs.h" +//#include "pathnames.h" + +#undef bool #include 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 #include +#include #include +#include #include +#include +#include +#include +#include +#include + +#include "macros.h" +#include "phantdefs.h" +#include "phantstruct.h" +#include "phantglobs.h" +#include "pathnames.h" + +#undef bool +#include /* * 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 - 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 +#include +#include +#include +#include +#include +#include +#include + +#include "macros.h" +#include "phantdefs.h" +#include "phantstruct.h" +#include "phantglobs.h" +#include "pathnames.h" + #undef bool #include 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 +#include + +#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 #endif -#include +#include #include #include -#include "include.h" +#include +#include +#include +#include +#include + +#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; -- cgit v1.2.3-56-ge451