From 5f21837c338f56ee138444f6e6da5e271a9a7aed Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 30 Dec 2000 03:23:31 +0000 Subject: [PATCH] cleanup the includes in host.h --- include/host.h | 25 +++++++------------------ source/cl_main.c | 3 +++ source/cl_parse.c | 23 +++++++++++++---------- source/gl_dyn_part.c | 6 ++++++ source/menu.c | 6 ++++++ source/sys_unix.c | 6 ++++++ 6 files changed, 41 insertions(+), 28 deletions(-) diff --git a/include/host.h b/include/host.h index aeacfc0..3a5539b 100644 --- a/include/host.h +++ b/include/host.h @@ -29,7 +29,9 @@ #ifndef _QUAKEDEF_H #define _QUAKEDEF_H +#include "commdef.h" #include "gcc_attr.h" +#include "qtypes.h" #define QUAKE_GAME // as opposed to utilities @@ -39,26 +41,12 @@ #pragma warning( disable : 4244 4127 4201 4214 4514 4305 4115 4018) #endif -// FIXME: clean those includes -- yan - -#include -#include -#include -#include -#include -#include -#include - -#include "qtypes.h" -#include "cvar.h" -#include "commdef.h" - #define MAX_NUM_ARGVS 50 extern qboolean noclip_anglehack; -extern cvar_t *sys_ticrate; -extern cvar_t *password; +extern struct cvar_s *sys_ticrate; +extern struct cvar_s *password; extern double host_frametime; // Tonik @@ -66,8 +54,9 @@ extern byte *host_basepal; extern byte *host_colormap; extern int host_framecount; // incremented every frame, never reset -extern qboolean msg_suppress_1; // Suppresses resolution and cache size console - // output and fullscreen DIB focus gain/loss +extern qboolean msg_suppress_1; // Suppresses resolution and cache size + // console output and fullscreen DIB focus + // gain/loss void Host_ServerFrame (void); void Host_InitCommands (void); diff --git a/source/cl_main.c b/source/cl_main.c index be3cb09..24f304c 100644 --- a/source/cl_main.c +++ b/source/cl_main.c @@ -41,6 +41,9 @@ #ifdef HAVE_WINSOCK_H #include #endif +#ifdef HAVE_SETJMP_H +#include +#endif #include "bothdefs.h" #include "buildnum.h" diff --git a/source/cl_parse.c b/source/cl_parse.c index e5da847..ec7deba 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -30,6 +30,19 @@ # include "config.h" #endif +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif +#ifdef HAVE_ERRNO_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif + #include "bothdefs.h" #include "cdaudio.h" #include "cl_ents.h" @@ -51,16 +64,6 @@ #include "va.h" #include "view.h" -#ifdef HAVE_STRINGS_H -#include -#endif -#ifdef HAVE_ERRNO_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - extern cvar_t *gl_flashblend; extern cvar_t *cl_autoexec; diff --git a/source/gl_dyn_part.c b/source/gl_dyn_part.c index 7779a48..ea03aa9 100644 --- a/source/gl_dyn_part.c +++ b/source/gl_dyn_part.c @@ -31,6 +31,12 @@ #endif #include +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "cmd.h" #include "console.h" diff --git a/source/menu.c b/source/menu.c index efde070..3fd0126 100644 --- a/source/menu.c +++ b/source/menu.c @@ -39,6 +39,12 @@ #ifdef HAVE_NETINET_IN_H #include #endif +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "cl_input.h" #include "cl_main.h" diff --git a/source/sys_unix.c b/source/sys_unix.c index 3ae05d4..f330ddf 100644 --- a/source/sys_unix.c +++ b/source/sys_unix.c @@ -37,6 +37,12 @@ #include #include #include +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "cvar.h" #include "host.h"