diff --git a/source/buildnum.c b/source/buildnum.c index 0251340..ff2042e 100644 --- a/source/buildnum.c +++ b/source/buildnum.c @@ -31,7 +31,9 @@ #endif #include +#ifdef HAVE_STRING_H #include +#endif #ifdef HAVE_STRINGS_H #include #endif diff --git a/source/cd_dos.c b/source/cd_dos.c index 9f00e28..41b8c20 100644 --- a/source/cd_dos.c +++ b/source/cd_dos.c @@ -29,7 +29,9 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include + #include "dosisms.h" extern cvar_t *bgmvolume; diff --git a/source/cd_linux.c b/source/cd_linux.c index 6b2d573..4890513 100644 --- a/source/cd_linux.c +++ b/source/cd_linux.c @@ -29,23 +29,26 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include -#include -#include -#include -#include -#include + #include -#include -#include +#ifdef HAVE_STRING_H +#include "string.h" +#endif +#ifdef HAVE_STRINGS_H +#include "strings.h" +#endif #include - +#ifdef HAVE_SYS_IOCTL_H +#include +#endif #include +#include -#include "qargs.h" -#include "cmd.h" #include "cdaudio.h" +#include "cmd.h" #include "console.h" +#include "cvar.h" +#include "qargs.h" #include "sound.h" static qboolean cdValid = false; diff --git a/source/cd_null.c b/source/cd_null.c index 78c3c6c..1a9c7cc 100644 --- a/source/cd_null.c +++ b/source/cd_null.c @@ -30,7 +30,7 @@ # include "config.h" #endif -#include "qtypes.h" +#include "cdaudio.h" void CDAudio_Play (byte track, qboolean looping) diff --git a/source/cd_sdl.c b/source/cd_sdl.c index c25ef69..57787fa 100644 --- a/source/cd_sdl.c +++ b/source/cd_sdl.c @@ -32,16 +32,20 @@ #ifdef HAVE_WINDOWS_H # include #endif +#ifdef HAVE_STRING_H +#include "string.h" +#endif +#ifdef HAVE_STRINGS_H +#include "strings.h" +#endif #include -#include "qargs.h" -#include "console.h" #include "cdaudio.h" #include "cmd.h" -#include "host.h" - -extern cvar_t *bgmvolume; +#include "console.h" +#include "qargs.h" +#include "sound.h" static qboolean cdValid = false; static qboolean initialized = false; diff --git a/source/cd_sgi.c b/source/cd_sgi.c index abb5652..d179a5a 100644 --- a/source/cd_sgi.c +++ b/source/cd_sgi.c @@ -35,11 +35,10 @@ #include -#include "qtypes.h" +#include "cdaudio.h" +#include "cmd.h" #include "console.h" #include "qargs.h" -#include "cmd.h" -#include "cdaudio.h" #include "sound.h" static qboolean initialized = false; diff --git a/source/cd_win.c b/source/cd_win.c index 9d8142d..531f5ca 100644 --- a/source/cd_win.c +++ b/source/cd_win.c @@ -30,11 +30,12 @@ # include "config.h" #endif #include -#include "qargs.h" -#include "console.h" + #include "cdaudio.h" #include "cmd.h" -#include "host.h" +#include "console.h" +#include "qargs.h" + extern HWND mainwindow; extern cvar_t *bgmvolume; diff --git a/source/checksum.c b/source/checksum.c index 2208452..6d6727f 100644 --- a/source/checksum.c +++ b/source/checksum.c @@ -29,12 +29,14 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STRINGS_H #include #endif + #include "checksum.h" #include "crc.h" diff --git a/source/cl_cam.c b/source/cl_cam.c index 21f67ec..82781c5 100644 --- a/source/cl_cam.c +++ b/source/cl_cam.c @@ -43,14 +43,13 @@ #include #endif -#include "cvar.h" -#include "client.h" -#include "pmove.h" -#include "msg.h" -#include "sbar.h" -#include "console.h" -#include "commdef.h" #include "cl_cam.h" +#include "client.h" +#include "commdef.h" +#include "console.h" +#include "msg.h" +#include "pmove.h" +#include "sbar.h" #define PM_SPECTATORMAXSPEED 500 #define PM_STOPSPEED 100 diff --git a/source/cl_cmd.c b/source/cl_cmd.c index bd19e79..1a1e775 100644 --- a/source/cl_cmd.c +++ b/source/cl_cmd.c @@ -29,17 +29,20 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif + #include "client.h" #include "console.h" #include "cmd.h" #include "msg.h" #include "teamplay.h" -#include -#ifdef HAVE_STRINGS_H -#include -#endif - /* =================== Cmd_ForwardToServer diff --git a/source/cl_cvar.c b/source/cl_cvar.c index 6448cd4..4fdc741 100644 --- a/source/cl_cvar.c +++ b/source/cl_cvar.c @@ -29,11 +29,10 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "cvar.h" -#include "sizebuf.h" -#include "msg.h" + #include "client.h" -#include "commdef.h" +#include "cvar.h" +#include "msg.h" #include "va.h" void diff --git a/source/cl_demo.c b/source/cl_demo.c index b68f9ed..e59dcd4 100644 --- a/source/cl_demo.c +++ b/source/cl_demo.c @@ -30,20 +30,16 @@ # include "config.h" #endif -#include "host.h" -#include "sys.h" -#include "cvar.h" -#include "sizebuf.h" -#include "msg.h" -#include "client.h" -#include "commdef.h" -#include "cmd.h" #include "console.h" -#include "qendian.h" -#include "va.h" -#include "quakefs.h" -#include "pmove.h" #include "cl_main.h" +#include "client.h" +#include "cmd.h" +#include "host.h" +#include "msg.h" +#include "pmove.h" +#include "qendian.h" +#include "sys.h" +#include "va.h" void CL_FinishTimeDemo (void); diff --git a/source/cl_ents.c b/source/cl_ents.c index 0339e80..7e076e4 100644 --- a/source/cl_ents.c +++ b/source/cl_ents.c @@ -30,29 +30,18 @@ # include "config.h" #endif -#include "host.h" -#include "sys.h" -#include "sys.h" -#include "cvar.h" -#include "sizebuf.h" -#include "msg.h" -#include "client.h" -#include "commdef.h" -#include "cmd.h" -#include "console.h" -#include "qendian.h" -#include "quakefs.h" -#include "pmove.h" -#include "view.h" -#include "teamplay.h" -#include "r_dynamic.h" -#include "r_local.h" #include "cl_cam.h" -#include "cl_pred.h" -#include "cl_main.h" #include "cl_ents.h" -#include "cl_input.h" +#include "cl_main.h" +#include "cl_pred.h" #include "cl_tent.h" +#include "console.h" +#include "d_iface.h" +#include "host.h" +#include "msg.h" +#include "pmove.h" +#include "r_dynamic.h" +#include "view.h" extern cvar_t *cl_predict_players; extern cvar_t *cl_predict_players2; diff --git a/source/cl_input.c b/source/cl_input.c index 599d5ac..d685ebc 100644 --- a/source/cl_input.c +++ b/source/cl_input.c @@ -30,28 +30,20 @@ # include "config.h" #endif -#include "host.h" -#include "input.h" -#include "sys.h" -#include "sys.h" -#include "cvar.h" -#include "sizebuf.h" -#include "msg.h" -#include "client.h" -#include "commdef.h" -#include "cmd.h" -#include "console.h" -#include "qendian.h" -#include "quakefs.h" -#include "pmove.h" -#include "view.h" #include "checksum.h" -#include "keys.h" -#include "teamplay.h" #include "cl_cam.h" #include "cl_demo.h" -#include "cl_parse.h" #include "cl_input.h" +#include "cl_parse.h" +#include "client.h" +#include "cmd.h" +#include "console.h" +#include "host.h" +#include "input.h" +#include "keys.h" +#include "msg.h" +#include "teamplay.h" +#include "view.h" cvar_t *cl_nodelta; diff --git a/source/cl_main.c b/source/cl_main.c index 0c2e4e5..d557d92 100644 --- a/source/cl_main.c +++ b/source/cl_main.c @@ -29,47 +29,45 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include -#include "host.h" #include "bothdefs.h" -#include "input.h" -#include "in_win.h" -#include "sys.h" -#include "sys.h" -#include "cvar.h" -#include "sizebuf.h" -#include "msg.h" -#include "va.h" +#include "buildnum.h" +#include "cdaudio.h" +#include "cl_cam.h" +#include "cl_demo.h" +#include "cl_ents.h" +#include "cl_input.h" +#include "cl_main.h" +#include "cl_parse.h" +#include "cl_pred.h" +#include "cl_tent.h" #include "client.h" -#include "commdef.h" #include "cmd.h" #include "console.h" +#include "cvar.h" +#include "draw.h" +#include "host.h" +#include "input.h" +#include "keys.h" +#include "menu.h" +#include "model.h" +#include "msg.h" +#include "net.h" +#include "pmove.h" #include "qendian.h" #include "quakefs.h" -#include "pmove.h" -#include "view.h" -#include "checksum.h" -#include "sys.h" -#include "menu.h" -#include "compat.h" -#include "buildnum.h" -#include "keys.h" -#include "screen.h" -#include "sbar.h" -#include "draw.h" #include "qargs.h" -#include "cdaudio.h" -#include "teamplay.h" -#include "cl_cam.h" -#include "cl_main.h" -#include "cl_demo.h" -#include "cl_input.h" -#include "cl_ents.h" +#include "sbar.h" +#include "screen.h" #include "skin.h" -#include "cl_parse.h" -#include "cl_tent.h" -#include "cl_pred.h" +#include "sound.h" +#include "sys.h" +#include "teamplay.h" +#include "vid.h" +#include "view.h" +#include "va.h" #ifdef __sun /* Sun's model_t in sys/model.h conflicts w/ Quake's model_t */ diff --git a/source/cl_parse.c b/source/cl_parse.c index bbb4e46..e5da847 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -30,25 +30,25 @@ # include "config.h" #endif -#include "host.h" -#include "sys.h" +#include "bothdefs.h" +#include "cdaudio.h" +#include "cl_ents.h" +#include "cl_input.h" +#include "cl_main.h" +#include "cl_parse.h" +#include "cl_tent.h" #include "client.h" #include "cmd.h" -#include "screen.h" -#include "cdaudio.h" -#include "bothdefs.h" #include "console.h" +#include "host.h" #include "msg.h" -#include "va.h" #include "pmove.h" +#include "protocol.h" +#include "screen.h" #include "sbar.h" -#include "teamplay.h" -#include "cl_parse.h" -#include "cl_main.h" #include "skin.h" -#include "cl_ents.h" -#include "cl_tent.h" -#include "cl_input.h" +#include "teamplay.h" +#include "va.h" #include "view.h" #ifdef HAVE_STRINGS_H diff --git a/source/cl_pred.c b/source/cl_pred.c index ccc70f2..6cec2da 100644 --- a/source/cl_pred.c +++ b/source/cl_pred.c @@ -29,13 +29,14 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "cvar.h" -#include "client.h" -#include "pmove.h" + #include "bothdefs.h" -#include "console.h" -#include "commdef.h" #include "cl_ents.h" +#include "client.h" +#include "commdef.h" +#include "console.h" +#include "cvar.h" +#include "pmove.h" #ifdef _WIN32 #include "winquake.h" diff --git a/source/cl_slist.c b/source/cl_slist.c index 0a12a34..577772c 100644 --- a/source/cl_slist.c +++ b/source/cl_slist.c @@ -33,20 +33,23 @@ # include "config.h" #endif +#ifdef HAVE_STRING_H #include - +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #ifdef HAVE_SYS_TIME_H #include #endif - #ifdef HAVE_UNISTD_H #include #endif -#include "cl_slist.h" #include "bothdefs.h" -#include "console.h" +#include "cl_slist.h" #include "commdef.h" +#include "console.h" #include "quakefs.h" #include "va.h" diff --git a/source/cl_tent.c b/source/cl_tent.c index ac0b2de..b541c45 100644 --- a/source/cl_tent.c +++ b/source/cl_tent.c @@ -30,22 +30,23 @@ # include "config.h" #endif -#include "host.h" -#include "sys.h" -#include "ctype.h" -#include "render.h" -#include "protocol.h" -#include "client.h" -#include "msg.h" -#include "console.h" -#include "r_dynamic.h" -#include "cl_main.h" - #include #include #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif + +#include "cl_ents.h" +#include "cl_main.h" +#include "cl_tent.h" +#include "client.h" +#include "console.h" +#include "host.h" +#include "msg.h" +#include "r_dynamic.h" #define MAX_BEAMS 8 #define MAX_BEAM_ENTS 20 diff --git a/source/cl_trans.c b/source/cl_trans.c index 78bfab7..afd39a1 100644 --- a/source/cl_trans.c +++ b/source/cl_trans.c @@ -30,15 +30,17 @@ # include "config.h" #endif +#ifdef HAVE_STRING_H #include +#endif #ifdef HAVE_STRINGS_H #include #endif +#include "client.h" #include "host.h" #include "sys.h" #include "vid.h" -#include "client.h" /* ===================== diff --git a/source/cmd.c b/source/cmd.c index bced550..a86ae3e 100644 --- a/source/cmd.c +++ b/source/cmd.c @@ -30,21 +30,23 @@ # include "config.h" #endif -#include #include +#ifdef HAVE_STRING_H +#include +#endif #ifdef HAVE_STRINGS_H #include #endif -#include "sys.h" -#include "cmd.h" -#include "compat.h" #include "cvar.h" -#include "sizebuf.h" +#include "cmd.h" #include "console.h" +#include "host.h" #include "qargs.h" +#include "qendian.h" #include "quakefs.h" -#include "commdef.h" +#include "sizebuf.h" +#include "sys.h" #include "zone.h" void Cmd_ForwardToServer (void); diff --git a/source/com.c b/source/com.c index 7cebb2c..06e9839 100644 --- a/source/com.c +++ b/source/com.c @@ -29,14 +29,15 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "sys.h" + +#include + +#include "cmd.h" +#include "console.h" #include "cvar.h" #include "qendian.h" #include "quakefs.h" -#include "cmd.h" -#include "console.h" - -#include +#include "sys.h" cvar_t *registered; diff --git a/source/console.c b/source/console.c index dcb12be..dd2a635 100644 --- a/source/console.c +++ b/source/console.c @@ -31,19 +31,24 @@ #endif #include +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif -#include "input.h" -#include "sys.h" -#include "console.h" -#include "keys.h" #include "client.h" -#include "draw.h" -#include "commdef.h" -#include "qargs.h" #include "cmd.h" -#include "va.h" +#include "commdef.h" +#include "console.h" +#include "draw.h" +#include "input.h" +#include "keys.h" +#include "qargs.h" #include "screen.h" +#include "sys.h" +#include "va.h" int con_ormask; console_t con_main; diff --git a/source/context_x11.c b/source/context_x11.c index 106a90f..cec5272 100644 --- a/source/context_x11.c +++ b/source/context_x11.c @@ -57,16 +57,16 @@ #endif #include "commdef.h" +#include "console.h" #include "context_x11.h" +#include "cvar.h" #include "dga_check.h" -#include "va.h" +#include "input.h" #include "qargs.h" #include "qtypes.h" -#include "vid.h" #include "sys.h" -#include "console.h" -#include "cvar.h" -#include "input.h" +#include "va.h" +#include "vid.h" static void (*event_handlers[LASTEvent]) (XEvent *); qboolean oktodraw = false; diff --git a/source/crc.c b/source/crc.c index 978faa9..8006b74 100644 --- a/source/crc.c +++ b/source/crc.c @@ -29,6 +29,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "crc.h" // this is a 16 bit, non-reflected CRC using the polynomial 0x1021 diff --git a/source/cvar.c b/source/cvar.c index 0b8586b..0abad8d 100644 --- a/source/cvar.c +++ b/source/cvar.c @@ -33,6 +33,15 @@ # include "config.h" #endif +#include +#include +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif + #include "commdef.h" #include "cvar.h" #include "console.h" @@ -40,13 +49,6 @@ #include "cmd.h" #include "commdef.h" -#include -#include -#include -#ifdef HAVE_STRINGS_H -#include -#endif - cvar_t *cvar_vars; char *cvar_null_string = ""; extern cvar_t *developer; diff --git a/source/d_edge.c b/source/d_edge.c index b2b9668..b9b82b7 100644 --- a/source/d_edge.c +++ b/source/d_edge.c @@ -29,6 +29,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "d_local.h" static int miplevel; diff --git a/source/d_fill.c b/source/d_fill.c index 5d34dd8..efe1468 100644 --- a/source/d_fill.c +++ b/source/d_fill.c @@ -29,6 +29,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "d_iface.h" diff --git a/source/d_init.c b/source/d_init.c index 962560d..8c8160d 100644 --- a/source/d_init.c +++ b/source/d_init.c @@ -29,6 +29,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "bothdefs.h" #include "d_local.h" diff --git a/source/d_modech.c b/source/d_modech.c index c6d30ad..838d927 100644 --- a/source/d_modech.c +++ b/source/d_modech.c @@ -29,8 +29,9 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "sys.h" + #include "d_local.h" +#include "sys.h" int d_vrectx, d_vrecty, d_vrectright_particle, d_vrectbottom_particle; diff --git a/source/d_part.c b/source/d_part.c index f7ac5dd..2a410dd 100644 --- a/source/d_part.c +++ b/source/d_part.c @@ -29,8 +29,8 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "d_local.h" +#include "d_local.h" /* ============== diff --git a/source/d_polyse.c b/source/d_polyse.c index 89f6999..4692f78 100644 --- a/source/d_polyse.c +++ b/source/d_polyse.c @@ -30,9 +30,11 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "r_local.h" #include "d_local.h" #include "bothdefs.h" + // TODO: put in span spilling to shrink list size // !!! if this is changed, it must be changed in d_polysa.s too !!! #define DPS_MAXSPANS MAXHEIGHT+1 diff --git a/source/d_scan.c b/source/d_scan.c index 5b1e493..5b5a9a9 100644 --- a/source/d_scan.c +++ b/source/d_scan.c @@ -29,8 +29,9 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "r_local.h" + #include "d_local.h" +#include "r_local.h" unsigned char *r_turb_pbase, *r_turb_pdest; fixed16_t r_turb_s, r_turb_t, r_turb_sstep, r_turb_tstep; diff --git a/source/d_sky.c b/source/d_sky.c index 96b02f2..4622ee9 100644 --- a/source/d_sky.c +++ b/source/d_sky.c @@ -29,8 +29,9 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "r_local.h" + #include "d_local.h" +#include "r_local.h" #define SKY_SPAN_SHIFT 5 #define SKY_SPAN_MAX (1 << SKY_SPAN_SHIFT) diff --git a/source/d_sprite.c b/source/d_sprite.c index fb65caf..cb9aafd 100644 --- a/source/d_sprite.c +++ b/source/d_sprite.c @@ -29,6 +29,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "d_local.h" static int sprite_height; diff --git a/source/d_surf.c b/source/d_surf.c index 1218752..285214e 100644 --- a/source/d_surf.c +++ b/source/d_surf.c @@ -29,10 +29,11 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "sys.h" -#include "qargs.h" + #include "d_local.h" +#include "qargs.h" #include "r_local.h" +#include "sys.h" #include diff --git a/source/d_zpoint.c b/source/d_zpoint.c index b8308d6..fc9a7c6 100644 --- a/source/d_zpoint.c +++ b/source/d_zpoint.c @@ -29,6 +29,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "d_local.h" diff --git a/source/draw.c b/source/draw.c index 745a6b9..9d2016e 100644 --- a/source/draw.c +++ b/source/draw.c @@ -29,16 +29,21 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "sys.h" -#include "draw.h" -#include "vid.h" -#include "d_iface.h" + +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif + +#include "client.h" #include "console.h" +#include "d_iface.h" +#include "draw.h" #include "quakefs.h" #include "sound.h" -#include "client.h" - -#include +#include "sys.h" typedef struct { vrect_t rect; diff --git a/source/gl_draw.c b/source/gl_draw.c index 73b4b56..049fea5 100644 --- a/source/gl_draw.c +++ b/source/gl_draw.c @@ -36,30 +36,13 @@ #include #endif -#include "bothdefs.h" // needed by: common.h, net.h, - // client.h - -#include "crc.h" // LordHavoc: for texture update - // validation -#include "bspfile.h" // needed by: glquake.h -#include "vid.h" -#include "sys.h" -#include "mathlib.h" // needed by: protocol.h, render.h, - // client.h, - // modelgen.h, glmodel.h -#include "wad.h" -#include "draw.h" -#include "cvar.h" -#include "net.h" // needed by: client.h -#include "protocol.h" // needed by: client.h #include "cmd.h" -#include "sbar.h" -#include "render.h" // needed by: client.h, model.h, - // glquake.h -#include "client.h" // need cls in this file -#include "model.h" // needed by: glquake.h #include "console.h" +#include "crc.h" +#include "draw.h" #include "glquake.h" +#include "sbar.h" +#include "sys.h" static int GL_LoadPicTexture (qpic_t *pic); diff --git a/source/gl_dyn_fires.c b/source/gl_dyn_fires.c index 8ea4b31..4b513f4 100644 --- a/source/gl_dyn_fires.c +++ b/source/gl_dyn_fires.c @@ -29,14 +29,19 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif +#include + +#include "cl_main.h" #include "cmd.h" #include "console.h" #include "glquake.h" -#include "cl_main.h" - -#include #define MAX_FIRES 128 // rocket flames diff --git a/source/gl_dyn_part.c b/source/gl_dyn_part.c index 8fe4a71..7779a48 100644 --- a/source/gl_dyn_part.c +++ b/source/gl_dyn_part.c @@ -30,16 +30,16 @@ # include "config.h" #endif -#include "host.h" -#include "glquake.h" -#include "cmd.h" -#include "qargs.h" -#include "console.h" -#include "sys.h" -#include "r_dynamic.h" - #include +#include "cmd.h" +#include "console.h" +#include "glquake.h" +#include "host.h" +#include "r_dynamic.h" +#include "qargs.h" +#include "sys.h" + #define MAX_PARTICLES 2048 // default max # of particles at one // time #define ABSOLUTE_MIN_PARTICLES 512 // no fewer than this no matter diff --git a/source/gl_dyn_textures.c b/source/gl_dyn_textures.c index 3005ff3..10ac1c5 100644 --- a/source/gl_dyn_textures.c +++ b/source/gl_dyn_textures.c @@ -30,11 +30,11 @@ # include "config.h" #endif -#include "glquake.h" -#include "fractalnoise.h" - #include +#include "fractalnoise.h" +#include "glquake.h" + static void GDT_InitDotParticleTexture (void); static void GDT_InitSmokeParticleTexture (void); diff --git a/source/gl_mesh.c b/source/gl_mesh.c index 1b9ae54..aaa8a50 100644 --- a/source/gl_mesh.c +++ b/source/gl_mesh.c @@ -29,32 +29,18 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include -#include "bothdefs.h" // needed by: common.h, net.h, - // client.h -#include "qendian.h" -#include "quakefs.h" -#include "bspfile.h" // needed by: glquake.h -#include "vid.h" -#include "sys.h" -#include "mathlib.h" // needed by: protocol.h, render.h, - // client.h, - // modelgen.h, glmodel.h -#include "wad.h" -#include "draw.h" -#include "cvar.h" -#include "net.h" // needed by: client.h -#include "protocol.h" // needed by: client.h -#include "cmd.h" -#include "sbar.h" -#include "render.h" // needed by: client.h, model.h, - // glquake.h -#include "client.h" // need cls in this file -#include "model.h" // needed by: glquake.h #include "console.h" -#include "glquake.h" +#include "model.h" +#include "quakefs.h" /* ================================================================= diff --git a/source/gl_model_alias.c b/source/gl_model_alias.c index fc9cc7e..e3a0db9 100644 --- a/source/gl_model_alias.c +++ b/source/gl_model_alias.c @@ -40,11 +40,11 @@ #include #endif +#include "console.h" +#include "glquake.h" #include "model.h" #include "qendian.h" #include "server.h" -#include "console.h" -#include "glquake.h" extern model_t *loadmodel; diff --git a/source/gl_model_brush.c b/source/gl_model_brush.c index a6eb31a..c8b898a 100644 --- a/source/gl_model_brush.c +++ b/source/gl_model_brush.c @@ -32,7 +32,13 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "console.h" #include "glquake.h" diff --git a/source/gl_model_fullbright.c b/source/gl_model_fullbright.c index 78adf1f..8b3b9dc 100644 --- a/source/gl_model_fullbright.c +++ b/source/gl_model_fullbright.c @@ -33,12 +33,12 @@ # include "config.h" #endif +#include "checksum.h" +#include "console.h" +#include "glquake.h" +#include "qendian.h" #include "r_local.h" #include "sys.h" -#include "console.h" -#include "qendian.h" -#include "checksum.h" -#include "glquake.h" int Mod_Fullbright (byte * skin, int width, int height, char *name) diff --git a/source/gl_model_sprite.c b/source/gl_model_sprite.c index 11fe6d4..dd55efe 100644 --- a/source/gl_model_sprite.c +++ b/source/gl_model_sprite.c @@ -40,9 +40,9 @@ #include #endif +#include "glquake.h" #include "model.h" #include "qendian.h" -#include "glquake.h" extern model_t *loadmodel; extern char loadname[]; diff --git a/source/gl_ngraph.c b/source/gl_ngraph.c index 327f3ae..06037cd 100644 --- a/source/gl_ngraph.c +++ b/source/gl_ngraph.c @@ -29,34 +29,20 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include -#include "bothdefs.h" // needed by: common.h, net.h, - // client.h - -#include "bspfile.h" // needed by: glquake.h -#include "vid.h" -#include "sys.h" -#include "mathlib.h" // needed by: protocol.h, render.h, - // client.h, - // modelgen.h, glmodel.h -#include "wad.h" -#include "draw.h" -#include "cvar.h" -#include "menu.h" -#include "net.h" // needed by: client.h -#include "protocol.h" // needed by: client.h -#include "cmd.h" -#include "sbar.h" -#include "render.h" // needed by: client.h, gl_model.h, - // glquake.h -#include "client.h" // need cls in this file -#include "model.h" // needed by: glquake.h -#include "console.h" -#include "glquake.h" #include "cl_parse.h" - +#include "cvar.h" +#include "draw.h" +#include "glquake.h" +#include "sbar.h" extern byte *draw_chars; // 8*8 graphic characters extern qboolean lighthalf; diff --git a/source/gl_rlight.c b/source/gl_rlight.c index c9b044d..bb4a33b 100644 --- a/source/gl_rlight.c +++ b/source/gl_rlight.c @@ -31,30 +31,14 @@ #endif #include +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include -#include "bothdefs.h" // needed by: common.h, net.h, - // client.h - -#include "bspfile.h" // needed by: glquake.h -#include "vid.h" -#include "sys.h" -#include "mathlib.h" // needed by: protocol.h, render.h, - // client.h, - // modelgen.h, glmodel.h -#include "wad.h" -#include "draw.h" -#include "cvar.h" // needed by: view.h -#include "net.h" // needed by: client.h -#include "protocol.h" // needed by: client.h -#include "cmd.h" -#include "sbar.h" -#include "render.h" // needed by: client.h, gl_model.h, - // glquake.h -#include "client.h" // need cls in this file -#include "model.h" // needed by: glquake.h -#include "console.h" #include "glquake.h" int r_dlightframecount; diff --git a/source/gl_rmain.c b/source/gl_rmain.c index beeb63d..d8bb9a5 100644 --- a/source/gl_rmain.c +++ b/source/gl_rmain.c @@ -31,23 +31,25 @@ #endif #include +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include #include -#include "qargs.h" #include "bothdefs.h" +#include "cl_cam.h" +#include "cl_main.h" #include "commdef.h" #include "console.h" #include "glquake.h" -#include "model.h" -#include "render.h" -#include "sys.h" +#include "qargs.h" #include "r_dynamic.h" #include "skin.h" -#include "cl_main.h" -#include "cl_cam.h" -#include "va.h" +#include "sys.h" #include "view.h" entity_t r_worldentity; diff --git a/source/gl_rmisc.c b/source/gl_rmisc.c index 3d4c29d..2eae1e6 100644 --- a/source/gl_rmisc.c +++ b/source/gl_rmisc.c @@ -29,36 +29,23 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include + #include +#ifdef HAVE_STRING_H +#include +#endif #ifdef HAVE_STRINGS_H #include #endif -#include "bothdefs.h" // needed by: common.h, net.h, - // client.h - -#include "bspfile.h" // needed by: glquake.h -#include "vid.h" -#include "sys.h" -#include "mathlib.h" // needed by: protocol.h, render.h, - // client.h, - // modelgen.h, glmodel.h -#include "wad.h" -#include "draw.h" -#include "cvar.h" -#include "net.h" // needed by: client.h -#include "protocol.h" // needed by: client.h #include "cmd.h" -#include "sbar.h" -#include "render.h" // needed by: client.h, gl_model.h, - // glquake.h -#include "client.h" // need cls in this file -#include "model.h" // needed by: glquake.h #include "console.h" +#include "cvar.h" #include "glquake.h" #include "r_dynamic.h" #include "skin.h" +#include "sys.h" +#include "vid.h" qboolean VID_Is8bit (void); void R_InitBubble (void); diff --git a/source/gl_rsurf.c b/source/gl_rsurf.c index 63502f9..8c7f82a 100644 --- a/source/gl_rsurf.c +++ b/source/gl_rsurf.c @@ -32,31 +32,16 @@ #endif #include +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include -#include "bothdefs.h" // needed by: common.h, net.h, - // client.h -#include "qargs.h" -#include "bspfile.h" // needed by: glquake.h -#include "vid.h" -#include "sys.h" -#include "mathlib.h" // needed by: protocol.h, render.h, - // client.h, - // modelgen.h, glmodel.h -#include "wad.h" -#include "draw.h" -#include "cvar.h" -#include "net.h" // needed by: client.h -#include "protocol.h" // needed by: client.h -#include "cmd.h" -#include "sbar.h" -#include "render.h" // needed by: client.h, gl_model.h, - // glquake.h -#include "client.h" // need cls in this file -#include "model.h" // needed by: glquake.h -#include "console.h" #include "glquake.h" +#include "sys.h" qboolean r_cache_thrash; diff --git a/source/gl_screen.c b/source/gl_screen.c index 2e36a0b..80a273e 100644 --- a/source/gl_screen.c +++ b/source/gl_screen.c @@ -30,7 +30,12 @@ # include "config.h" #endif +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include #include "cl_parse.h" @@ -42,7 +47,6 @@ #include "keys.h" #include "menu.h" #include "pcx.h" -#include "qendian.h" #include "sbar.h" #include "skin.h" #include "sys.h" diff --git a/source/gl_sky.c b/source/gl_sky.c index 1643223..6e87e7f 100644 --- a/source/gl_sky.c +++ b/source/gl_sky.c @@ -30,7 +30,12 @@ # include "config.h" #endif +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "console.h" #include "glquake.h" diff --git a/source/gl_sky_clip.c b/source/gl_sky_clip.c index b6e3b77..00f32ca 100644 --- a/source/gl_sky_clip.c +++ b/source/gl_sky_clip.c @@ -30,7 +30,12 @@ # include "config.h" #endif +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include #include "console.h" diff --git a/source/gl_trans.c b/source/gl_trans.c index aa7fd59..b538f57 100644 --- a/source/gl_trans.c +++ b/source/gl_trans.c @@ -30,10 +30,10 @@ # include "config.h" #endif -#include "host.h" -#include "sys.h" -#include "protocol.h" #include "glquake.h" +#include "host.h" +#include "protocol.h" +#include "sys.h" /* ===================== diff --git a/source/gl_view.c b/source/gl_view.c index 2eca811..2712cde 100644 --- a/source/gl_view.c +++ b/source/gl_view.c @@ -29,30 +29,14 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include -#include "bothdefs.h" // needed by: common.h, net.h, - // client.h - -#include "bspfile.h" // needed by: glquake.h -#include "vid.h" -#include "sys.h" -#include "mathlib.h" // needed by: protocol.h, render.h, - // client.h, - // modelgen.h, glmodel.h -#include "wad.h" -#include "draw.h" -#include "cvar.h" -#include "net.h" // needed by: client.h -#include "protocol.h" // needed by: client.h -#include "cmd.h" -#include "sbar.h" -#include "render.h" // needed by: client.h, model.h, - // glquake.h -#include "client.h" // need cls in this file -#include "model.h" // needed by: glquake.h -#include "console.h" #include "glquake.h" extern byte *host_basepal; diff --git a/source/in_svgalib.c b/source/in_svgalib.c index f7bae82..6acd37c 100644 --- a/source/in_svgalib.c +++ b/source/in_svgalib.c @@ -43,17 +43,16 @@ #include #include -#include "host.h" -#include "client.h" #include "cl_input.h" +#include "client.h" #include "cmd.h" #include "console.h" #include "cvar.h" +#include "host.h" #include "input.h" #include "joystick.h" #include "keys.h" #include "qargs.h" -#include "qtypes.h" #include "sys.h" #include "view.h" diff --git a/source/in_x11.c b/source/in_x11.c index 6108b74..d8e3f7c 100644 --- a/source/in_x11.c +++ b/source/in_x11.c @@ -37,8 +37,9 @@ #include #include +#ifdef HAVE_STRING_H #include - +#endif #ifdef HAVE_STRINGS_H #include #endif @@ -55,25 +56,21 @@ #include #endif -#include "dga_check.h" -#include "d_local.h" -#include "host.h" -#include "sound.h" -#include "keys.h" -#include "cvar.h" -#include "sys.h" -#include "cmd.h" -#include "draw.h" -#include "console.h" +#include "cl_input.h" #include "client.h" +#include "console.h" #include "context_x11.h" +#include "cvar.h" +#include "dga_check.h" +#include "host.h" #include "input.h" #include "joystick.h" +#include "keys.h" #include "qargs.h" -#include "cl_input.h" +#include "sys.h" +#include "vid.h" #include "view.h" - cvar_t *_windowed_mouse; cvar_t *m_filter; diff --git a/source/info.c b/source/info.c index 9b6479f..ebc57b6 100644 --- a/source/info.c +++ b/source/info.c @@ -29,15 +29,19 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "console.h" -#include #include #include +#ifdef HAVE_STRING_H +#include +#endif #ifdef HAVE_STRINGS_H #include #endif +#include "console.h" +#include "info.h" + /* ===================================================================== diff --git a/source/keys.c b/source/keys.c index 21c1150..9ccfed0 100644 --- a/source/keys.c +++ b/source/keys.c @@ -29,26 +29,27 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #ifdef _WIN32 #include #endif - #include #include +#ifdef HAVE_STRING_H #include +#endif #ifdef HAVE_STRINGS_H #include #endif -#include "qtypes.h" -#include "sys.h" -#include "keys.h" -#include "menu.h" +#include "client.h" #include "cmd.h" #include "console.h" #include "cvar.h" +#include "keys.h" +#include "menu.h" #include "screen.h" -#include "client.h" +#include "sys.h" /* diff --git a/source/link.c b/source/link.c index 883b1dc..0a57442 100644 --- a/source/link.c +++ b/source/link.c @@ -29,6 +29,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "link.h" // ClearLink is used for new headnodes diff --git a/source/locs.c b/source/locs.c index 694b8ae..a2d1d68 100644 --- a/source/locs.c +++ b/source/locs.c @@ -31,13 +31,18 @@ #endif #include +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "client.h" +#include "console.h" +#include "locs.h" #include "qtypes.h" #include "sys.h" -#include "locs.h" -#include "console.h" #define LOCATION_BLOCK 128 // 128 locations per block. diff --git a/source/mathlib.c b/source/mathlib.c index 7f148bd..d1ad81b 100644 --- a/source/mathlib.c +++ b/source/mathlib.c @@ -29,15 +29,19 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif #include -#include "qtypes.h" + #include "mathlib.h" #include "model.h" - -void Sys_Error (char *error, ...); +#include "qtypes.h" +#include "sys.h" vec3_t vec3_origin = { 0, 0, 0 }; int nanmask = 255 << 23; @@ -563,7 +567,7 @@ FloorDivMod (double numer, double denom, int *quotient, int *rem) #ifndef PARANOID if (denom <= 0.0) - Sys_Error ("FloorDivMod: bad denominator %d\n", denom); + Sys_Error ("FloorDivMod: bad denominator %f\n", denom); // if ((floor(numer) != numer) || (floor(denom) != denom)) // Sys_Error ("FloorDivMod: non-integer numer or denom %f %f\n", diff --git a/source/mdfour.c b/source/mdfour.c index c88c2e1..6d6187b 100644 --- a/source/mdfour.c +++ b/source/mdfour.c @@ -30,15 +30,16 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include /* XoXus: needed for memset call */ -#ifndef _UINT32_H -#include -#endif // _UINT32_H +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif -#ifndef _MDFOUR_H -#include -#endif // _MDFOUR_H +#include "mdfour.h" +#include "uint32.h" /* NOTE: This code makes no attempt to be fast! diff --git a/source/menu.c b/source/menu.c index 59d97a3..efde070 100644 --- a/source/menu.c +++ b/source/menu.c @@ -33,36 +33,34 @@ #ifdef HAVE_SYS_TIME_H #include #endif - #ifdef HAVE_UNISTD_H #include #endif - -#include "host.h" -#include "sys.h" -#ifdef _WIN32 -#include "winquake.h" -#endif -#include "cl_slist.h" -#include "keys.h" -#include "menu.h" -#include "vid.h" -#include "va.h" -#include "draw.h" -#include "cmd.h" -#include "screen.h" -#include "client.h" -#include "console.h" -#include "input.h" -#include "view.h" -#include "cl_main.h" -#include "cl_input.h" -#include "net.h" - #ifdef HAVE_NETINET_IN_H #include #endif +#include "cl_input.h" +#include "cl_main.h" +#include "cl_slist.h" +#include "client.h" +#include "cmd.h" +#include "commdef.h" +#include "console.h" +#include "cvar.h" +#include "draw.h" +#include "host.h" +#include "input.h" +#include "keys.h" +#include "menu.h" +#include "protocol.h" +#include "screen.h" +#include "sound.h" +#include "sys.h" +#include "va.h" +#include "vid.h" +#include "view.h" + void (*vid_menudrawfn) (void); void (*vid_menukeyfn) (int key); diff --git a/source/model.c b/source/model.c index c00c43d..bca4526 100644 --- a/source/model.c +++ b/source/model.c @@ -40,11 +40,11 @@ #include #endif -#include "model.h" -#include "quakefs.h" #include "cvar.h" -#include "server.h" +#include "model.h" #include "qendian.h" +#include "quakefs.h" +#include "server.h" void Mod_LoadAliasModel (model_t *mod, void *buf); void Mod_LoadSpriteModel (model_t *mod, void *buf); diff --git a/source/model_alias.c b/source/model_alias.c index 8ebf51d..e13b4a4 100644 --- a/source/model_alias.c +++ b/source/model_alias.c @@ -40,15 +40,16 @@ #include #endif -#include "r_local.h" -#include "sys.h" -#include "console.h" -#include "qendian.h" -#include "checksum.h" -#include "crc.h" -#include "server.h" -#include "msg.h" #include "cl_main.h" +#include "client.h" +#include "crc.h" +#include "info.h" +#include "model.h" +#include "msg.h" +#include "qendian.h" +#include "quakefs.h" +#include "r_local.h" +#include "server.h" extern char loadname[]; extern model_t *loadmodel; diff --git a/source/model_brush.c b/source/model_brush.c index 51e8f8c..0a6b023 100644 --- a/source/model_brush.c +++ b/source/model_brush.c @@ -32,14 +32,20 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include -#include +#include +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif + +#include "checksum.h" #include "cvar.h" #include "model.h" #include "qendian.h" #include "server.h" -#include "checksum.h" extern model_t *loadmodel; extern char loadname[]; diff --git a/source/net_chan.c b/source/net_chan.c index ad28ef4..f6927ad 100644 --- a/source/net_chan.c +++ b/source/net_chan.c @@ -37,18 +37,19 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif #include #include -#include "qtypes.h" -#include "console.h" -#include "msg.h" -#include "sizebuf.h" -#include "cvar.h" -#include "net.h" #include "client.h" #include "commdef.h" +#include "console.h" +#include "cvar.h" +#include "msg.h" +#include "net.h" #define PACKET_HEADER 8 diff --git a/source/net_com.c b/source/net_com.c index c727e03..f48ef3c 100644 --- a/source/net_com.c +++ b/source/net_com.c @@ -32,7 +32,8 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include + +#include "mdfour.h" unsigned int Com_BlockChecksum (void *buffer, int length) diff --git a/source/net_packetlog.c b/source/net_packetlog.c index d76b970..dcebfc9 100644 --- a/source/net_packetlog.c +++ b/source/net_packetlog.c @@ -36,12 +36,10 @@ #include #include -#include "qtypes.h" -#include "quakeio.h" +#include "msg.h" #include "net.h" #include "protocol.h" -#include "msg.h" - +#include "quakeio.h" #include "server.h" cvar_t *netlogger; diff --git a/source/net_udp.c b/source/net_udp.c index 8bad282..b6fb5c0 100644 --- a/source/net_udp.c +++ b/source/net_udp.c @@ -30,10 +30,6 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "sys.h" -#include "net.h" -#include "qargs.h" -#include "console.h" #include #include @@ -68,16 +64,21 @@ # include #endif -#ifdef _WIN32 -# include -# undef EWOULDBLOCK -# define EWOULDBLOCK WSAEWOULDBLOCK -#endif - #ifdef NeXT #include #endif +#include "console.h" +#include "net.h" +#include "sys.h" +#include "qargs.h" + +#ifdef _WIN32 +# include "winquake.h" +# undef EWOULDBLOCK +# define EWOULDBLOCK WSAEWOULDBLOCK +#endif + #ifndef MAXHOSTNAMELEN # define MAXHOSTNAMELEN 512 #endif diff --git a/source/pcx.c b/source/pcx.c index 2b36fb7..dbcb1c5 100644 --- a/source/pcx.c +++ b/source/pcx.c @@ -29,7 +29,13 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "cl_parse.h" #include "console.h" diff --git a/source/pmove.c b/source/pmove.c index 502954d..99e41cb 100644 --- a/source/pmove.c +++ b/source/pmove.c @@ -29,14 +29,15 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "compat.h" -#include "qtypes.h" -#include "client.h" -#include "pmove.h" -#include "cvar.h" #include +#include "client.h" +#include "compat.h" +#include "cvar.h" +#include "pmove.h" +#include "qtypes.h" + cvar_t *no_pogo_stick; movevars_t movevars; diff --git a/source/pmovetst.c b/source/pmovetst.c index 4a4baa8..30076fe 100644 --- a/source/pmovetst.c +++ b/source/pmovetst.c @@ -29,14 +29,19 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #ifdef HAVE_STRING_H #include #endif -#include "sys.h" -#include "qtypes.h" -#include "pmove.h" -#include "model.h" +#ifdef HAVE_STRINGS_H +#include +#endif + #include "console.h" +#include "model.h" +#include "pmove.h" +#include "qtypes.h" +#include "sys.h" static hull_t box_hull; static dclipnode_t box_clipnodes[6]; diff --git a/source/pr_edict.c b/source/pr_edict.c index dd2ef7e..fd312d4 100644 --- a/source/pr_edict.c +++ b/source/pr_edict.c @@ -30,7 +30,12 @@ # include "config.h" #endif +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "cmd.h" #include "console.h" diff --git a/source/qargs.c b/source/qargs.c index 9268569..9e33316 100644 --- a/source/qargs.c +++ b/source/qargs.c @@ -32,19 +32,24 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "string.h" -#include "ctype.h" -#include "stdlib.h" -#include "qtypes.h" -#include "crc.h" -#include "sys.h" -#include "cmd.h" -#include "console.h" -#include "client.h" -#include "assert.h" -#include "commdef.h" +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif +#include +#include +#include + +#include "client.h" +#include "commdef.h" +#include "console.h" +#include "cmd.h" +#include "crc.h" +#include "qtypes.h" +#include "sys.h" usercmd_t nullcmd; // guarenteed to be zero diff --git a/source/qendian.c b/source/qendian.c index 78db1a7..eef81e7 100644 --- a/source/qendian.c +++ b/source/qendian.c @@ -33,7 +33,8 @@ #endif #include -#include + +#include "qtypes.h" /* ============================================================================ diff --git a/source/qfgl_ext.c b/source/qfgl_ext.c index 801e1ca..25cb7bc 100644 --- a/source/qfgl_ext.c +++ b/source/qfgl_ext.c @@ -58,7 +58,12 @@ # include #endif +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "qfgl_ext.h" #include "qtypes.h" diff --git a/source/quakefs.c b/source/quakefs.c index 566c776..38e5134 100644 --- a/source/quakefs.c +++ b/source/quakefs.c @@ -32,7 +32,12 @@ #include #include +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include #ifdef HAVE_UNISTD_H #include @@ -55,30 +60,23 @@ #define _POSIX_ #endif #include -#include "qtypes.h" -#include "quakefs.h" -#include "sys.h" -#include "console.h" -#include "draw.h" #include "cmd.h" -#include "cvar.h" #include "commdef.h" -#include "qendian.h" +#include "console.h" +#include "cvar.h" +#include "draw.h" #include "info.h" -#include "server.h" -#include "va.h" #include "qargs.h" - -// LordHavoc: win32 would not compile without this -#ifndef __const -#define __const const -#endif +#include "qendian.h" +#include "qtypes.h" +#include "quakefs.h" +#include "server.h" +#include "sys.h" +#include "va.h" #ifndef HAVE_FNMATCH_PROTO -int fnmatch (__const char *__pattern, __const char *__string, - - int __flags); +int fnmatch (const char *__pattern, const char *__string, int __flags); #endif diff --git a/source/quakeio.c b/source/quakeio.c index f9276f5..975d921 100644 --- a/source/quakeio.c +++ b/source/quakeio.c @@ -37,7 +37,12 @@ #endif #include #include +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #ifdef WIN32 # include # include @@ -52,8 +57,8 @@ #endif #include -#include "quakeio.h" #include "quakefs.h" +#include "quakeio.h" #ifdef WIN32 # ifndef __BORLANDC__ diff --git a/source/r_aclip.c b/source/r_aclip.c index e06de77..2644329 100644 --- a/source/r_aclip.c +++ b/source/r_aclip.c @@ -29,8 +29,9 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "r_local.h" + #include "d_local.h" +#include "r_local.h" static finalvert_t fv[2][8]; static auxvert_t av[8]; diff --git a/source/r_alias.c b/source/r_alias.c index 9ce033f..b84e2f8 100644 --- a/source/r_alias.c +++ b/source/r_alias.c @@ -29,11 +29,12 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "sys.h" + #include "console.h" #include "d_ifacea.h" #include "r_local.h" #include "skin.h" +#include "sys.h" #define LIGHT_MIN 5 // lowest light value we'll allow, to // avoid the diff --git a/source/r_bsp.c b/source/r_bsp.c index 393bfd1..c5f28c1 100644 --- a/source/r_bsp.c +++ b/source/r_bsp.c @@ -29,12 +29,13 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "sys.h" -#include "console.h" -#include "r_local.h" #include +#include "console.h" +#include "r_local.h" +#include "sys.h" + // // current entity info // diff --git a/source/r_draw.c b/source/r_draw.c index ba15527..392c189 100644 --- a/source/r_draw.c +++ b/source/r_draw.c @@ -29,9 +29,8 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "r_local.h" -#include "d_local.h" // FIXME: shouldn't need to include - // this #define MAXLEFTCLIPEDGES 100 diff --git a/source/r_edge.c b/source/r_edge.c index 517bf26..a3ad82f 100644 --- a/source/r_edge.c +++ b/source/r_edge.c @@ -29,6 +29,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "d_ifacea.h" #include "r_local.h" diff --git a/source/r_efrag.c b/source/r_efrag.c index 669911f..51702f1 100644 --- a/source/r_efrag.c +++ b/source/r_efrag.c @@ -29,12 +29,13 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "sys.h" -#include "console.h" + #include "bothdefs.h" -#include "r_local.h" #include "cl_main.h" #include "cl_tent.h" +#include "console.h" +#include "r_local.h" +#include "sys.h" mnode_t *r_pefragtopnode; diff --git a/source/r_light.c b/source/r_light.c index f253038..a16fd21 100644 --- a/source/r_light.c +++ b/source/r_light.c @@ -29,6 +29,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "r_local.h" int r_dlightframecount; diff --git a/source/r_main.c b/source/r_main.c index 2a6e465..6ed2bfa 100644 --- a/source/r_main.c +++ b/source/r_main.c @@ -29,21 +29,25 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + +#include #ifdef HAVE_STRING_H #include #endif -#include "sys.h" -#include "cmd.h" +#ifdef HAVE_STRINGS_H +#include +#endif + #include "bothdefs.h" -#include "screen.h" -#include "console.h" -#include "r_local.h" #include "cl_cam.h" #include "cl_main.h" +#include "console.h" +#include "cmd.h" +#include "r_local.h" +#include "screen.h" +#include "sys.h" #include "view.h" -#include - //define PASSAGES void *colormap; diff --git a/source/r_misc.c b/source/r_misc.c index f58a58f..1025d10 100644 --- a/source/r_misc.c +++ b/source/r_misc.c @@ -30,15 +30,15 @@ # include "config.h" #endif -#include "host.h" -#include "sys.h" #include "console.h" #include "cmd.h" -#include "sbar.h" -#include "r_local.h" -#include "draw.h" -#include "menu.h" #include "cl_parse.h" +#include "draw.h" +#include "host.h" +#include "menu.h" +#include "r_local.h" +#include "sbar.h" +#include "sys.h" qboolean allowskybox; // whether or not to allow skyboxes diff --git a/source/r_part.c b/source/r_part.c index 09a2977..9ddd268 100644 --- a/source/r_part.c +++ b/source/r_part.c @@ -30,14 +30,14 @@ # include "config.h" #endif +#include + +#include "console.h" #include "host.h" #include "qargs.h" -#include "r_local.h" -#include "console.h" #include "quakefs.h" #include "r_dynamic.h" - -#include +#include "r_local.h" #define MAX_PARTICLES 2048 // default max # of particles at one // time diff --git a/source/r_sky.c b/source/r_sky.c index 799c043..0411da4 100644 --- a/source/r_sky.c +++ b/source/r_sky.c @@ -29,8 +29,8 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "r_local.h" -#include "d_local.h" int iskyspeed = 8; diff --git a/source/r_sprite.c b/source/r_sprite.c index aea3342..07bc02c 100644 --- a/source/r_sprite.c +++ b/source/r_sprite.c @@ -29,12 +29,18 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "sys.h" + +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif +#include + #include "console.h" #include "r_local.h" - -#include -#include +#include "sys.h" static int clip_current; static vec5_t clip_verts[2][MAXWORKINGVERTS]; diff --git a/source/r_surf.c b/source/r_surf.c index d1a7b32..95bd685 100644 --- a/source/r_surf.c +++ b/source/r_surf.c @@ -29,8 +29,9 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "sys.h" + #include "r_local.h" +#include "sys.h" drawsurf_t r_drawsurf; diff --git a/source/r_view.c b/source/r_view.c index f30d6fd..52e385e 100644 --- a/source/r_view.c +++ b/source/r_view.c @@ -33,14 +33,16 @@ #include #include -#include "host.h" -#include "view.h" #include "bothdefs.h" -#include "screen.h" +#include "client.h" #include "cmd.h" -#include "r_local.h" +#include "cvar.h" +#include "host.h" #include "msg.h" -#include "commdef.h" +#include "pmove.h" +#include "screen.h" +#include "vid.h" +#include "view.h" /* diff --git a/source/sbar.c b/source/sbar.c index e0d819a..f9c4d25 100644 --- a/source/sbar.c +++ b/source/sbar.c @@ -29,21 +29,26 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "sbar.h" -#include "screen.h" -#include "vid.h" -#include "wad.h" -#include "commdef.h" -#include "draw.h" -#include "cmd.h" -#include "client.h" -#include "bothdefs.h" -#include "va.h" -#include "msg.h" -#include "cl_cam.h" #include +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif + +#include "bothdefs.h" +#include "cl_cam.h" +#include "client.h" +#include "cmd.h" +#include "commdef.h" +#include "draw.h" +#include "msg.h" +#include "sbar.h" +#include "screen.h" +#include "va.h" +#include "vid.h" int sb_updates; // if >= vid.numpages, no update diff --git a/source/screen.c b/source/screen.c index f8445b8..ce1fcad 100644 --- a/source/screen.c +++ b/source/screen.c @@ -31,9 +31,15 @@ #endif #include +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "cl_parse.h" +#include "client.h" #include "cmd.h" #include "console.h" #include "d_iface.h" @@ -42,7 +48,6 @@ #include "keys.h" #include "menu.h" #include "pcx.h" -#include "qendian.h" #include "sbar.h" #include "skin.h" #include "sys.h" diff --git a/source/skin.c b/source/skin.c index 00a9753..dbf11f6 100644 --- a/source/skin.c +++ b/source/skin.c @@ -30,18 +30,22 @@ # include "config.h" #endif +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif -#include "client.h" -#include "cmd.h" +#include "cl_parse.h" #include "console.h" +#include "cmd.h" #include "msg.h" #include "pcx.h" -#include "sys.h" #include "qendian.h" -#include "va.h" #include "skin.h" -#include "cl_parse.h" +#include "sys.h" +#include "va.h" cvar_t *baseskin; cvar_t *noskins; diff --git a/source/snd_alsa_0_5.c b/source/snd_alsa_0_5.c index b5ae9a7..40b52b8 100644 --- a/source/snd_alsa_0_5.c +++ b/source/snd_alsa_0_5.c @@ -31,11 +31,6 @@ # include "config.h" #endif -#include -#include -#include -#include - #include #include #ifdef HAVE_UNISTD_H @@ -59,6 +54,10 @@ #include +#include "console.h" +#include "qargs.h" +#include "sound.h" + #ifndef MAP_FAILED # define MAP_FAILED ((void*)-1) #endif diff --git a/source/snd_alsa_0_6.c b/source/snd_alsa_0_6.c index 453348b..22602a0 100644 --- a/source/snd_alsa_0_6.c +++ b/source/snd_alsa_0_6.c @@ -37,7 +37,6 @@ #include "console.h" #include "qargs.h" -#include "qtypes.h" #include "sound.h" #include "va.h" diff --git a/source/snd_disk.c b/source/snd_disk.c index b32a660..30c3184 100644 --- a/source/snd_disk.c +++ b/source/snd_disk.c @@ -39,10 +39,9 @@ #include #include -#include "qtypes.h" +#include "console.h" #include "sound.h" #include "qargs.h" -#include "console.h" static int snd_inited; QFile *snd_file; diff --git a/source/snd_dma.c b/source/snd_dma.c index 63caf5b..d050dd4 100644 --- a/source/snd_dma.c +++ b/source/snd_dma.c @@ -30,6 +30,14 @@ # include "config.h" #endif +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif +#include + #include "client.h" #include "cmd.h" #include "console.h" @@ -43,9 +51,6 @@ #include "in_win.h" #endif -#include -#include - void S_Play (void); void S_PlayVol (void); void S_SoundList (void); diff --git a/source/snd_mem.c b/source/snd_mem.c index a355d5d..2749d73 100644 --- a/source/snd_mem.c +++ b/source/snd_mem.c @@ -30,13 +30,18 @@ # include "config.h" #endif +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif -#include "sys.h" -#include "sound.h" +#include "console.h" #include "qendian.h" #include "quakefs.h" -#include "console.h" +#include "sound.h" +#include "sys.h" int cache_full_cycle; diff --git a/source/snd_mix.c b/source/snd_mix.c index 9f9d19a..4f4c056 100644 --- a/source/snd_mix.c +++ b/source/snd_mix.c @@ -32,6 +32,9 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "console.h" #include "sound.h" diff --git a/source/snd_null.c b/source/snd_null.c index 9f473dd..2b03087 100644 --- a/source/snd_null.c +++ b/source/snd_null.c @@ -29,8 +29,8 @@ $Id$ */ -#include -#include +#include "qtypes.h" +#include "sound.h" // ======================================================================= // Various variables also defined in snd_dma.c diff --git a/source/snd_oss.c b/source/snd_oss.c index 9cf3ec7..682bf5e 100644 --- a/source/snd_oss.c +++ b/source/snd_oss.c @@ -55,10 +55,10 @@ # include #endif +#include "cmd.h" #include "console.h" #include "qargs.h" #include "sound.h" -#include "cmd.h" #ifndef MAP_FAILED # define MAP_FAILED ((void *) -1) diff --git a/source/snd_sdl.c b/source/snd_sdl.c index a331421..98f086d 100644 --- a/source/snd_sdl.c +++ b/source/snd_sdl.c @@ -1,5 +1,5 @@ /* - snd_oss.c + snd_sdl.c (description) @@ -32,10 +32,10 @@ #include #include +#include "cmd.h" #include "console.h" #include "qargs.h" #include "sound.h" -#include "cmd.h" static dma_t the_shm; static int snd_inited; diff --git a/source/snd_sgi.c b/source/snd_sgi.c index 277f72b..cf03f1e 100644 --- a/source/snd_sgi.c +++ b/source/snd_sgi.c @@ -33,10 +33,10 @@ #include #include +#include "console.h" #include "qtypes.h" #include "qargs.h" #include "sound.h" -#include "console.h" static int snd_inited = 0; static ALconfig alc; diff --git a/source/snd_sun.c b/source/snd_sun.c index 83baafb..89bd3bb 100644 --- a/source/snd_sun.c +++ b/source/snd_sun.c @@ -28,11 +28,9 @@ $Id$ */ +#ifdef HAVE_CONFIG_H # include "config.h" -#include -#include -#include -#include +#endif #ifdef HAVE_UNISTD_H #include @@ -48,6 +46,11 @@ #include #include +#include "qtypes.h" +#include "sound.h" +#include "qargs.h" +#include "console.h" + int audio_fd; int snd_inited; diff --git a/source/sv_ccmds.c b/source/sv_ccmds.c index af828af..a265882 100644 --- a/source/sv_ccmds.c +++ b/source/sv_ccmds.c @@ -29,27 +29,25 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "server.h" -#include "crc.h" -#include "msg.h" -#include "world.h" -#include "commdef.h" -#include "cmd.h" -#include "sys.h" -#include "pmove.h" -#include "compat.h" -#include "va.h" -#include "quakefs.h" -#include "bothdefs.h" -#include "qendian.h" -#include "qargs.h" #include +#ifdef HAVE_STRING_H #include +#endif #ifdef HAVE_STRINGS_H #include #endif +#include "bothdefs.h" +#include "cmd.h" +#include "msg.h" +#include "qargs.h" +#include "qendian.h" +#include "quakefs.h" +#include "server.h" +#include "sys.h" +#include "va.h" + qboolean sv_allow_cheats; int fp_messages = 4, fp_persecond = 4, fp_secondsdead = 10; diff --git a/source/sv_cvar.c b/source/sv_cvar.c index b1cb266..67b1dd3 100644 --- a/source/sv_cvar.c +++ b/source/sv_cvar.c @@ -29,6 +29,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "cvar.h" #include "server.h" diff --git a/source/sv_ents.c b/source/sv_ents.c index 1f4a5aa..fccf83a 100644 --- a/source/sv_ents.c +++ b/source/sv_ents.c @@ -29,17 +29,17 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #ifdef HAVE_STRING_H #include #endif -#include "server.h" -#include "crc.h" +#ifdef HAVE_STRINGS_H +#include +#endif + #include "msg.h" -#include "world.h" -#include "commdef.h" -#include "cmd.h" +#include "server.h" #include "sys.h" -#include "pmove.h" // LordHavoc: added and removed certain eval_ items // Ender Extends (QSG - Begin) diff --git a/source/sv_init.c b/source/sv_init.c index bffd472..95f71fd 100644 --- a/source/sv_init.c +++ b/source/sv_init.c @@ -29,14 +29,19 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "server.h" + +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif + #include "crc.h" #include "msg.h" -#include "world.h" -#include "commdef.h" #include "quakefs.h" - -#include +#include "server.h" +#include "world.h" server_t sv; // local server diff --git a/source/sv_main.c b/source/sv_main.c index f231057..4babc04 100644 --- a/source/sv_main.c +++ b/source/sv_main.c @@ -32,8 +32,9 @@ #include #include +#ifdef HAVE_STRING_H #include - +#endif #ifdef HAVE_STRINGS_H # include #endif @@ -41,8 +42,8 @@ #include "bothdefs.h" #include "buildnum.h" #include "cmd.h" -#include "commdef.h" -#include "crc.h" +#include "model.h" +#include "net.h" #include "msg.h" #include "pmove.h" #include "qargs.h" @@ -51,7 +52,7 @@ #include "sys.h" #include "va.h" #include "ver_check.h" -#include "world.h" +#include "zone.h" quakeparms_t host_parms; qboolean host_initialized; // true if into command execution diff --git a/source/sv_misc.c b/source/sv_misc.c index 81bc6f2..9ee73ad 100644 --- a/source/sv_misc.c +++ b/source/sv_misc.c @@ -29,15 +29,8 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "client.h" -#include "server.h" -#include "crc.h" -#include "msg.h" -#include "world.h" -#include "commdef.h" -#include "cmd.h" -#include "sys.h" -#include "pmove.h" client_static_t cls; diff --git a/source/sv_model.c b/source/sv_model.c index 3806f58..ca7a33d 100644 --- a/source/sv_model.c +++ b/source/sv_model.c @@ -30,14 +30,9 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "server.h" -#include "crc.h" -#include "msg.h" -#include "world.h" -#include "commdef.h" -#include "cmd.h" -#include "sys.h" -#include "pmove.h" + +#include "cvar.h" +#include "model.h" const int mod_lightmap_bytes = 1; mplane_t frustum[4]; diff --git a/source/sv_move.c b/source/sv_move.c index 94ae244..296f3b3 100644 --- a/source/sv_move.c +++ b/source/sv_move.c @@ -29,18 +29,14 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "server.h" -#include "crc.h" -#include "msg.h" -#include "world.h" -#include "commdef.h" -#include "cmd.h" -#include "sys.h" -#include "pmove.h" #include #include +#include "pmove.h" +#include "server.h" +#include "world.h" + #define STEPSIZE 18 /* diff --git a/source/sv_nchan.c b/source/sv_nchan.c index f445999..0492a16 100644 --- a/source/sv_nchan.c +++ b/source/sv_nchan.c @@ -32,14 +32,12 @@ #ifdef HAVE_STRING_H #include #endif -#include "server.h" -#include "crc.h" +#ifdef HAVE_STRINGS_H +#include +#endif + #include "msg.h" -#include "world.h" -#include "commdef.h" -#include "cmd.h" -#include "sys.h" -#include "pmove.h" +#include "server.h" // check to see if client block will fit, if not, rotate buffers void diff --git a/source/sv_phys.c b/source/sv_phys.c index 3257a00..854bf23 100644 --- a/source/sv_phys.c +++ b/source/sv_phys.c @@ -29,30 +29,29 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "server.h" -#include "crc.h" -#include "msg.h" -#include "world.h" -#include "commdef.h" -#include "cmd.h" -#include "sys.h" + +#include "cvar.h" #include "pmove.h" +#include "server.h" +#include "world.h" /* + pushmove objects do not obey gravity, and do not interact with each + other or trigger fields, but block normal movement and push normal + objects when they move. -pushmove objects do not obey gravity, and do not interact with each other or trigger fields, but block normal movement and push normal objects when they move. + onground is set for toss objects when they come to a complete rest. it + is set for steping or walking objects -onground is set for toss objects when they come to a complete rest. it is set for steping or walking objects + doors, plats, etc are SOLID_BSP, and MOVETYPE_PUSH + bonus items are SOLID_TRIGGER touch, and MOVETYPE_TOSS + corpses are SOLID_NOT and MOVETYPE_TOSS + crates are SOLID_BBOX and MOVETYPE_TOSS + walking monsters are SOLID_SLIDEBOX and MOVETYPE_STEP + flying/floating monsters are SOLID_SLIDEBOX and MOVETYPE_FLY -doors, plats, etc are SOLID_BSP, and MOVETYPE_PUSH -bonus items are SOLID_TRIGGER touch, and MOVETYPE_TOSS -corpses are SOLID_NOT and MOVETYPE_TOSS -crates are SOLID_BBOX and MOVETYPE_TOSS -walking monsters are SOLID_SLIDEBOX and MOVETYPE_STEP -flying/floating monsters are SOLID_SLIDEBOX and MOVETYPE_FLY - -solid_edge items only clip against bsp models. + solid_edge items only clip against bsp models. */ diff --git a/source/sv_send.c b/source/sv_send.c index 7c91683..406a912 100644 --- a/source/sv_send.c +++ b/source/sv_send.c @@ -29,21 +29,17 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "server.h" -#include "crc.h" -#include "msg.h" -#include "world.h" -#include "commdef.h" -#include "cmd.h" -#include "sys.h" -#include "pmove.h" -#include "bothdefs.h" #include #include #include #include +#include "bothdefs.h" +#include "msg.h" +#include "server.h" +#include "sys.h" + #define CHAN_AUTO 0 #define CHAN_WEAPON 1 #define CHAN_VOICE 2 diff --git a/source/sv_sys_unix.c b/source/sv_sys_unix.c index 8eff7dd..13c0671 100644 --- a/source/sv_sys_unix.c +++ b/source/sv_sys_unix.c @@ -30,18 +30,6 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include -#ifdef HAVE_STRINGS_H -#include -#endif -#include "qargs.h" -#include "cvar.h" -#include "server.h" -#include "sys.h" - -#ifdef NeXT -#include -#endif #include #include @@ -49,10 +37,22 @@ #include #include #include +#include #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif +#include "cvar.h" +#include "qargs.h" +#include "server.h" +#include "sys.h" + +#ifdef NeXT +#include +#endif cvar_t *sys_extrasleep; cvar_t *sys_dead_sleep; diff --git a/source/sv_user.c b/source/sv_user.c index 3e4fb41..4d92024 100644 --- a/source/sv_user.c +++ b/source/sv_user.c @@ -29,27 +29,30 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "va.h" -#include "server.h" -#include "crc.h" -#include "console.h" -#include "msg.h" -#include "world.h" -#include "commdef.h" -#include "cmd.h" -#include "sys.h" -#include "pmove.h" -#include "compat.h" -#include "bothdefs.h" -#include "quakefs.h" -#include "checksum.h" #include +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include #include #include +#include "bothdefs.h" +#include "checksum.h" +#include "cmd.h" +#include "cvar.h" +#include "msg.h" +#include "pmove.h" +#include "quakefs.h" +#include "server.h" +#include "sys.h" +#include "va.h" +#include "world.h" + edict_t *sv_player; usercmd_t cmd; diff --git a/source/sw_model_alias.c b/source/sw_model_alias.c index 3f2cd1f..7026df4 100644 --- a/source/sw_model_alias.c +++ b/source/sw_model_alias.c @@ -32,14 +32,20 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include -#include "r_local.h" -#include "sys.h" -#include "console.h" -#include "qendian.h" +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif + #include "checksum.h" +#include "d_iface.h" +#include "model.h" +#include "qendian.h" #include "server.h" +#include "sys.h" extern char loadname[]; extern model_t *loadmodel; diff --git a/source/sw_model_sprite.c b/source/sw_model_sprite.c index 66da552..06b912d 100644 --- a/source/sw_model_sprite.c +++ b/source/sw_model_sprite.c @@ -1,5 +1,5 @@ /* - cl_model.c + sw_model_sprite.c model loading and caching @@ -33,10 +33,10 @@ # include "config.h" #endif -#include "model.h" -#include "server.h" #include "d_iface.h" +#include "model.h" #include "qendian.h" +#include "server.h" extern model_t *loadmodel; extern char loadname[]; diff --git a/source/sys_null.c b/source/sys_null.c index 92edf4c..d84eb3c 100644 --- a/source/sys_null.c +++ b/source/sys_null.c @@ -29,7 +29,8 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "errno.h" + +#include /* diff --git a/source/sys_unix.c b/source/sys_unix.c index 82dd2cd..3ae05d4 100644 --- a/source/sys_unix.c +++ b/source/sys_unix.c @@ -38,11 +38,11 @@ #include #include -#include "sys.h" -#include "qargs.h" -#include "host.h" #include "cvar.h" +#include "host.h" +#include "qargs.h" #include "server.h" +#include "sys.h" /* This is unused in the client, but we need the symbol there too. */ server_static_t svs; diff --git a/source/teamplay.c b/source/teamplay.c index 9f99f51..eba53e1 100644 --- a/source/teamplay.c +++ b/source/teamplay.c @@ -26,17 +26,26 @@ $Id$ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include #include "bothdefs.h" +#include "console.h" #include "cmd.h" #include "client.h" -#include "teamplay.h" #include "locs.h" -#include "sys.h" -#include "console.h" #include "quakefs.h" +#include "sys.h" +#include "teamplay.h" extern cvar_t *skin; cvar_t *cl_deadbodyfilter; diff --git a/source/tga.c b/source/tga.c index befa5ec..7b799bf 100644 --- a/source/tga.c +++ b/source/tga.c @@ -29,7 +29,13 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "qendian.h" #include "quakefs.h" diff --git a/source/va.c b/source/va.c index 2fc1cba..b7005d1 100644 --- a/source/va.c +++ b/source/va.c @@ -29,6 +29,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include #include diff --git a/source/vid_3dfxsvga.c b/source/vid_3dfxsvga.c index 0a5b3b9..364b9fc 100644 --- a/source/vid_3dfxsvga.c +++ b/source/vid_3dfxsvga.c @@ -36,6 +36,9 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif #include #include #include diff --git a/source/vid_ggi.c b/source/vid_ggi.c index c5d68cc..c1ef8a7 100644 --- a/source/vid_ggi.c +++ b/source/vid_ggi.c @@ -36,7 +36,12 @@ #include #include #include +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include #include "bothdefs.h" // needed by: common.h, net.h, diff --git a/source/vid_glx.c b/source/vid_glx.c index 1166e4b..79ca8a1 100644 --- a/source/vid_glx.c +++ b/source/vid_glx.c @@ -31,7 +31,12 @@ # include "config.h" #endif +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include diff --git a/source/vid_null.c b/source/vid_null.c index 93a7eb0..7bc18f4 100644 --- a/source/vid_null.c +++ b/source/vid_null.c @@ -29,6 +29,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + #include "d_local.h" viddef_t vid; // global video state diff --git a/source/vid_sdl.c b/source/vid_sdl.c index 7927942..1488bd5 100644 --- a/source/vid_sdl.c +++ b/source/vid_sdl.c @@ -33,6 +33,9 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif #include #include "cvar.h" diff --git a/source/vid_sgl.c b/source/vid_sgl.c index 347ecba..e1910ed 100644 --- a/source/vid_sgl.c +++ b/source/vid_sgl.c @@ -32,18 +32,21 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif #ifndef WIN32 #include #endif #include #include "console.h" +#include "glquake.h" #include "host.h" #include "qargs.h" #include "qendian.h" #include "sys.h" #include "va.h" -#include "glquake.h" #define WARP_WIDTH 320 #define WARP_HEIGHT 200 diff --git a/source/vid_svgalib.c b/source/vid_svgalib.c index ecba2ba..b26e7ac 100644 --- a/source/vid_svgalib.c +++ b/source/vid_svgalib.c @@ -35,16 +35,6 @@ # include "config.h" #endif -#include "host.h" -#include "d_local.h" -#include "cvar.h" -#include "cmd.h" -#include "sys.h" -#include "console.h" -#include "input.h" -#include "qargs.h" -#include "qendian.h" - #include #ifdef HAVE_UNISTD_H #include @@ -57,6 +47,15 @@ #include +#include "host.h" +#include "d_local.h" +#include "cvar.h" +#include "cmd.h" +#include "sys.h" +#include "console.h" +#include "input.h" +#include "qargs.h" +#include "qendian.h" void VGA_UpdatePlanarScreen (void *srcbuffer); diff --git a/source/vid_x11.c b/source/vid_x11.c index 06f83dd..f97967b 100644 --- a/source/vid_x11.c +++ b/source/vid_x11.c @@ -38,7 +38,12 @@ #include #include #include +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #include #include @@ -46,10 +51,6 @@ #include #endif -#ifdef HAVE_STRINGS_H -# include -#endif - #include #include #include diff --git a/source/wad.c b/source/wad.c index 2f59923..b6fca50 100644 --- a/source/wad.c +++ b/source/wad.c @@ -38,9 +38,9 @@ #endif #include "sys.h" -#include "wad.h" #include "quakefs.h" #include "qendian.h" +#include "wad.h" int wad_numlumps; lumpinfo_t *wad_lumps; diff --git a/source/world.c b/source/world.c index 690c711..2ff166e 100644 --- a/source/world.c +++ b/source/world.c @@ -29,16 +29,20 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "world.h" -#include "server.h" -#include "crc.h" -#include "commdef.h" -#include "console.h" #include #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif + +#include "commdef.h" +#include "console.h" +#include "crc.h" +#include "server.h" +#include "world.h" /* diff --git a/source/zone.c b/source/zone.c index d79ba96..26b7ccd 100644 --- a/source/zone.c +++ b/source/zone.c @@ -29,15 +29,20 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "sys.h" -#include "qtypes.h" -#include "zone.h" -#include "console.h" -#include "cmd.h" -#include "qargs.h" -#include #include +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif + +#include "cmd.h" +#include "console.h" +#include "qargs.h" +#include "sys.h" +#include "zone.h" #define DYNAMIC_SIZE 0x20000 #define ZONEID 0x1d4a11