shithub: qk1

Download patch

ref: a13439378618f7b8b372ab6526ca5578b21e65cd
parent: f47ac12115f687ad7ec5348679fda15b4cfc4009
author: Konstantinn Bonnet <qu7uux@gmail.com>
date: Tue Feb 28 16:12:14 EST 2017

amend header includes

- remove stdio.h where it isn't needed
- don't include dat.h and fns.h from quakedef.h

--- a/cd.c
+++ b/cd.c
@@ -1,9 +1,10 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
 #include <thread.h>
 #include <regexp.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 static int cdread;
 static int cdloop;
--- a/chase.c
+++ b/chase.c
@@ -1,9 +1,8 @@
-// chase.c -- chase camera code
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 cvar_t	chase_back = {"chase_back", "100"};
 cvar_t	chase_up = {"chase_up", "16"};
--- a/cl_demo.c
+++ b/cl_demo.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 static void
 timedm(void)
--- a/cl_input.c
+++ b/cl_input.c
@@ -1,12 +1,8 @@
-// cl.input.c  -- builds an intended movement command to send to the server
-
-// Quake is a trademark of Id Software, Inc., (c) 1996 Id Software, Inc. All
-// rights reserved.
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 /*
 ===============================================================================
--- a/cl_main.c
+++ b/cl_main.c
@@ -1,9 +1,8 @@
-// cl_main.c  -- client main loop
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 // we need to declare some mouse variables here, because the menu system
 // references them even when on a unix system.
--- a/cl_parse.c
+++ b/cl_parse.c
@@ -1,9 +1,8 @@
-// cl_parse.c  -- parse a message received from the server
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 char *svc_strings[] =
 {
--- a/cl_tent.c
+++ b/cl_tent.c
@@ -1,9 +1,8 @@
-// cl_tent.c -- client side temporary entities
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 int			num_temp_entities;
 entity_t	cl_temp_entities[MAX_TEMP_ENTITIES];
--- a/cmd.c
+++ b/cmd.c
@@ -1,9 +1,8 @@
-// cmd.c -- Quake script command processing module
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 void Cmd_ForwardToServer (void);
 
--- a/common.c
+++ b/common.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 cvar_t  registered = {"registered","0"};
 cvar_t  cmdline = {"cmdline","0", false, true};
--- a/console.c
+++ b/console.c
@@ -1,7 +1,9 @@
 #include <u.h>
 #include <libc.h>
 #include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 int 		con_linewidth;
 
--- a/cvar.c
+++ b/cvar.c
@@ -1,9 +1,8 @@
-// cvar.c -- dynamic variable tracking
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 cvar_t	*cvar_vars;
 char	*cvar_null_string = "";
--- a/d_edge.c
+++ b/d_edge.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 static int	miplevel;
 
--- a/d_fill.c
+++ b/d_fill.c
@@ -1,9 +1,8 @@
-// d_clear: clears a specified rectangle to the specified color
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 /*
 ================
--- a/d_init.c
+++ b/d_init.c
@@ -1,9 +1,8 @@
-// d_init.c: rasterization driver initialization
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 #define NUM_MIPS	4
 
--- a/d_modech.c
+++ b/d_modech.c
@@ -1,9 +1,8 @@
-// d_modech.c: called when mode has just changed
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 int	d_vrectx, d_vrecty, d_vrectright_particle, d_vrectbottom_particle;
 
--- a/d_part.c
+++ b/d_part.c
@@ -1,9 +1,8 @@
-// d_part.c: software driver module for drawing particles
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 /*
 ==============
--- a/d_polyse.c
+++ b/d_polyse.c
@@ -1,10 +1,8 @@
-// d_polyset.c: routines for drawing sets of polygons sharing the same
-// texture (used for Alias models)
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 // TODO: put in span spilling to shrink list size
 // !!! if this is changed, it must be changed in d_polysa.s too !!!
--- a/d_scan.c
+++ b/d_scan.c
@@ -1,11 +1,8 @@
-// d_scan.c
-//
-// Portable C scan-level rasterization code, all pixel depths.
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 unsigned char	*r_turb_pbase, *r_turb_pdest;
 fixed16_t		r_turb_s, r_turb_t, r_turb_sstep, r_turb_tstep;
--- a/d_sky.c
+++ b/d_sky.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 #define SKY_SPAN_SHIFT	5
 #define SKY_SPAN_MAX	(1 << SKY_SPAN_SHIFT)
--- a/d_sprite.c
+++ b/d_sprite.c
@@ -1,10 +1,8 @@
-// d_sprite.c: software top-level rasterization driver module for drawing
-// sprites
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 static int		sprite_height;
 static int		minindex, maxindex;
--- a/d_surf.c
+++ b/d_surf.c
@@ -1,9 +1,8 @@
-// d_surf.c: rasterization driver surface heap manager
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 float           surfscale;
 qboolean        r_cache_thrash;         // set if surface cache is thrashing
--- a/d_vars.c
+++ b/d_vars.c
@@ -1,9 +1,8 @@
-// r_vars.c: global refresh variables
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 // all global and static refresh variables are collected in a contiguous block
 // to avoid cache conflicts.
--- a/d_zpoint.c
+++ b/d_zpoint.c
@@ -1,9 +1,8 @@
-// d_zpoint.c: software driver module for drawing z-buffered points
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 /*
 =====================
--- a/draw.c
+++ b/draw.c
@@ -1,10 +1,8 @@
-// draw.c -- this is the only file outside the refresh that touches the
-// vid buffer
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 typedef struct {
 	vrect_t	rect;
--- a/fs.c
+++ b/fs.c
@@ -1,8 +1,9 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
 #include <bio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 u16int crcn;
 char fsdir[Nfspath];
--- a/host.c
+++ b/host.c
@@ -1,9 +1,8 @@
-// host.c -- coordinates spawning and killing of local servers
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 /*
 
--- a/host_cmd.c
+++ b/host_cmd.c
@@ -1,6 +1,8 @@
 #include <u.h>
 #include <libc.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 int	current_skill;
 
--- a/in.c
+++ b/in.c
@@ -1,11 +1,12 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
 #include <draw.h>
 #include <thread.h>
 #include <mouse.h>
 #include <keyboard.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 /* vid.c */
 extern int resized;
