Module Name:    src
Committed By:   dholland
Date:           Mon Aug 31 08:27:16 UTC 2009

Modified Files:
        src/games/phantasia: fight.c gamesupport.c interplayer.c io.c main.c
            misc.c phantglobs.c setup.c
Removed Files:
        src/games/phantasia: include.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/games/phantasia/fight.c
cvs rdiff -u -r1.10 -r1.11 src/games/phantasia/gamesupport.c
cvs rdiff -u -r1.6 -r0 src/games/phantasia/include.h
cvs rdiff -u -r1.11 -r1.12 src/games/phantasia/interplayer.c
cvs rdiff -u -r1.13 -r1.14 src/games/phantasia/io.c
cvs rdiff -u -r1.22 -r1.23 src/games/phantasia/main.c
cvs rdiff -u -r1.18 -r1.19 src/games/phantasia/misc.c
cvs rdiff -u -r1.5 -r1.6 src/games/phantasia/phantglobs.c
cvs rdiff -u -r1.20 -r1.21 src/games/phantasia/setup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/phantasia/fight.c
diff -u src/games/phantasia/fight.c:1.12 src/games/phantasia/fight.c:1.13
--- src/games/phantasia/fight.c:1.12	Wed Aug 12 08:21:41 2009
+++ src/games/phantasia/fight.c	Mon Aug 31 08:27:16 2009
@@ -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>
 

Index: src/games/phantasia/gamesupport.c
diff -u src/games/phantasia/gamesupport.c:1.10 src/games/phantasia/gamesupport.c:1.11
--- src/games/phantasia/gamesupport.c:1.10	Mon May 25 23:08:45 2009
+++ src/games/phantasia/gamesupport.c	Mon Aug 31 08:27:16 2009
@@ -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>
 

Index: src/games/phantasia/interplayer.c
diff -u src/games/phantasia/interplayer.c:1.11 src/games/phantasia/interplayer.c:1.12
--- src/games/phantasia/interplayer.c:1.11	Wed Aug 12 08:21:41 2009
+++ src/games/phantasia/interplayer.c	Mon Aug 31 08:27:16 2009
@@ -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>
 

Index: src/games/phantasia/io.c
diff -u src/games/phantasia/io.c:1.13 src/games/phantasia/io.c:1.14
--- src/games/phantasia/io.c:1.13	Wed Aug 12 08:21:41 2009
+++ src/games/phantasia/io.c	Mon Aug 31 08:27:16 2009
@@ -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;

Index: src/games/phantasia/main.c
diff -u src/games/phantasia/main.c:1.22 src/games/phantasia/main.c:1.23
--- src/games/phantasia/main.c:1.22	Wed Aug 12 08:21:41 2009
+++ src/games/phantasia/main.c	Mon Aug 31 08:27:16 2009
@@ -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);

Index: src/games/phantasia/misc.c
diff -u src/games/phantasia/misc.c:1.18 src/games/phantasia/misc.c:1.19
--- src/games/phantasia/misc.c:1.18	Wed Aug 12 08:21:41 2009
+++ src/games/phantasia/misc.c	Mon Aug 31 08:27:16 2009
@@ -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>
 

Index: src/games/phantasia/phantglobs.c
diff -u src/games/phantasia/phantglobs.c:1.5 src/games/phantasia/phantglobs.c:1.6
--- src/games/phantasia/phantglobs.c:1.5	Wed Sep  8 21:17:54 1999
+++ src/games/phantasia/phantglobs.c	Mon Aug 31 08:27:16 2009
@@ -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	*/

Index: src/games/phantasia/setup.c
diff -u src/games/phantasia/setup.c:1.20 src/games/phantasia/setup.c:1.21
--- src/games/phantasia/setup.c:1.20	Wed May 27 17:44:38 2009
+++ src/games/phantasia/setup.c	Mon Aug 31 08:27:16 2009
@@ -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;

Reply via email to