--- a/keys.c
+++ b/keys.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 /*
 
--- a/mathlib.c
+++ b/mathlib.c
@@ -1,9 +1,8 @@
-// mathlib.c -- math primitives
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 vec3_t vec3_origin = {0,0,0};
 int nanmask = 255<<23;
--- a/menu.c
+++ b/menu.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 char savs[Nsav][Nsavcm];
 int savcanld[Nsav];
--- a/mkfile
+++ b/mkfile
@@ -38,7 +38,6 @@
 	net_main.$O\
 	net_dgrm.$O\
 	net_bsd.$O\
-	nonintel.$O\
 	pr_cmds.$O\
 	pr_edict.$O\
 	pr_exec.$O\
--- a/model.c
+++ b/model.c
@@ -1,12 +1,8 @@
-// models.c -- model loading and caching
-
-// models are the only shared resource between a client and server running
-// on the same machine.
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 model_t	*loadmodel;
 char	loadname[32];	// for hunk tags
--- a/net_bsd.c
+++ b/net_bsd.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 net_driver_t net_drivers[MAX_NET_DRIVERS] =
 {
--- a/net_dgrm.c
+++ b/net_dgrm.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 // This is enables a simple IP banning mechanism
 //#define BAN_TEST	/* FIXME */
--- a/net_loop.c
+++ b/net_loop.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 qboolean	localconnectpending = false;
 qsocket_t	*loop_client = nil;
--- a/net_main.c
+++ b/net_main.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 qsocket_t	*net_activeSockets = nil;
 qsocket_t	*net_freeSockets = nil;
--- a/net_udp.c
+++ b/net_udp.c
@@ -1,9 +1,10 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
-/* FIXME FIXME FIXME */
+/* TODO */
 
 /*
 extern int gethostname (char *, int);
--- a/nonintel.c
+++ /dev/null
@@ -1,40 +1,0 @@
-//
-// nonintel.c: code for non-Intel processors only
-//
-
-#include <u.h>
-#include <libc.h>
-#include <stdio.h>
-#include "quakedef.h"
-
-/*
-================
-R_Surf8Patch
-================
-*/
-void R_Surf8Patch ()
-{
-	// we only patch code on Intel
-}
-
-
-/*
-================
-R_Surf16Patch
-================
-*/
-void R_Surf16Patch ()
-{
-	// we only patch code on Intel
-}
-
-
-/*
-================
-R_SurfacePatch
-================
-*/
-void R_SurfacePatch (void)
-{
-	// we only patch code on Intel
-}
--- a/pr_cmds.c
+++ b/pr_cmds.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 #define	RETURN_EDICT(e) (((int *)pr_globals)[OFS_RETURN] = EDICT_TO_PROG(e))
 
--- a/pr_edict.c
+++ b/pr_edict.c
@@ -1,9 +1,8 @@
-// sv_edict.c -- entity dictionary
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 dprograms_t		*progs;
 dfunction_t		*pr_functions;
--- a/pr_exec.c
+++ b/pr_exec.c
@@ -1,12 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
-
-
-/*
-
-*/
+#include "fns.h"
 
 typedef struct
 {
--- a/qk1.c
+++ b/qk1.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 static int debug;
 
--- a/quakedef.h
+++ b/quakedef.h
@@ -160,8 +160,6 @@
 	int		effects;
 } entity_state_t;
 
-#include "dat.h"
-#include "fns.h"
 #include "wad.h"
 #include "draw.h"
 #include "screen.h"
--- a/r_aclip.c
+++ b/r_aclip.c
@@ -1,9 +1,8 @@
-// r_aclip.c: clip routines for drawing Alias models directly to the screen
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 static finalvert_t		fv[2][8];
 static auxvert_t		av[8];
--- a/r_alias.c
+++ b/r_alias.c
@@ -1,9 +1,8 @@
-// r_alias.c: routines for setting up to draw alias models
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 #define LIGHT_MIN	5		// lowest light value we'll allow, to avoid the
 							//  need for inner-loop light clamping
--- a/r_bsp.c
+++ b/r_bsp.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 //
 // current entity info
--- a/r_draw.c
+++ b/r_draw.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 #define MAXLEFTCLIPEDGES		100
 
--- a/r_edge.c
+++ b/r_edge.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 /* FIXME
 the complex cases add new polys on most lines, so dont optimize for keeping them the same
--- a/r_efrag.c
+++ b/r_efrag.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 mnode_t	*r_pefragtopnode;
 
--- a/r_light.c
+++ b/r_light.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 int	r_dlightframecount;
 
--- a/r_local.h
+++ b/r_local.h
@@ -122,8 +122,6 @@
 
 void R_GenSkyTile (void *pdest);
 void R_GenSkyTile16 (void *pdest);
-void R_Surf8Patch (void);
-void R_Surf16Patch (void);
 void R_DrawSubmodelPolygons (model_t *pmodel, int clipflags);
 void R_DrawSolidClippedSubmodelPolygons (model_t *pmodel);
 
@@ -221,7 +219,6 @@
 void R_DrawParticles (void);
 void R_InitParticles (void);
 void R_ClearParticles (void);
-void R_SurfacePatch (void);
 
 extern int		r_amodels_drawn;
 extern edge_t	*auxedges;
--- a/r_main.c
+++ b/r_main.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 //define	PASSAGES
 
@@ -244,7 +245,6 @@
 	// surface 0 doesn't really exist; it's just a dummy because index 0
 	// is used to indicate no edge attached to surface
 		surfaces--;
-		R_SurfacePatch ();
 	}
 	else
 	{
@@ -850,7 +850,6 @@
 	// surface 0 doesn't really exist; it's just a dummy because index 0
 	// is used to indicate no edge attached to surface
 		surfaces--;
-		R_SurfacePatch ();
 	}
 
 	R_BeginEdgeFrame ();
--- a/r_misc.c
+++ b/r_misc.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 /*
 ===============
--- a/r_part.c
+++ b/r_part.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 #define MAX_PARTICLES			2048	// default max # of particles at one
 										//  time
--- a/r_sky.c
+++ b/r_sky.c
@@ -1,8 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
-
+#include "fns.h"
 
 int		iskyspeed = 8;
 int		iskyspeed2 = 2;
--- a/r_sprite.c
+++ b/r_sprite.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 static int				clip_current;
 static vec5_t			clip_verts[2][MAXWORKINGVERTS];
--- a/r_surf.c
+++ b/r_surf.c
@@ -1,9 +1,8 @@
-// r_surf.c: surface-related refresh code
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 drawsurf_t	r_drawsurf;
 
--- a/r_vars.c
+++ b/r_vars.c
@@ -2,8 +2,9 @@
 
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 // all global and static refresh variables are collected in a contiguous block
 // to avoid cache conflicts.
--- a/sbar.c
+++ b/sbar.c
@@ -1,9 +1,8 @@
-// sbar.c -- status bar code
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 
 int			sb_updates;		// if >= vid.numpages, no update needed
--- a/screen.c
+++ b/screen.c
@@ -1,9 +1,8 @@
-// screen.c -- master for refresh, status bar, console, chat, notify, etc
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 // only the refresh window will be updated unless these variables are flagged 
 int			scr_copytop;
--- a/snd.c
+++ b/snd.c
@@ -1,8 +1,9 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
 #include <thread.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 enum{
 	Nbuf = 8
--- a/snd_dma.c
+++ b/snd_dma.c
@@ -1,9 +1,8 @@
-// snd_dma.c -- main control for any streaming sound output device
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 void S_Play(void);
 void S_PlayVol(void);
--- a/snd_mem.c
+++ b/snd_mem.c
@@ -1,9 +1,8 @@
-// snd_mem.c: sound caching
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 int			cache_full_cycle;
 
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -1,9 +1,8 @@
-// snd_mix.c -- portable code to mix sounds for snd_dma.c
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 #define DWORD	u32int
 
--- a/sv_main.c
+++ b/sv_main.c
@@ -1,9 +1,8 @@
-// sv_main.c -- server main program
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 server_t		sv;
 server_static_t	svs;
--- a/sv_move.c
+++ b/sv_move.c
@@ -1,9 +1,8 @@
-// sv_move.c -- monster movement
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 #define	STEPSIZE	18
 
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 /*
 
--- a/sv_user.c
+++ b/sv_user.c
@@ -1,9 +1,8 @@
-// sv_user.c -- server code for moving users
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 edict_t	*sv_player;
 
--- a/sys.c
+++ b/sys.c
@@ -1,8 +1,9 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
 #include <thread.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 qboolean isDedicated;
 mainstacksize = 512*1024;
--- a/vid.c
+++ b/vid.c
@@ -1,8 +1,9 @@
 #include <u.h>
 #include <libc.h>
 #include <draw.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 viddef_t vid;		/* global video state */
 int resized;
--- a/view.c
+++ b/view.c
@@ -1,9 +1,8 @@
-// view.c -- player eye positioning
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 /*
 
--- a/wad.c
+++ b/wad.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 int			wad_numlumps;
 lumpinfo_t	*wad_lumps;
--- a/world.c
+++ b/world.c
@@ -1,9 +1,8 @@
-// world.c -- world query functions
-
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 /*
 
--- a/zone.c
+++ b/zone.c
@@ -1,7 +1,8 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
+#include "dat.h"
 #include "quakedef.h"
+#include "fns.h"
 
 #define	DYNAMIC_SIZE	0xc000