Index: twilight/src/base/cmd.c
diff -u twilight/src/base/cmd.c:1.25 twilight/src/base/cmd.c:1.26
--- twilight/src/base/cmd.c:1.25	Fri Mar 28 11:39:19 2003
+++ twilight/src/base/cmd.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: cmd.c,v 1.25 2003/03/28 16:39:19 warp Exp $";
+    "$Id: cmd.c,v 1.26 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -70,7 +70,7 @@
 bind g "impulse 5 ; +attack ; wait ; -attack ; impulse 2"
 ============
 */
-void
+static void
 Cmd_Wait_f (void)
 {
 	cmd_wait = true;
@@ -462,7 +462,7 @@
 Cmd_Exec_f
 ===============
 */
-void
+static void
 Cmd_Exec_f (void)
 {
 	char		*f;
@@ -495,7 +495,7 @@
 Just prints the rest of the line to the console
 ===============
 */
-void
+static void
 Cmd_Echo_f (void)
 {
 	int			i;
@@ -512,7 +512,7 @@
 Creates a new command that executes a command string (possibly ; seperated)
 ===============
 */
-void
+static void
 Cmd_Alias_f (void)
 {
 	cmdalias_t	*a;
@@ -829,32 +829,6 @@
 
 	buf[bpos] = NULL;
 	return buf;
-}
-
-/*
-============
-Cmd_CompleteAlias
-
-Thanks for Taniwha's Help -EvilTypeGuy
-============
-*/
-char
-*Cmd_CompleteAlias (char * partial)
-{
-	static cmdalias_t	*alias;
-	size_t				len;
-
-	len = strlen(partial);
-
-	if (!len)
-		return NULL;
-
-	// Check aliases
-	for (alias = cmd_alias; alias; alias = alias->next)
-		if (!strncasecmp(partial, alias->name, len))
-			return alias->name;
-
-	return NULL;
 }
 
 /*
Index: twilight/src/base/collision.c
diff -u twilight/src/base/collision.c:1.8 twilight/src/base/collision.c:1.9
--- twilight/src/base/collision.c:1.8	Mon Jul 29 23:16:01 2002
+++ twilight/src/base/collision.c	Fri Apr 18 17:09:14 2003
@@ -22,7 +22,7 @@
 		Boston, MA  02111-1307, USA
 */
 static const char rcsid[] =
-	"$Id: collision.c,v 1.8 2002/07/30 03:16:01 knghtbrd Exp $";
+	"$Id: collision.c,v 1.9 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -237,26 +237,6 @@
 				t->trace->startsolid = true;
 		}
 	}
-}
-
-void
-Collision_RoundUpToHullSize (const model_t *cmodel,
-		const vec3_t inmins, const vec3_t inmaxs,
-		vec3_t outmins, vec3_t outmaxs)
-{
-	vec3_t			size;
-	const hull_t	*hull;
-
-	VectorSubtract (inmaxs, inmins, size);
-	if (size[0] < 3)
-		hull = &cmodel->hulls[0]; // 0x0x0
-	else if (size[0] <= 32)
-		hull = &cmodel->hulls[1]; // 32x32x56
-	else
-		hull = &cmodel->hulls[2]; // 64x64x88
-
-	VectorCopy (inmins, outmins);
-	VectorAdd (inmins, hull->clip_size, outmaxs);
 }
 
 
Index: twilight/src/base/crc.c
diff -u twilight/src/base/crc.c:1.5 twilight/src/base/crc.c:1.6
--- twilight/src/base/crc.c:1.5	Sat Jul  6 20:33:36 2002
+++ twilight/src/base/crc.c	Fri Apr 18 17:09:14 2003
@@ -24,7 +24,7 @@
 */
 /* crc.c */
 static const char rcsid[] =
-    "$Id: crc.c,v 1.5 2002/07/07 00:33:36 warp Exp $";
+    "$Id: crc.c,v 1.6 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -74,22 +74,10 @@
 	0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0
 };
 
-void
+static void
 CRC_Init (unsigned short *crcvalue)
 {
 	*crcvalue = CRC_INIT_VALUE;
-}
-
-void
-CRC_ProcessByte (unsigned short *crcvalue, Uint8 data)
-{
-	*crcvalue = (*crcvalue << 8) ^ crctable[(*crcvalue >> 8) ^ data];
-}
-
-unsigned short
-CRC_Value (unsigned short crcvalue)
-{
-	return crcvalue ^ CRC_XOR_VALUE;
 }
 
 unsigned short
Index: twilight/src/base/cvar.c
diff -u twilight/src/base/cvar.c:1.10 twilight/src/base/cvar.c:1.11
--- twilight/src/base/cvar.c:1.10	Wed Mar 12 00:39:01 2003
+++ twilight/src/base/cvar.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: cvar.c,v 1.10 2003/03/12 05:39:01 warp Exp $";
+    "$Id: cvar.c,v 1.11 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -36,6 +36,10 @@
 #include "strlib.h"
 #include "zone.h"
 
+static void Cvar_Show (cvar_t *var);
+static void Cvar_Set_f (void);
+static void Cvar_Reset_f (void);
+
 typedef struct cvar_foreach_s {
 	cvar_t					   *var;
 	struct cvar_foreach_s	   *next;
@@ -149,7 +153,7 @@
 		engine_callback (var);
 }
 
-void
+static void
 Cvar_Set_f (void)
 {
 	cvar_t	*var;
@@ -184,7 +188,7 @@
 	return;
 }
 
-void
+static void
 Cvar_Reset_f (void)
 {
 	cvar_t	   *var;
@@ -410,6 +414,7 @@
 }
 
 
+#if 0
 void
 Cvar_Cleanup (void)
 {
@@ -437,6 +442,7 @@
 		Z_Free (t);
 	}
 }
+#endif
 
 
 void
Index: twilight/src/base/lh_parser.c
diff -u twilight/src/base/lh_parser.c:1.1 twilight/src/base/lh_parser.c:1.2
--- twilight/src/base/lh_parser.c:1.1	Sat Mar 22 07:50:34 2003
+++ twilight/src/base/lh_parser.c	Fri Apr 18 17:09:14 2003
@@ -9,7 +9,7 @@
 #include "mathlib.h"
 #include "lh_parser.h"
 
-qboolean
+static qboolean
 LHP_integer(char *text, int *value)
 {
 	int negative;
@@ -32,7 +32,7 @@
 	return true;
 }
 
-qboolean
+static qboolean
 LHP_double(char *text, double *value)
 {
 	int negative, negative2;
@@ -101,7 +101,7 @@
 	return flags;
 }
 
-void
+static void
 LHP_freecodewords(codeword_t *word)
 {
 	codeword_t *next;
Index: twilight/src/base/mathlib.c
diff -u twilight/src/base/mathlib.c:1.25 twilight/src/base/mathlib.c:1.26
--- twilight/src/base/mathlib.c:1.25	Thu Apr 17 23:06:55 2003
+++ twilight/src/base/mathlib.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: mathlib.c,v 1.25 2003/04/18 03:06:55 warp Exp $";
+    "$Id: mathlib.c,v 1.26 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -236,22 +236,6 @@
 	return 0;
 }
 
-float 
-Q_fabs( float f ) 
-{
-	float tmp = f;
-
-	return (tmp < 0) ? -tmp : tmp;
-}
-
-int 
-Q_abs(int x) 
-{
-	int tmp = x;
-
-	return (tmp < 0) ? -tmp : tmp;
-}
-
 ////////////////////////////////////////////////////////////////////////
 // Square root with lookup table (http://www.nvidia.com/developer)
 ////////////////////////////////////////////////////////////////////////
@@ -332,59 +316,7 @@
 	srand ((Uint) time(NULL));
 }
 
-
-void
-ProjectPointOnPlane (vec3_t dst, const vec3_t p, const vec3_t normal)
-{
-	float       d;
-	vec3_t      n;
-	float       inv_denom;
-
-	inv_denom = 1.0F / DotProduct (normal, normal);
-
-	d = DotProduct (normal, p) * inv_denom;
-
-	n[0] = normal[0] * inv_denom;
-	n[1] = normal[1] * inv_denom;
-	n[2] = normal[2] * inv_denom;
-
-	dst[0] = p[0] - d * n[0];
-	dst[1] = p[1] - d * n[1];
-	dst[2] = p[2] - d * n[2];
-}
-
 /*
-** assumes "src" is normalized
-*/
-void
-PerpendicularVector (vec3_t dst, const vec3_t src)
-{
-	int         pos;
-	int         i;
-	float       minelem = 1.0F;
-	vec3_t      tempvec;
-
-	/* 
-	   ** find the smallest magnitude axially aligned vector */
-	for (pos = 0, i = 0; i < 3; i++) {
-		if (fabs (src[i]) < minelem) {
-			pos = i;
-			minelem = fabs (src[i]);
-		}
-	}
-	tempvec[0] = tempvec[1] = tempvec[2] = 0.0F;
-	tempvec[pos] = 1.0F;
-
-	/* 
-	   ** project the point onto the plane defined by src */
-	ProjectPointOnPlane (dst, tempvec, src);
-
-	/* 
-	   ** normalize the result */
-	VectorNormalizeFast (dst);
-}
-
-/*
  * Written by LordHavoc.
  * Like AngleVectors, but taking a forward vector instead of angles.
  * Useful!
@@ -647,53 +579,6 @@
 	return answer;
 }
 
-
-/*
-================
-R_ConcatRotations
-================
-*/
-void
-R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3])
-{
-	out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] +
-		in1[0][2] * in2[2][0];
-	out[0][1] = in1[0][0] * in2[0][1] + in1[0][1] * in2[1][1] +
-		in1[0][2] * in2[2][1];
-	out[0][2] = in1[0][0] * in2[0][2] + in1[0][1] * in2[1][2] +
-		in1[0][2] * in2[2][2];
-	out[1][0] = in1[1][0] * in2[0][0] + in1[1][1] * in2[1][0] +
-		in1[1][2] * in2[2][0];
-	out[1][1] = in1[1][0] * in2[0][1] + in1[1][1] * in2[1][1] +
-		in1[1][2] * in2[2][1];
-	out[1][2] = in1[1][0] * in2[0][2] + in1[1][1] * in2[1][2] +
-		in1[1][2] * in2[2][2];
-	out[2][0] = in1[2][0] * in2[0][0] + in1[2][1] * in2[1][0] +
-		in1[2][2] * in2[2][0];
-	out[2][1] = in1[2][0] * in2[0][1] + in1[2][1] * in2[1][1] +
-		in1[2][2] * in2[2][1];
-	out[2][2] = in1[2][0] * in2[0][2] + in1[2][1] * in2[1][2] +
-		in1[2][2] * in2[2][2];
-}
-
-/*
-=================
-RadiusFromBounds
-=================
-*/
-float
-RadiusFromBounds (vec3_t mins, vec3_t maxs)
-{
-	int         i;
-	vec3_t      corner;
-
-	for (i = 0; i < 3; i++) {
-		corner[i] =
-			fabs (mins[i]) > fabs (maxs[i]) ? fabs (mins[i]) : fabs (maxs[i]);
-	}
-
-	return VectorLength (corner);
-}
 
 void 
 Lerp_Vectors (vec3_t v1, float frac, vec3_t v2, vec3_t v)
Index: twilight/src/base/mdfour.c
diff -u twilight/src/base/mdfour.c:1.2 twilight/src/base/mdfour.c:1.3
--- twilight/src/base/mdfour.c:1.2	Sat Apr  5 04:47:43 2003
+++ twilight/src/base/mdfour.c	Fri Apr 18 17:09:14 2003
@@ -24,7 +24,7 @@
 
 */
 static const char rcsid[] =
-	"$Id: mdfour.c,v 1.2 2003/04/05 09:47:43 knghtbrd Exp $";
+	"$Id: mdfour.c,v 1.3 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -264,11 +264,3 @@
 				((Uint32 *)digest)[2] ^
 				((Uint32 *)digest)[3]);
 }
-
-
-void
-Com_BlockFullChecksum (void *buffer, int len, unsigned char *outbuf)
-{
-	mdfour (outbuf, (unsigned char *) buffer, len);
-}
-
Index: twilight/src/base/mod_brush.c
diff -u twilight/src/base/mod_brush.c:1.2 twilight/src/base/mod_brush.c:1.3
--- twilight/src/base/mod_brush.c:1.2	Sun Apr  6 08:48:30 2003
+++ twilight/src/base/mod_brush.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: mod_brush.c,v 1.2 2003/04/06 12:48:30 warp Exp $";
+    "$Id: mod_brush.c,v 1.3 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -268,7 +268,8 @@
 	}
 }
 
-void Mod_LoadFaces (lump_t *l, model_t *mod)
+static void
+Mod_LoadFaces (lump_t *l, model_t *mod)
 {
 	dface_t		*in;
 	msurface_t	*out;
Index: twilight/src/base/wad.c
diff -u twilight/src/base/wad.c:1.4 twilight/src/base/wad.c:1.5
--- twilight/src/base/wad.c:1.4	Fri Aug  9 15:05:27 2002
+++ twilight/src/base/wad.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: wad.c,v 1.4 2002/08/09 19:05:27 warp Exp $";
+    "$Id: wad.c,v 1.5 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -51,7 +51,7 @@
 Can safely be performed in place.
 ==================
 */
-void
+static void
 W_CleanupName (char *in, char *out)
 {
 	int         i;
@@ -118,7 +118,7 @@
 W_GetLumpinfo
 =============
 */
-lumpinfo_t *
+static lumpinfo_t *
 W_GetLumpinfo (char *name)
 {
 	int         i;
@@ -146,19 +146,6 @@
 		return (void *) (wad_base + lump->filepos);
 
 	return NULL;
-}
-
-void       *
-W_GetLumpNum (int num)
-{
-	lumpinfo_t *lump;
-
-	if (num < 0 || num > wad_numlumps)
-		Sys_Error ("W_GetLumpNum: bad number: %i", num);
-
-	lump = wad_lumps + num;
-
-	return (void *) (wad_base + lump->filepos);
 }
 
 /*
Index: twilight/src/base/zone.c
diff -u twilight/src/base/zone.c:1.25 twilight/src/base/zone.c:1.26
--- twilight/src/base/zone.c:1.25	Sun Nov 17 16:54:58 2002
+++ twilight/src/base/zone.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: zone.c,v 1.25 2002/11/17 21:54:58 rain Exp $";
+    "$Id: zone.c,v 1.26 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -196,7 +196,8 @@
 // used only for hunk
 memzone_t *hunkzone;
 
-void Zone_PrintStats(void)
+static void
+Zone_PrintStats(void)
 {
 	int count = 0, size = 0;
 	memzone_t *zone;
@@ -219,7 +220,8 @@
 	}
 }
 
-void Zone_PrintList(int listallocations)
+static void
+Zone_PrintList(int listallocations)
 {
 	memzone_t *zone;
 	memheader_t *mem;
@@ -239,7 +241,8 @@
 	}
 }
 
-void ZoneList_f(void)
+static void
+ZoneList_f(void)
 {
 	switch(Cmd_Argc())
 	{
@@ -261,7 +264,8 @@
 	}
 }
 
-void ZoneStats_f(void)
+static void
+ZoneStats_f(void)
 {
 	Zone_CheckSentinelsGlobal();
 	Zone_PrintStats();
Index: twilight/src/include/cmd.h
diff -u twilight/src/include/cmd.h:1.4 twilight/src/include/cmd.h:1.5
--- twilight/src/include/cmd.h:1.4	Fri Feb  1 09:39:27 2002
+++ twilight/src/include/cmd.h	Fri Apr 18 17:09:14 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: cmd.h,v 1.4 2002/02/01 14:39:27 lordhavoc Exp $
+	$Id: cmd.h,v 1.5 2003/04/18 21:09:14 warp Exp $
 */
 // cmd.h -- Command buffer and command execution
 
@@ -112,7 +112,6 @@
 char	**Cmd_CompleteAliasBuildList (char *partial);
 int		Cmd_CompleteCountPossible (char *partial);
 char	**Cmd_CompleteBuildList (char *partial);
-char	*Cmd_CompleteAlias (char *partial);
 // More console completion stuff
 
 int         Cmd_Argc (void);
Index: twilight/src/include/common.h
diff -u twilight/src/include/common.h:1.36 twilight/src/include/common.h:1.37
--- twilight/src/include/common.h:1.36	Thu Apr 17 23:08:03 2003
+++ twilight/src/include/common.h	Fri Apr 18 17:09:14 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: common.h,v 1.36 2003/04/18 03:08:03 warp Exp $
+	$Id: common.h,v 1.37 2003/04/18 21:09:14 warp Exp $
 */
 
 #ifndef __COMMON_H
@@ -74,7 +74,6 @@
 
 void SZ_Init (sizebuf_t *buf, Uint8 *data, size_t length);
 void SZ_Clear (sizebuf_t *buf);
-void *SZ_GetSpace (sizebuf_t *buf, size_t length);
 void SZ_Write (sizebuf_t *buf, void *data, size_t length);
 void SZ_Print (sizebuf_t *buf, char *data);	// strcats onto the sizebuf
 
@@ -185,7 +184,6 @@
 char *COM_SkipPath (char *pathname);
 void COM_StripExtension (char *in, char *out);
 void COM_DefaultExtension (char *path, char *extension);
-qboolean COM_CheckFile (char *fname);
 char *COM_FileExtension (char *in);
 
 //============================================================================
@@ -205,7 +203,6 @@
 void COM_CreatePath (char *path);
 void COM_Gamedir (char *dir);
 
-void Com_PrintHex (char *str, int len);
 void Com_Printf (const char *fmt, ...);
 void Com_DPrintf (const char *fmt, ...);
 void Com_DFPrintf (int level, const char *fmt, ...);
Index: twilight/src/include/console.h
diff -u twilight/src/include/console.h:1.2 twilight/src/include/console.h:1.3
--- twilight/src/include/console.h:1.2	Tue Oct 29 01:59:44 2002
+++ twilight/src/include/console.h	Fri Apr 18 17:09:14 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: console.h,v 1.2 2002/10/29 06:59:44 warp Exp $
+	$Id: console.h,v 1.3 2003/04/18 21:09:14 warp Exp $
 */
 //
 // console
@@ -62,7 +62,6 @@
 void	Con_Init (void);
 void	Con_DrawConsole (int lines);
 void	Con_Print (char *txt);
-void	Con_Clear_f (void);
 void	Con_DrawNotify (void);
 void	Con_ClearNotify (void);
 void	Con_ToggleConsole_f (void);
@@ -74,10 +73,6 @@
 // (i.e. will display possible variables, aliases, commands
 // that match what they've typed so far)
 void Con_CompleteCommandLine(void);
-
-// Generic libs/util/console.c function to display a list
-// formatted in columns on the console
-void Con_DisplayList(char **list);
 
 #endif // __CONSOLE_H
 
Index: twilight/src/include/crc.h
diff -u twilight/src/include/crc.h:1.3 twilight/src/include/crc.h:1.4
--- twilight/src/include/crc.h:1.3	Sat Jul  6 20:33:33 2002
+++ twilight/src/include/crc.h	Fri Apr 18 17:09:14 2003
@@ -21,16 +21,13 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: crc.h,v 1.3 2002/07/07 00:33:33 warp Exp $
+	$Id: crc.h,v 1.4 2003/04/18 21:09:14 warp Exp $
 */
 /* crc.h */
 
 #ifndef __CRC_H
 #define __CRC_H
 
-void        CRC_Init (unsigned short *crcvalue);
-void        CRC_ProcessByte (unsigned short *crcvalue, Uint8 data);
-unsigned short CRC_Value (unsigned short crcvalue);
 unsigned short CRC_Block (Uint8 *start, size_t count);
 Uint8       COM_BlockSequenceCRCByte (Uint8 *base, size_t length, int sequence);
 
Index: twilight/src/include/cvar.h
diff -u twilight/src/include/cvar.h:1.11 twilight/src/include/cvar.h:1.12
--- twilight/src/include/cvar.h:1.11	Wed Mar 12 00:39:01 2003
+++ twilight/src/include/cvar.h	Fri Apr 18 17:09:14 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: cvar.h,v 1.11 2003/03/12 05:39:01 warp Exp $
+	$Id: cvar.h,v 1.12 2003/04/18 21:09:14 warp Exp $
 */
 
 #ifndef __CVAR_H
@@ -66,14 +66,11 @@
 				const cvar_callback callback);
 
 void Cvar_Set (cvar_t *var, const char *svalue);
-void Cvar_Set_f (void);
-void Cvar_Reset_f (void);
 
 cvar_t *Cvar_CreateTemp (const char *name, const char *svalue);
 
 void Cvar_Slide (cvar_t *var, const float change);
 
-void Cvar_Show (cvar_t *var);
 qboolean Cvar_LegacyCmd (void);
 
 cvar_t *Cvar_Find (const char *name);
Index: twilight/src/include/host.h
diff -u twilight/src/include/host.h:1.7 twilight/src/include/host.h:1.8
--- twilight/src/include/host.h:1.7	Wed May  1 11:12:17 2002
+++ twilight/src/include/host.h	Fri Apr 18 17:09:14 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: host.h,v 1.7 2002/05/01 15:12:17 knghtbrd Exp $
+	$Id: host.h,v 1.8 2003/04/18 21:09:14 warp Exp $
 */
 // host.h
 
@@ -40,14 +40,12 @@
 										// start of every frame, never reset
 
 void Host_ClearMemory (void);
-void Host_ServerFrame (void);
 void Host_InitCommands (void);
 void Host_Init (void);
 void Host_Shutdown (void);
 void Host_Error (char *error, ...);
 void Host_EndGame (char *message, ...);
 void Host_Frame (double time);
-void Host_Quit_f (void);
 void Host_ClientCommands (char *fmt, ...);
 void Host_ShutdownServer (qboolean crash);
 void Host_WriteConfiguration (char *name);
Index: twilight/src/include/keys.h
diff -u twilight/src/include/keys.h:1.4 twilight/src/include/keys.h:1.5
--- twilight/src/include/keys.h:1.4	Sun Apr  6 17:57:27 2003
+++ twilight/src/include/keys.h	Fri Apr 18 17:09:14 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: keys.h,v 1.4 2003/04/06 21:57:27 rain Exp $
+	$Id: keys.h,v 1.5 2003/04/18 21:09:14 warp Exp $
 */
 
 #ifndef __KEYS_H
@@ -129,9 +129,7 @@
 void Key_Init_Cvars (void);
 void Key_Init (void);
 void Key_WriteBindings (FILE * f);
-void Key_SetBinding (int keynum, int bindmap, char *binding);
 void Key_ClearEditLine (int edit_line);
-void Key_ClearStates (void);
 
 #endif // __KEYS_H
 
Index: twilight/src/include/lh_parser.h
diff -u twilight/src/include/lh_parser.h:1.1 twilight/src/include/lh_parser.h:1.2
--- twilight/src/include/lh_parser.h:1.1	Sat Mar 22 07:50:34 2003
+++ twilight/src/include/lh_parser.h	Fri Apr 18 17:09:14 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: lh_parser.h,v 1.1 2003/03/22 12:50:34 warp Exp $
+	$Id: lh_parser.h,v 1.2 2003/04/18 21:09:14 warp Exp $
 */
 
 #ifndef __LH_PARSER_H
@@ -56,7 +56,6 @@
 
 extern codetree_t *LHP_parse(char *text, char *name, memzone_t *zone);
 extern void LHP_printcodetree_c(int indentlevel, codetree_t *code);
-extern void LHP_freecodewords(codeword_t *word);
 extern void LHP_freecodetree(codetree_t *code);
 
 
Index: twilight/src/include/mathlib.h
diff -u twilight/src/include/mathlib.h:1.36 twilight/src/include/mathlib.h:1.37
--- twilight/src/include/mathlib.h:1.36	Thu Apr 17 23:06:55 2003
+++ twilight/src/include/mathlib.h	Fri Apr 18 17:09:14 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: mathlib.h,v 1.36 2003/04/18 03:06:55 warp Exp $
+	$Id: mathlib.h,v 1.37 2003/04/18 21:09:14 warp Exp $
 */
 
 #ifndef __MATHLIB_H
@@ -92,8 +92,6 @@
 double Q_atan(double x);
 double Q_atan2(double y, double x);
 double Q_tan(double x);
-float Q_fabs(float f);
-int Q_abs(int x);
 float Q_sqrt(double n);
 float Q_RSqrt(double number);
 
@@ -172,9 +170,6 @@
 
 int         Q_log2 (int val);
 
-void        R_ConcatRotations (float in1[3][3], float in2[3][3],
-							   float out[3][3]);
-
 void        AngleVectors (vec3_t angles, vec3_t forward, vec3_t right,
 						  vec3_t up);
 void        AngleVectorsFLU (const vec3_t angles, vec3_t forward, vec3_t left,
@@ -189,8 +184,6 @@
 void        VectorVectors(const vec3_t forward, vec3_t right, vec3_t up);
 void        RotatePointAroundVector (vec3_t dst, const vec3_t dir,
 									const vec3_t point, float degrees);
-
-float		RadiusFromBounds (vec3_t mins, vec3_t maxs);
 
 #define BOX_ON_PLANE_SIDE(emins, emaxs, p)	\
 	(((p)->type < 3)?						\
Index: twilight/src/include/mdfour.h
diff -u twilight/src/include/mdfour.h:1.2 twilight/src/include/mdfour.h:1.3
--- twilight/src/include/mdfour.h:1.2	Sat Apr  5 04:47:42 2003
+++ twilight/src/include/mdfour.h	Fri Apr 18 17:09:14 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: mdfour.h,v 1.2 2003/04/05 09:47:42 knghtbrd Exp $
+	$Id: mdfour.h,v 1.3 2003/04/18 21:09:14 warp Exp $
 */
 //	an implementation of MD4 designed for use in the SMB authentication
 //	protocol
@@ -46,7 +46,6 @@
 void mdfour (unsigned char *out, unsigned char *in, int n);
 
 Uint32 Com_BlockChecksum (void *buffer, int length);
-void Com_BlockFullChecksum (void *buffer, int len, unsigned char *outbuf);	
 
 #endif	// __MDFOUR_H
 
Index: twilight/src/include/pmove.h
diff -u twilight/src/include/pmove.h:1.6 twilight/src/include/pmove.h:1.7
--- twilight/src/include/pmove.h:1.6	Sat Jun  8 00:22:22 2002
+++ twilight/src/include/pmove.h	Fri Apr 18 17:09:14 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: pmove.h,v 1.6 2002/06/08 04:22:22 mercury Exp $
+	$Id: pmove.h,v 1.7 2003/04/18 21:09:14 warp Exp $
 */
 
 #ifndef __PMOVE_H
@@ -101,8 +101,6 @@
 
 void PlayerMove (void);
 void Pmove_Init (void);
-
-int PM_HullPointContents (struct hull_s *hull, int num, vec3_t p);
 
 int PM_PointContents (vec3_t point);
 qboolean PM_TestPlayerPosition (vec3_t point);
Index: twilight/src/include/wad.h
diff -u twilight/src/include/wad.h:1.2 twilight/src/include/wad.h:1.3
--- twilight/src/include/wad.h:1.2	Mon Mar  3 23:51:46 2003
+++ twilight/src/include/wad.h	Fri Apr 18 17:09:14 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: wad.h,v 1.2 2003/03/04 04:51:46 warp Exp $
+	$Id: wad.h,v 1.3 2003/04/18 21:09:14 warp Exp $
 */
 // wad.h
 
@@ -75,10 +75,7 @@
 extern Uint8 *wad_base;
 
 void        W_LoadWadFile (char *filename);
-void        W_CleanupName (char *in, char *out);
-lumpinfo_t *W_GetLumpinfo (char *name);
 void       *W_GetLumpName (char *name);
-void       *W_GetLumpNum (int num);
 
 void        SwapPic (qpic_t *pic);
 
Index: twilight/src/nq/chase.c
diff -u twilight/src/nq/chase.c:1.19 twilight/src/nq/chase.c:1.20
--- twilight/src/nq/chase.c:1.19	Mon Jun  3 08:00:34 2002
+++ twilight/src/nq/chase.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: chase.c,v 1.19 2002/06/03 12:00:34 mercury Exp $";
+    "$Id: chase.c,v 1.20 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -58,12 +58,6 @@
 void
 Chase_Init (void)
 {
-}
-
-void
-Chase_Reset (void)
-{
-	/* FIXME: for respawning and teleporting start position 12 units behind head */
 }
 
 void
Index: twilight/src/nq/cl_demo.c
diff -u twilight/src/nq/cl_demo.c:1.20 twilight/src/nq/cl_demo.c:1.21
--- twilight/src/nq/cl_demo.c:1.20	Sat Mar 22 07:50:34 2003
+++ twilight/src/nq/cl_demo.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: cl_demo.c,v 1.20 2003/03/22 12:50:34 warp Exp $";
+    "$Id: cl_demo.c,v 1.21 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -36,7 +36,7 @@
 #include "strlib.h"
 #include "sys.h"
 
-void CL_FinishTimeDemo (void);
+static void CL_FinishTimeDemo (void);
 
 /*
 ==============================================================================
@@ -83,7 +83,7 @@
 Dumps the current net message, prefixed by the length and view angles
 ====================
 */
-void
+static void
 CL_WriteDemoMessage (void)
 {
 	int		len;
@@ -321,7 +321,7 @@
 
 ====================
 */
-void
+static void
 CL_FinishTimeDemo (void)
 {
 	int		frames;
Index: twilight/src/nq/cl_input.c
diff -u twilight/src/nq/cl_input.c:1.30 twilight/src/nq/cl_input.c:1.31
--- twilight/src/nq/cl_input.c:1.30	Sat Jun  8 04:31:06 2002
+++ twilight/src/nq/cl_input.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: cl_input.c,v 1.30 2002/06/08 08:31:06 eviltypeguy Exp $";
+    "$Id: cl_input.c,v 1.31 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -83,7 +83,7 @@
 int         in_impulse;
 
 
-void
+static void
 KeyDown (kbutton_t *b)
 {
 	int         k;
@@ -113,7 +113,7 @@
 	b->state |= 1 + 2;					// down + impulse down
 }
 
-void
+static void
 KeyUp (kbutton_t *b)
 {
 	int         k;
@@ -146,25 +146,25 @@
 	b->state |= 4;						// impulse up
 }
 
-void
+static void
 IN_KLookDown (void)
 {
 	KeyDown (&in_klook);
 }
 
-void
+static void
 IN_KLookUp (void)
 {
 	KeyUp (&in_klook);
 }
 
-void
+static void
 IN_MLookDown (void)
 {
 	KeyDown (&in_mlook);
 }
 
-void
+static void
 IN_MLookUp (void)
 {
 	KeyUp (&in_mlook);
@@ -172,187 +172,187 @@
 		V_StartPitchDrift ();
 }
 
-void
+static void
 IN_UpDown (void)
 {
 	KeyDown (&in_up);
 }
 
-void
+static void
 IN_UpUp (void)
 {
 	KeyUp (&in_up);
 }
 
-void
+static void
 IN_DownDown (void)
 {
 	KeyDown (&in_down);
 }
 
-void
+static void
 IN_DownUp (void)
 {
 	KeyUp (&in_down);
 }
 
-void
+static void
 IN_LeftDown (void)
 {
 	KeyDown (&in_left);
 }
 
-void
+static void
 IN_LeftUp (void)
 {
 	KeyUp (&in_left);
 }
 
-void
+static void
 IN_RightDown (void)
 {
 	KeyDown (&in_right);
 }
 
-void
+static void
 IN_RightUp (void)
 {
 	KeyUp (&in_right);
 }
 
-void
+static void
 IN_ForwardDown (void)
 {
 	KeyDown (&in_forward);
 }
 
-void
+static void
 IN_ForwardUp (void)
 {
 	KeyUp (&in_forward);
 }
 
-void
+static void
 IN_BackDown (void)
 {
 	KeyDown (&in_back);
 }
 
-void
+static void
 IN_BackUp (void)
 {
 	KeyUp (&in_back);
 }
 
-void
+static void
 IN_LookupDown (void)
 {
 	KeyDown (&in_lookup);
 }
 
-void
+static void
 IN_LookupUp (void)
 {
 	KeyUp (&in_lookup);
 }
 
-void
+static void
 IN_LookdownDown (void)
 {
 	KeyDown (&in_lookdown);
 }
 
-void
+static void
 IN_LookdownUp (void)
 {
 	KeyUp (&in_lookdown);
 }
 
-void
+static void
 IN_MoveleftDown (void)
 {
 	KeyDown (&in_moveleft);
 }
 
-void
+static void
 IN_MoveleftUp (void)
 {
 	KeyUp (&in_moveleft);
 }
 
-void
+static void
 IN_MoverightDown (void)
 {
 	KeyDown (&in_moveright);
 }
 
-void
+static void
 IN_MoverightUp (void)
 {
 	KeyUp (&in_moveright);
 }
 
-void
+static void
 IN_SpeedDown (void)
 {
 	KeyDown (&in_speed);
 }
 
-void
+static void
 IN_SpeedUp (void)
 {
 	KeyUp (&in_speed);
 }
 
-void
+static void
 IN_StrafeDown (void)
 {
 	KeyDown (&in_strafe);
 }
 
-void
+static void
 IN_StrafeUp (void)
 {
 	KeyUp (&in_strafe);
 }
 
-void
+static void
 IN_AttackDown (void)
 {
 	KeyDown (&in_attack);
 }
 
-void
+static void
 IN_AttackUp (void)
 {
 	KeyUp (&in_attack);
 }
 
-void
+static void
 IN_UseDown (void)
 {
 	KeyDown (&in_use);
 }
 
-void
+static void
 IN_UseUp (void)
 {
 	KeyUp (&in_use);
 }
 
-void
+static void
 IN_JumpDown (void)
 {
 	KeyDown (&in_jump);
 }
 
-void
+static void
 IN_JumpUp (void)
 {
 	KeyUp (&in_jump);
 }
 
-void
+static void
 IN_Impulse (void)
 {
 	in_impulse = Q_atoi (Cmd_Argv (1));
@@ -374,7 +374,7 @@
 1.0 if held for the entire time
 ===============
 */
-float
+static float
 CL_KeyState (kbutton_t *key)
 {
 	float       val;
@@ -440,7 +440,7 @@
 Moves the local angle positions
 ================
 */
-void
+static void
 CL_AdjustAngles (void)
 {
 	float       speed;
Index: twilight/src/nq/cl_main.c
diff -u twilight/src/nq/cl_main.c:1.77 twilight/src/nq/cl_main.c:1.78
--- twilight/src/nq/cl_main.c:1.77	Sat Mar 22 07:50:34 2003
+++ twilight/src/nq/cl_main.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: cl_main.c,v 1.77 2003/03/22 12:50:34 warp Exp $";
+    "$Id: cl_main.c,v 1.78 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -269,7 +269,7 @@
 CL_PrintEntities_f
 ==============
 */
-void
+static void
 CL_PrintEntities_f (void)
 {
 	entity_t   *ent;
@@ -333,7 +333,7 @@
 CL_NewDlight
 ===============
 */
-void
+static void
 CL_NewDlight (int key, vec3_t org, int effects)
 {
 	dlight_t   *dl = CL_AllocDlight (key);
@@ -398,7 +398,7 @@
 should be put at.
 ===============
 */
-float
+static float
 CL_LerpPoint (void)
 {
 	float       f, frac;
@@ -706,6 +706,7 @@
 
 	CL_Input_Init_Cvars ();
 	CL_TEnts_Init_Cvars ();
+	Team_Init_Cvars ();
 }
 
 /*
Index: twilight/src/nq/cl_parse.c
diff -u twilight/src/nq/cl_parse.c:1.60 twilight/src/nq/cl_parse.c:1.61
--- twilight/src/nq/cl_parse.c:1.60	Thu Apr 17 23:19:30 2003
+++ twilight/src/nq/cl_parse.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: cl_parse.c,v 1.60 2003/04/18 03:19:30 warp Exp $";
+    "$Id: cl_parse.c,v 1.61 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -103,7 +103,7 @@
 This error checks and tracks the total number of entities
 ===============
 */
-entity_t   *
+static entity_t   *
 CL_EntityNum (int num)
 {
 	if (num >= cl.num_entities) {
@@ -121,7 +121,7 @@
 CL_ParseStartSoundPacket
 ==================
 */
-void
+static void
 CL_ParseStartSoundPacket (void)
 {
 	vec3_t      pos;
@@ -168,7 +168,7 @@
 so the server doesn't disconnect.
 ==================
 */
-void
+static void
 CL_KeepaliveMessage (void)
 {
 	float       time;
@@ -227,7 +227,7 @@
 CL_ParseServerInfo
 ==================
 */
-void
+static void
 CL_ParseServerInfo (void)
 {
 	char       *str;
@@ -324,13 +324,10 @@
 		CL_KeepaliveMessage ();
 	}
 
-	S_BeginPrecaching ();
-
 	for (i = 1; i < numsounds; i++) {
 		cl.sound_precache[i] = S_PrecacheSound (sound_precache[i]);
 		CL_KeepaliveMessage ();
 	}
-	S_EndPrecaching ();
 
 
 // local state
@@ -354,7 +351,7 @@
 relinked.  Other attributes can change without relinking.
 ==================
 */
-void
+static void
 CL_ParseUpdate (int bits)
 {
 	int         i;
@@ -479,7 +476,7 @@
 CL_ParseBaseline
 ==================
 */
-void
+static void
 CL_ParseBaseline (entity_t *ent)
 {
 	int         i;
@@ -502,7 +499,7 @@
 Server information pertaining to this client only
 ==================
 */
-void
+static void
 CL_ParseClientdata (int bits)
 {
 	int			i, j;
@@ -585,7 +582,7 @@
 CL_NewTranslation
 =====================
 */
-void
+static void
 CL_NewTranslation (int slot)
 {
 	Uint8	color;
@@ -606,7 +603,7 @@
 CL_ParseStatic
 =====================
 */
-void
+static void
 CL_ParseStatic (void)
 {
 	entity_t   *ent;
@@ -637,7 +634,7 @@
 CL_ParseStaticSound
 ===================
 */
-void
+static void
 CL_ParseStaticSound (void)
 {
 	vec3_t      org;
Index: twilight/src/nq/cl_tent.c
diff -u twilight/src/nq/cl_tent.c:1.37 twilight/src/nq/cl_tent.c:1.38
--- twilight/src/nq/cl_tent.c:1.37	Wed Jan 29 15:00:41 2003
+++ twilight/src/nq/cl_tent.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: cl_tent.c,v 1.37 2003/01/29 20:00:41 warp Exp $";
+    "$Id: cl_tent.c,v 1.38 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -79,7 +79,7 @@
 CL_ParseBeam
 =================
 */
-void
+static void
 CL_ParseBeam (model_t *m, qboolean lightning)
 {
 	int         ent;
@@ -328,7 +328,7 @@
 CL_NewTempEntity
 =================
 */
-entity_t   *
+static entity_t   *
 CL_NewTempEntity (void)
 {
 	entity_t   *ent;
Index: twilight/src/nq/client.h
diff -u twilight/src/nq/client.h:1.45 twilight/src/nq/client.h:1.46
--- twilight/src/nq/client.h:1.45	Sun Mar  2 06:58:32 2003
+++ twilight/src/nq/client.h	Fri Apr 18 17:09:14 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: client.h,v 1.45 2003/03/02 11:58:32 warp Exp $
+	$Id: client.h,v 1.46 2003/04/18 21:09:14 warp Exp $
 */
 
 #ifndef __CLIENT_H
@@ -328,9 +328,6 @@
 void	CL_BaseMove (usercmd_t *cmd);
 
 
-float	CL_KeyState (kbutton_t *key);
-char	*Key_KeynumToString (int keynum);
-
 //
 // cl_demo.c
 //
@@ -346,7 +343,6 @@
 // cl_parse.c
 //
 void	CL_ParseServerMessage (void);
-void	CL_NewTranslation (int slot);
 void	CL_ParseEntityLump (char *entdata);
 
 //
Index: twilight/src/nq/common.c
diff -u twilight/src/nq/common.c:1.80 twilight/src/nq/common.c:1.81
--- twilight/src/nq/common.c:1.80	Sat Mar 22 07:50:34 2003
+++ twilight/src/nq/common.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-	"$Id: common.c,v 1.80 2003/03/22 12:50:34 warp Exp $";
+	"$Id: common.c,v 1.81 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -56,8 +56,9 @@
 cvar_t *game_name;
 
 // prototypes used later in the file
-void COM_InitFilesystem (void);
-void COM_Path_f (void);
+static void COM_InitFilesystem (void);
+static void COM_Path_f (void);
+static void *SZ_GetSpace (sizebuf_t *buf, size_t length);
 
 
 /*
@@ -484,18 +485,6 @@
 
 #define	MAXPRINTMSG	4096
 
-void (*rd_print) (char *) = NULL;
-
-void Com_BeginRedirect (void (*RedirectedPrint) (char *))
-{
-	rd_print = RedirectedPrint;
-}
-
-void Com_EndRedirect (void)
-{
-	rd_print = NULL;
-}
-
 void Com_Printf (const char *fmt, ...)
 {
 	va_list     argptr;
@@ -506,11 +495,6 @@
 	vsnprintf (msg, sizeof (msg), fmt, argptr);
 	va_end (argptr);
 
-	if ( rd_print ) {
-		rd_print ( msg );
-		return;
-	}
-
 // also echo to debugging console
 	Sys_Printf ("%s", msg);				// also echo to debugging console
 
@@ -585,7 +569,7 @@
 	buf->overflowed = false;
 }
 
-void       *
+static void       *
 SZ_GetSpace (sizebuf_t *buf, size_t length)
 {
 	void       *data;
@@ -793,7 +777,7 @@
 
 ================
 */
-qboolean
+static qboolean
 COM_CheckFile (char *fname)
 {
 	FILE *h;
@@ -816,7 +800,7 @@
 Sets the "registered" cvar.
 ================
 */
-void
+static void
 COM_CheckRegistered (void)
 {
 	if (!COM_CheckFile ("gfx/pop.lmp"))
@@ -955,7 +939,7 @@
 	return end;
 }
 
-int
+static int
 COM_FileOpenRead (char *path, FILE ** hndl)
 {
 	FILE	   *f;
@@ -993,94 +977,7 @@
 	}
 }
 
-/*
-============
-COM_WriteFile
 
-The filename will be prefixed by the current game directory
-============
-*/
-void
-COM_WriteFile (char *filename, void *data, int len)
-{
-	FILE       *f;
-	char        name[MAX_OSPATH];
-
-	snprintf (name, sizeof (name), "%s/%s", com_gamedir, filename);
-
-	f = fopen (name, "wb");
-	if (!f) {
-		Sys_mkdir (com_gamedir);
-		f = fopen (name, "wb");
-		if (!f)
-			Sys_Error ("Error opening %s", filename);
-	}
-
-	Sys_Printf ("COM_WriteFile: %s\n", name);
-	fwrite (data, 1, len, f);
-	fclose (f);
-}
-
-
-/*
-============
-COM_CreatePath
-
-Only used for CopyFile
-============
-*/
-void
-COM_CreatePath (char *path)
-{
-	char       *ofs;
-
-	for (ofs = path + 1; *ofs; ofs++) {
-		if (*ofs == '/') {				// create the directory
-			*ofs = 0;
-			Sys_mkdir (path);
-			*ofs = '/';
-		}
-	}
-}
-
-
-/*
-===========
-COM_CopyFile
-
-Copies a file over from the net to the local cache, creating any directories
-needed.  This is for the convenience of developers using ISDN from home.
-===========
-*/
-void
-COM_CopyFile (char *netpath, char *cachepath)
-{
-	FILE		*in, *out;
-	Uint32		remaining, count;
-	char		buf[4096];
-
-	remaining = COM_FileOpenRead (netpath, &in);
-	// create directories up to the cache file
-	COM_CreatePath (cachepath);
-	out = fopen (cachepath, "wb");
-	if (!out)
-		Sys_Error ("Error opening %s", cachepath);
-
-	while (remaining) {
-		if (remaining < sizeof (buf))
-			count = remaining;
-		else
-			count = sizeof (buf);
-		fread (buf, 1, count, in);
-		fwrite (buf, 1, count, out);
-		remaining -= count;
-	}
-
-	fclose (in);
-	fclose (out);
-}
-
-
 int         file_from_pak;				// global indicating file came from
 										// pack file ZOID
 
@@ -1241,7 +1138,7 @@
 of the list so they override previous pack files.
 =================
 */
-pack_t     *
+static pack_t     *
 COM_LoadPackFile (char *packfile)
 {
 	dpackheader_t header;
@@ -1298,7 +1195,7 @@
 then loads and adds pak1.pak pak2.pak ...
 ================
 */
-void
+static void
 COM_AddDirectory (char *dir)
 {
 	int         i;
@@ -1340,7 +1237,7 @@
 Wrapper for COM_AddDirectory
 ================
 */
-void
+static void
 COM_AddGameDirectory (char *dir)
 {
 	char		buf[1024];
@@ -1362,7 +1259,7 @@
 COM_InitFilesystem
 ================
 */
-void
+static void
 COM_InitFilesystem (void)
 {
 	Uint         i;
Index: twilight/src/nq/console.c
diff -u twilight/src/nq/console.c:1.57 twilight/src/nq/console.c:1.58
--- twilight/src/nq/console.c:1.57	Tue Mar  4 02:29:51 2003
+++ twilight/src/nq/console.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: console.c,v 1.57 2003/03/04 07:29:51 warp Exp $";
+    "$Id: console.c,v 1.58 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -98,7 +98,7 @@
 Con_Clear_f
 ================
 */
-void
+static void
 Con_Clear_f (void)
 {
 	int i;
@@ -130,7 +130,7 @@
 Con_MessageMode_f
 ================
 */
-void
+static void
 Con_MessageMode_f (void)
 {
 	chat_team = false;
@@ -142,7 +142,7 @@
 Con_MessageMode2_f
 ================
 */
-void
+static void
 Con_MessageMode2_f (void)
 {
 	chat_team = true;
@@ -155,7 +155,7 @@
 
 ================
 */
-void
+static void
 Con_Resize (console_t *con)
 {
 	int			width;
@@ -322,7 +322,7 @@
 The input line scrolls horizontally if typing goes beyond the right edge
 ================
 */
-void
+static void
 Con_DrawInput (void)
 {
 	char		*text;
@@ -498,7 +498,7 @@
 	MEGA Thanks to Taniwha
 
 */
-void
+static void
 Con_DisplayList(char **list)
 {
 	int			i = 0;
Index: twilight/src/nq/gl_rlight.c
diff -u twilight/src/nq/gl_rlight.c:1.69 twilight/src/nq/gl_rlight.c:1.70
--- twilight/src/nq/gl_rlight.c:1.69	Mon Mar  3 23:51:47 2003
+++ twilight/src/nq/gl_rlight.c	Fri Apr 18 17:09:14 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: gl_rlight.c,v 1.69 2003/03/04 04:51:47 warp Exp $";
+    "$Id: gl_rlight.c,v 1.70 2003/04/18 21:09:14 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -216,21 +216,6 @@
 =============================================================================
 */
 
-void
-AddLightBlend (vec3_t v, float a2)
-{
-	float       a;
-
-	v_blend[3] = a = v_blend[3] + a2 * (1 - v_blend[3]);
-
-	a2 = a2 / a;
-	a = 1 - a2;
-
-	v_blend[0] = v_blend[0] * a + v[0] * a2;
-	v_blend[1] = v_blend[1] * a + v[1] * a2;
-	v_blend[2] = v_blend[2] * a + v[2] * a2;
-}
-
 float       bubble_sintable[17], bubble_costable[17];
 
 void
@@ -523,7 +508,7 @@
 mplane_t   *lightplane;
 vec3_t      lightspot;
 
-int
+static int
 RecursiveLightPoint (vec3_t color, mnode_t *node, vec3_t start,
 		vec3_t end)
 {
Index: twilight/src/nq/gl_rmain.c
diff -u twilight/src/nq/gl_rmain.c:1.139 twilight/src/nq/gl_rmain.c:1.140
--- twilight/src/nq/gl_rmain.c:1.139	Thu Apr 17 23:19:30 2003
+++ twilight/src/nq/gl_rmain.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-	"$Id: gl_rmain.c,v 1.139 2003/04/18 03:19:30 warp Exp $";
+	"$Id: gl_rmain.c,v 1.140 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -482,7 +482,7 @@
 Called by R_RenderView, possibily repeatedly.
 ================
 */
-void
+static void
 R_Render3DView (void)
 {
 	R_VisBrushModels ();
@@ -607,7 +607,7 @@
 R_InitTextures
 ==================
 */
-void
+static void
 R_InitTextures (void)
 {
 	int			x, y;
@@ -659,7 +659,7 @@
 R_WireframeChanged
 ===============
 */
-void
+static void
 R_WireframeChanged (cvar_t *cvar)
 {
 	if (cl.maxclients > 1) {
Index: twilight/src/nq/gl_rsurf.c
diff -u twilight/src/nq/gl_rsurf.c:1.113 twilight/src/nq/gl_rsurf.c:1.114
--- twilight/src/nq/gl_rsurf.c:1.113	Thu Apr 17 23:19:30 2003
+++ twilight/src/nq/gl_rsurf.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: gl_rsurf.c,v 1.113 2003/04/18 03:19:30 warp Exp $";
+    "$Id: gl_rsurf.c,v 1.114 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -173,7 +173,7 @@
 	return lit;
 }
 
-inline qboolean
+static inline qboolean
 R_StainBlendTexel (Sint64 k, int *icolor, Uint8 *bl)
 {
 	int			ratio, a;
@@ -203,7 +203,7 @@
 R_StainNode
 ===============
 */
-void
+static void
 R_StainNode (mnode_t *node, model_t *model, vec3_t origin, float radius,
 		int icolor[8])
 {
Index: twilight/src/nq/gl_screen.c
diff -u twilight/src/nq/gl_screen.c:1.60 twilight/src/nq/gl_screen.c:1.61
--- twilight/src/nq/gl_screen.c:1.60	Sun Apr  6 17:57:27 2003
+++ twilight/src/nq/gl_screen.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: gl_screen.c,v 1.60 2003/04/06 21:57:27 rain Exp $";
+    "$Id: gl_screen.c,v 1.61 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -129,12 +129,12 @@
 qboolean	scr_drawloading;
 float		scr_disabled_time;
 
-void		SCR_ScreenShot_f (void);
-
 Uint8	   *avibuffer;
 Uint32		aviframeno;
 
-void
+static void SCR_ScreenShot_f (void);
+
+static void
 GL_BrightenScreen(void)
 {
 	float		f;
@@ -206,8 +206,6 @@
 
 /*
 ==============
-SCR_CenterPrint
-
 Called for important messages that should stay in the center of the screen
 for a few moments
 ==============
@@ -267,7 +265,7 @@
 }
 
 
-void
+static void
 SCR_DrawCenterString (void)
 {
 	char	   *start;
@@ -310,7 +308,7 @@
 	}
 }
 
-void
+static void
 SCR_CheckDrawCenterString (void)
 {
 	if (scr_center_lines > scr_erase_lines)
@@ -339,12 +337,6 @@
 	return Q_atan (height / (width / Q_tan (fov_x/360*M_PI))) * 360 / M_PI;
 }
 
-/*
-=================
-SCR_CalcRefdef
-
-=================
-*/
 static void
 SCR_CalcRefdef (void)
 {
@@ -375,12 +367,10 @@
 
 /*
 =================
-SCR_SizeUp_f
-
 Keybinding command
 =================
 */
-void
+static void
 SCR_SizeUp_f (void)
 {
 	Cvar_Slide (scr_viewsize, 10);
@@ -389,12 +379,10 @@
 
 /*
 =================
-SCR_SizeDown_f
-
 Keybinding command
 =================
 */
-void
+static void
 SCR_SizeDown_f (void)
 {
 	Cvar_Slide (scr_viewsize, -10);
@@ -421,6 +409,18 @@
 		Cvar_Set (cvar, "170");
 }
 
+static void
+AvidemoChanged(cvar_t *cvar)
+{
+	if (cvar->ivalue)
+		avibuffer = Zone_Alloc(tempzone, vid.width * vid.height * 3);
+	else {
+		if (avibuffer)
+			Zone_Free(avibuffer);
+		aviframeno = 0;
+	}
+}
+
 void
 SCR_Init_Cvars (void)
 {
@@ -439,11 +439,6 @@
 }
 
 
-/*
-==================
-SCR_Init
-==================
-*/
 void
 SCR_Init (void)
 {
@@ -464,12 +459,7 @@
 
 
 
-/*
-==============
-SCR_DrawTurtle
-==============
-*/
-void
+static void
 SCR_DrawTurtle (void)
 {
 	static int		count;
@@ -489,12 +479,7 @@
 	Draw_Pic (0, 0, scr_turtle);
 }
 
-/*
-==============
-SCR_DrawNet
-==============
-*/
-void
+static void
 SCR_DrawNet (void)
 {
 	if (host_realtime - cl.last_received_message < 0.3)
@@ -505,7 +490,7 @@
 	Draw_Pic (64, 0, scr_net);
 }
 
-void
+static void
 SCR_DrawFPS (void)
 {
 	extern cvar_t	   *show_fps;
@@ -540,7 +525,7 @@
 DrawPause
 ==============
 */
-void
+static void
 SCR_DrawPause (void)
 {
 	qpic_t	   *pic;
@@ -557,12 +542,7 @@
 }
 
 
-/*
-==============
-SCR_DrawLoading
-==============
-*/
-void
+static void
 SCR_DrawLoading (void)
 {
 	qpic_t	   *pic;
@@ -580,12 +560,7 @@
 /* ========================================================================= */
 
 
-/*
-==================
-SCR_SetUpToDrawConsole
-==================
-*/
-void
+static void
 SCR_SetUpToDrawConsole (void)
 {
 	Con_CheckResize ();
@@ -616,12 +591,7 @@
 	}
 }
 
-/*
-==================
-SCR_DrawConsole
-==================
-*/
-void
+static void
 SCR_DrawConsole (void)
 {
 	if (scr_con_current) {
@@ -642,12 +612,7 @@
 ==============================================================================
 */
 
-/*
-==================
-SCR_ScreenShot_f
-==================
-*/
-void
+static void
 SCR_ScreenShot_f (void)
 {
 	Uint8		*buffer;
@@ -680,7 +645,7 @@
 	Zone_Free (buffer);
 }
 
-void
+static void
 SCR_CaptureAviDemo (void)
 {
 	double			t;
@@ -706,23 +671,6 @@
 	}
 }
 
-void AvidemoChanged(cvar_t *cvar)
-{
-	if (cvar->ivalue)
-		avibuffer = Zone_Alloc(tempzone, vid.width * vid.height * 3);
-	else {
-		if (avibuffer)
-			Zone_Free(avibuffer);
-		aviframeno = 0;
-	}
-}
-
-/*
-===============
-SCR_BeginLoadingPlaque
-
-================
-*/
 void
 SCR_BeginLoadingPlaque (void)
 {
@@ -746,12 +694,6 @@
 	scr_disabled_time = host_realtime;
 }
 
-/*
-===============
-SCR_EndLoadingPlaque
-
-================
-*/
 void
 SCR_EndLoadingPlaque (void)
 {
@@ -764,7 +706,7 @@
 char       *scr_notifystring;
 qboolean    scr_drawdialog;
 
-void
+static void
 SCR_DrawNotifyString (void)
 {
 	char	   *start;
@@ -797,8 +739,6 @@
 
 /*
 ==================
-SCR_UpdateScreen
-
 This is called every frame, and can also be called explicitly to flush
 text to the screen.
 
Index: twilight/src/nq/host.c
diff -u twilight/src/nq/host.c:1.74 twilight/src/nq/host.c:1.75
--- twilight/src/nq/host.c:1.74	Thu Apr 17 23:01:08 2003
+++ twilight/src/nq/host.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: host.c,v 1.74 2003/04/18 03:01:08 warp Exp $";
+    "$Id: host.c,v 1.75 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -182,7 +182,7 @@
 Host_FindMaxClients
 ================
 */
-void
+static void
 Host_FindMaxClients (void)
 {
 	Uint         i;
@@ -231,7 +231,7 @@
 Host_InitLocal_Cvars
 ======================
 */
-void
+static void
 Host_InitLocal_Cvars (void)
 {
 	// set for slow motion
@@ -268,7 +268,7 @@
 Host_InitLocal
 ======================
 */
-void
+static void
 Host_InitLocal (void)
 {
 	Host_InitCommands ();
@@ -543,7 +543,7 @@
 Returns false if the time is too short to run a frame
 ===================
 */
-qboolean
+static qboolean
 Host_FilterTime (float time)
 {
 	float		fps;
@@ -590,7 +590,7 @@
 Add them exactly as if they had been typed at the console
 ===================
 */
-void
+static void
 Host_GetConsoleCommands (void)
 {
 	char       *cmd;
@@ -610,7 +610,7 @@
 
 ==================
 */
-void
+static void
 Host_ServerFrame (void)
 {
 // run the world state  
@@ -643,7 +643,7 @@
 Runs all active servers
 ==================
 */
-void
+static void
 _Host_Frame (double time)
 {
 	static double time1 = 0;
Index: twilight/src/nq/host_cmd.c
diff -u twilight/src/nq/host_cmd.c:1.43 twilight/src/nq/host_cmd.c:1.44
--- twilight/src/nq/host_cmd.c:1.43	Sat Mar 22 07:50:34 2003
+++ twilight/src/nq/host_cmd.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: host_cmd.c,v 1.43 2003/03/22 12:50:34 warp Exp $";
+    "$Id: host_cmd.c,v 1.44 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -54,7 +54,7 @@
 
 extern void M_Menu_Quit_f (void);
 
-void
+static void
 Host_Quit_f (void)
 {
 	/*
@@ -75,7 +75,7 @@
 Host_Status_f
 ==================
 */
-void
+static void
 Host_Status_f (void)
 {
 	client_t	*client;
@@ -123,7 +123,7 @@
 Sets client to godmode
 ==================
 */
-void
+static void
 Host_God_f (void)
 {
 	if (cmd_source == src_command) {
@@ -141,7 +141,7 @@
 		SV_ClientPrintf ("godmode ON\n");
 }
 
-void
+static void
 Host_Notarget_f (void)
 {
 	if (cmd_source == src_command) {
@@ -161,7 +161,7 @@
 
 qboolean    noclip_anglehack;
 
-void
+static void
 Host_Noclip_f (void)
 {
 	if (cmd_source == src_command) {
@@ -190,7 +190,7 @@
 Sets client to flymode
 ==================
 */
-void
+static void
 Host_Fly_f (void)
 {
 	if (cmd_source == src_command) {
@@ -217,7 +217,7 @@
 
 ==================
 */
-void
+static void
 Host_Ping_f (void)
 {
 	Uint32		i, j;
@@ -259,7 +259,7 @@
 command from the console.  Active clients are kicked off.
 ======================
 */
-void
+static void
 Host_Map_f (void)
 {
 	int         i;
@@ -313,7 +313,7 @@
 Goes to a new map, taking all clients along
 ==================
 */
-void
+static void
 Host_Changelevel_f (void)
 {
 	char        level[MAX_QPATH];
@@ -338,7 +338,7 @@
 Restarts the current server for a dead player
 ==================
 */
-void
+static void
 Host_Restart_f (void)
 {
 	char        mapname[MAX_QPATH];
@@ -363,7 +363,7 @@
 This is sent just before a server changes levels
 ==================
 */
-void
+static void
 Host_Reconnect_f (void)
 {
 	SCR_BeginLoadingPlaque ();
@@ -377,7 +377,7 @@
 User command to connect to server
 =====================
 */
-void
+static void
 Host_Connect_f (void)
 {
 	char        name[MAX_QPATH];
@@ -410,7 +410,7 @@
 Writes a SAVEGAME_COMMENT_LENGTH character comment describing the current 
 ===============
 */
-void
+static void
 Host_SavegameComment (char *text)
 {
 	int         i;
@@ -435,7 +435,7 @@
 Host_Savegame_f
 ===============
 */
-void
+static void
 Host_Savegame_f (void)
 {
 	FILE		*f;
@@ -529,7 +529,7 @@
 Host_Loadgame_f
 ===============
 */
-void
+static void
 Host_Loadgame_f (void)
 {
 	char        name[MAX_OSPATH], mapname[MAX_QPATH], str[32768], *start;
@@ -675,7 +675,7 @@
 Host_Name_f
 ======================
 */
-void
+static void
 Host_Name_f (void)
 {
 	char newName[16];
@@ -711,7 +711,7 @@
 	MSG_WriteString (&sv.reliable_datagram, host_client->name);
 }
 
-void
+static void
 Host_Version_f (void)
 {
 	Com_Printf ("Version %s\n", VERSION);
@@ -719,7 +719,7 @@
 	Com_Printf ("Exe: " __TIME__ " " __DATE__ "\n");
 }
 
-void
+static void
 Host_Say (qboolean teamonly)
 {
 	client_t	*client;
@@ -779,21 +779,21 @@
 }
 
 
-void
+static void
 Host_Say_f (void)
 {
 	Host_Say (false);
 }
 
 
-void
+static void
 Host_Say_Team_f (void)
 {
 	Host_Say (true);
 }
 
 
-void
+static void
 Host_Tell_f (void)
 {
 	client_t	*client, *save;
@@ -846,7 +846,7 @@
 Host_Color_f
 ==================
 */
-void
+static void
 Host_Color_f (void)
 {
 	int         top, bottom;
@@ -897,7 +897,7 @@
 Host_Kill_f
 ==================
 */
-void
+static void
 Host_Kill_f (void)
 {
 	if (cmd_source == src_command) {
@@ -915,7 +915,8 @@
 	PR_ExecuteProgram (pr_global_struct->ClientKill, "QC function ClientKill is missing.");
 }
 
-void Host_WriteConfig_f (void)
+static void
+Host_WriteConfig_f (void)
 {
 	if (Cmd_Argc () != 2) {
 		Com_Printf ("writeconfig <filename> : dump configuration to file\n");
@@ -930,7 +931,7 @@
 Host_Pause_f
 ==================
 */
-void
+static void
 Host_Pause_f (void)
 {
 
@@ -965,7 +966,7 @@
 Host_PreSpawn_f
 ==================
 */
-void
+static void
 Host_PreSpawn_f (void)
 {
 	if (cmd_source == src_command) {
@@ -989,7 +990,7 @@
 Host_Spawn_f
 ==================
 */
-void
+static void
 Host_Spawn_f (void)
 {
 	Uint32		i;
@@ -1107,7 +1108,7 @@
 Host_Begin_f
 ==================
 */
-void
+static void
 Host_Begin_f (void)
 {
 	if (cmd_source == src_command) {
@@ -1128,7 +1129,7 @@
 Kicks a user off of the server
 ==================
 */
-void
+static void
 Host_Kick_f (void)
 {
 	char       *who;
@@ -1212,7 +1213,7 @@
 Host_Give_f
 ==================
 */
-void
+static void
 Host_Give_f (void)
 {
 	char		*t;
@@ -1383,21 +1384,6 @@
 	}
 }
 
-
-void
-PrintFrameName (model_t *m, int frame)
-{
-	aliashdr_t *hdr;
-	maliasframedesc_t *pframedesc;
-
-	hdr = m->alias;
-	if (!hdr)
-		return;
-	pframedesc = &hdr->frames[frame];
-
-	Com_Printf ("frame %i: %s\n", frame, pframedesc->name);
-}
-
 /*
 ===============================================================================
 
@@ -1412,7 +1398,7 @@
 Host_Startdemos_f
 ==================
 */
-void
+static void
 Host_Startdemos_f (void)
 {
 	int         i, c;
@@ -1448,7 +1434,7 @@
 Return to looping demos
 ==================
 */
-void
+static void
 Host_Demos_f (void)
 {
 	if (cls.state == ca_dedicated)
@@ -1466,7 +1452,7 @@
 Return to looping demos
 ==================
 */
-void
+static void
 Host_Stopdemo_f (void)
 {
 	if (cls.state == ca_dedicated)
Index: twilight/src/nq/keys.c
diff -u twilight/src/nq/keys.c:1.36 twilight/src/nq/keys.c:1.37
--- twilight/src/nq/keys.c:1.36	Sun Nov 17 20:39:51 2002
+++ twilight/src/nq/keys.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: keys.c,v 1.36 2002/11/18 01:39:51 rain Exp $";
+    "$Id: keys.c,v 1.37 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -171,7 +171,7 @@
 ==============================================================================
 */
 
-qboolean
+static qboolean
 CheckForCommand (void)
 {
 	char        command[128];
@@ -205,12 +205,10 @@
 
 /*
 ====================
-Key_Console
-
 Interactive line editing and console scrollback
 ====================
 */
-void
+static void
 Key_Console (int key)
 {
 	if (key == K_ENTER)
@@ -387,7 +385,7 @@
 char		chat_buffer[MAX_INPUTLINE];
 Uint32		chat_bufferlen = 0;
 
-void
+static void
 Key_Message (int key)
 {
 
@@ -435,14 +433,12 @@
 
 /*
 ===================
-Key_StringToKeynum
-
 Returns a key number to be used to index keybindings[] by looking at
 the given string.  Single ascii characters return themselves, while
 the K_* names are matched up.
 ===================
 */
-int
+static int
 Key_StringToKeynum (char *str)
 {
 	keyname_t  *kn;
@@ -461,14 +457,12 @@
 
 /*
 ===================
-Key_KeynumToString
-
 Returns a string (either a single ascii char, or a K_* name) for the
 given keynum.
 FIXME: handle quote special (general escape sequence?)
 ===================
 */
-char       *
+static char       *
 Key_KeynumToString (int keynum)
 {
 	keyname_t  *kn;
@@ -490,12 +484,7 @@
 }
 
 
-/*
-===================
-Key_SetBinding
-===================
-*/
-void
+static void
 Key_SetBinding (int keynum, int bindmap, char *binding)
 {
 	char       *new;
@@ -517,12 +506,7 @@
 	keybindings[bindmap][keynum] = new;
 }
 
-/*
-===================
-Key_In_Unbind_f
-===================
-*/
-void
+static void
 Key_In_Unbind_f (void)
 {
 	int         b, m;
@@ -547,12 +531,7 @@
 	Key_SetBinding (b, m, "");
 }
 
-/*
-===================
-Key_In_Bind_f
-===================
-*/
-void
+static void
 Key_In_Bind_f (void)
 {
 	int         i, c, b, m;
@@ -595,12 +574,7 @@
 	Key_SetBinding (b, m, cmd);
 }
 
-/*
-===================
-Key_In_Bindmap_f
-===================
-*/
-void
+static void
 Key_In_Bindmap_f (void)
 {
 	int         m1, m2, c;
@@ -628,12 +602,7 @@
 	key_bmap2 = m2;
 }
 
-/*
-===================
-Key_Unbind_f
-===================
-*/
-void
+static void
 Key_Unbind_f (void)
 {
 	int         b;
@@ -652,7 +621,7 @@
 	Key_SetBinding (b, 0, "");
 }
 
-void
+static void
 Key_Unbindall_f (void)
 {
 	int         i, j;
@@ -664,12 +633,7 @@
 }
 
 
-/*
-===================
-Key_Bind_f
-===================
-*/
-void
+static void
 Key_Bind_f (void)
 {
 	int         i, c, b;
@@ -707,8 +671,6 @@
 
 /*
 ============
-Key_WriteBindings
-
 Writes lines containing "bind key value"
 ============
 */
@@ -729,11 +691,6 @@
 }
 
 
-/*
-===================
-Key_Init
-===================
-*/
 void
 Key_Init (void)
 {
@@ -819,8 +776,6 @@
 
 /*
 ===================
-Key_Event
-
 Called by the system between frames for both key up and key down events
 Should NOT be called during an interrupt!
 ===================
@@ -957,21 +912,5 @@
 			break;
 		default:
 			Sys_Error ("Bad key_dest");
-	}
-}
-
-/*
-===================
-Key_ClearStates
-===================
-*/
-void
-Key_ClearStates (void)
-{
-	int         i;
-
-	for (i = 0; i < 256; i++) {
-		keydown[i] = false;
-		key_repeats[i] = false;
 	}
 }
Index: twilight/src/nq/net.h
diff -u twilight/src/nq/net.h:1.14 twilight/src/nq/net.h:1.15
--- twilight/src/nq/net.h:1.14	Sat Jul  6 20:33:34 2002
+++ twilight/src/nq/net.h	Fri Apr 18 17:09:15 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: net.h,v 1.14 2002/07/07 00:33:34 warp Exp $
+	$Id: net.h,v 1.15 2003/04/18 21:09:15 warp Exp $
 */
 
 #ifndef __NET_H
@@ -215,7 +215,6 @@
 extern int  net_numdrivers;
 extern net_driver_t net_drivers[MAX_NET_DRIVERS];
 
-extern int  DEFAULTnet_hostport;
 extern int  net_hostport;
 
 extern int  net_driverlevel;
@@ -324,8 +323,6 @@
 extern qboolean slistInProgress;
 extern qboolean slistSilent;
 extern qboolean slistLocal;
-
-void        NET_Slist_f (void);
 
 #endif // __NET_H
 
Index: twilight/src/nq/net_dgrm.c
diff -u twilight/src/nq/net_dgrm.c:1.28 twilight/src/nq/net_dgrm.c:1.29
--- twilight/src/nq/net_dgrm.c:1.28	Sat Mar 22 07:50:34 2003
+++ twilight/src/nq/net_dgrm.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: net_dgrm.c,v 1.28 2003/03/22 12:50:34 warp Exp $";
+    "$Id: net_dgrm.c,v 1.29 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -113,7 +113,7 @@
 unsigned long banAddr = 0x00000000;
 unsigned long banMask = 0xffffffff;
 
-void
+static void
 NET_Ban_f (void)
 {
 	char        addrStr[32];
@@ -210,7 +210,7 @@
 }
 
 
-int
+static int
 SendMessageNext (qsocket_t * sock)
 {
 	unsigned int packetLen;
@@ -243,7 +243,7 @@
 }
 
 
-int
+static int
 ReSendMessage (qsocket_t * sock)
 {
 	unsigned int packetLen;
@@ -451,7 +451,7 @@
 }
 
 
-void
+static void
 PrintStats (qsocket_t * s)
 {
 	Com_Printf ("canSend = %4u   \n", s->canSend);
@@ -460,7 +460,7 @@
 	Com_Printf ("\n");
 }
 
-void
+static void
 NET_Stats_f (void)
 {
 	qsocket_t  *s;
Index: twilight/src/nq/net_main.c
diff -u twilight/src/nq/net_main.c:1.24 twilight/src/nq/net_main.c:1.25
--- twilight/src/nq/net_main.c:1.24	Sat Mar 22 07:50:34 2003
+++ twilight/src/nq/net_main.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: net_main.c,v 1.24 2003/03/22 12:50:34 warp Exp $";
+    "$Id: net_main.c,v 1.25 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -46,17 +46,8 @@
 qboolean    tcpipAvailable = false;
 
 int         net_hostport;
-int         DEFAULTnet_hostport = 26000;
+static int  DEFAULTnet_hostport = 26000;
 
-void        (*GetComPortConfig) (int portNumber, int *port, int *irq, int *baud,
-								 qboolean *useModem);
-void        (*SetComPortConfig) (int portNumber, int port, int irq, int baud,
-								 qboolean useModem);
-void        (*GetModemConfig) (int portNumber, char *dialType, char *clear,
-							   char *init, char *hangup);
-void        (*SetModemConfig) (int portNumber, char *dialType, char *clear,
-							   char *init, char *hangup);
-
 static qboolean listening = false;
 
 qboolean    slistInProgress = false;
@@ -307,7 +298,7 @@
 }
 
 
-void
+static void
 NET_Slist_f (void)
 {
 	if (slistInProgress)
Index: twilight/src/nq/net_udp.c
diff -u twilight/src/nq/net_udp.c:1.30 twilight/src/nq/net_udp.c:1.31
--- twilight/src/nq/net_udp.c:1.30	Mon Oct 28 11:35:45 2002
+++ twilight/src/nq/net_udp.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: net_udp.c,v 1.30 2002/10/28 16:35:45 warp Exp $";
+    "$Id: net_udp.c,v 1.31 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -258,7 +258,7 @@
 
 //=============================================================================
 
-int
+static int
 UDP_MakeSocketBroadcastCapable (int socket)
 {
 	int         i = 1;
Index: twilight/src/nq/pr_cmds.c
diff -u twilight/src/nq/pr_cmds.c:1.43 twilight/src/nq/pr_cmds.c:1.44
--- twilight/src/nq/pr_cmds.c:1.43	Wed Apr  9 06:38:09 2003
+++ twilight/src/nq/pr_cmds.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: pr_cmds.c,v 1.43 2003/04/09 10:38:09 knghtbrd Exp $";
+    "$Id: pr_cmds.c,v 1.44 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -84,7 +84,7 @@
 ===============================================================================
 */
 
-char *
+static char *
 PF_VarString (Uint first)
 {
 	Uint			i;
@@ -100,15 +100,13 @@
 
 /*
 =================
-PF_errror
-
 This is a TERMINAL error, which will kill off the entire server.
 Dumps self.
 
 error(value)
 =================
 */
-void
+static void
 PF_error (void)
 {
 	char		*s;
@@ -125,15 +123,13 @@
 
 /*
 =================
-PF_objerror
-
 Dumps out self, then an error message.  The program is aborted and self is
 removed, but the level can continue.
 
 objerror(value)
 =================
 */
-void
+static void
 PF_objerror (void)
 {
 	char		*s;
@@ -153,13 +149,11 @@
 
 /*
 ==============
-PF_makevectors
-
 Writes new values for v_forward, v_up, and v_right based on angles
 makevectors(vector)
 ==============
 */
-void
+static void
 PF_makevectors (void)
 {
 	AngleVectors (G_VECTOR (OFS_PARM0), pr_global_struct->v_forward,
@@ -168,14 +162,13 @@
 
 /*
  * ==============
-PF_vectorvectors
-
 Writes new values for v_forward, v_up, and v_right based on the given
 forward vector
 vectorvectors(vector, vector)
 ==============
 */
-void PF_vectorvectors (void)
+static void
+PF_vectorvectors (void)
 {
 	VectorNormalize2(G_VECTOR(OFS_PARM0), pr_global_struct->v_forward);
 	VectorVectors(pr_global_struct->v_forward, pr_global_struct->v_right,
@@ -185,8 +178,6 @@
 
 /*
 =================
-PF_setorigin
-
 This is the only valid way to move an object without using the physics of the
 world (setting velocity and waiting).  Directly changing origin will not set
 internal links correctly, so clipping would be messed up.  This should be
@@ -195,7 +186,7 @@
 setorigin (entity, origin)
 =================
 */
-void
+static void
 PF_setorigin (void)
 {
 	edict_t		*e;
@@ -208,7 +199,7 @@
 }
 
 
-void
+static void
 SetMinMaxSize (edict_t *e, float *min, float *max)
 {
 	int			i;
@@ -227,14 +218,12 @@
 
 /*
 =================
-PF_setsize
-
 the size box is rotated by the current angle
 
 setsize (entity, minvector, maxvector)
 =================
 */
-void
+static void
 PF_setsize (void)
 {
 	edict_t		*e;
@@ -249,12 +238,10 @@
 
 /*
 =================
-PF_setmodel
-
 setmodel(entity, model)
 =================
 */
-void
+static void
 PF_setmodel (void)
 {
 	edict_t		*e;
@@ -292,14 +279,12 @@
 
 /*
 =================
-PF_bprint
-
 broadcast print to everyone on server
 
 bprint(value)
 =================
 */
-void
+static void
 PF_bprint (void)
 {
 	char       *s;
@@ -310,14 +295,12 @@
 
 /*
 =================
-PF_sprint
-
 single print to a specific client
 
 sprint(clientent, value)
 =================
 */
-void
+static void
 PF_sprint (void)
 {
 	char		*s;
@@ -342,14 +325,12 @@
 
 /*
 =================
-PF_centerprint
-
 single print to a specific client
 
 centerprint(clientent, value)
 =================
 */
-void
+static void
 PF_centerprint (void)
 {
 	char		*s;
@@ -374,12 +355,10 @@
 
 /*
 =================
-PF_normalize
-
 vector normalize(vector)
 =================
 */
-void
+static void
 PF_normalize (void)
 {
 	float		*value1;
@@ -406,12 +385,10 @@
 
 /*
 =================
-PF_vlen
-
 scalar vlen(vector)
 =================
 */
-void
+static void
 PF_vlen (void)
 {
 	float		*value1;
@@ -426,12 +403,10 @@
 
 /*
 =================
-PF_vectoyaw
-
 float vectoyaw(vector)
 =================
 */
-void
+static void
 PF_vectoyaw (void)
 {
 	float		*value1;
@@ -454,12 +429,10 @@
 
 /*
 =================
-PF_vectoangles
-
 vector vectoangles(vector)
 =================
 */
-void
+static void
 PF_vectoangles (void)
 {
 	float		*value1 = G_VECTOR (OFS_PARM0);
@@ -474,14 +447,12 @@
 
 /*
 =================
-PF_Random
-
 Returns a number from 0<= num < 1
 
 random()
 =================
 */
-void
+static void
 PF_random (void)
 {
 	float		num;
@@ -493,12 +464,10 @@
 
 /*
 =================
-PF_particle
-
 particle(origin, color, count)
 =================
 */
-void
+static void
 PF_particle (void)
 {
 	float		*org, *dir;
@@ -513,13 +482,7 @@
 }
 
 
-/*
-=================
-PF_ambientsound
-
-=================
-*/
-void
+static void
 PF_ambientsound (void)
 {
 	char		**check;
@@ -558,8 +521,6 @@
 
 /*
 =================
-PF_sound
-
 Each entity can have eight independant sound sources, like voice,
 weapon, feet, etc.
 
@@ -571,7 +532,7 @@
 
 =================
 */
-void
+static void
 PF_sound (void)
 {
 	char		*sample;
@@ -600,12 +561,10 @@
 
 /*
 =================
-PF_break
-
 break()
 =================
 */
-void
+static void
 PF_break (void)
 {
 	Com_Printf ("break statement\n");
@@ -614,8 +573,6 @@
 
 /*
 =================
-PF_traceline
-
 Used for use tracing and shot targeting
 Traces are blocked by bbox and exact bsp entityes, and also slide box entities
 if the tryents flag is set.
@@ -623,7 +580,7 @@
 traceline (vector1, vector2, tryents)
 =================
 */
-void
+static void
 PF_traceline (void)
 {
 	float		*v1, *v2;
@@ -654,8 +611,6 @@
 
 /*
 =================
-PF_tracebox
-
 Used for use tracing and shot targeting
 Traces are blocked by bbox and exact bsp entityes, and also slide box entities
 if the tryents flag is set.
@@ -663,7 +618,8 @@
 tracebox (vector1, vector mins, vector maxs, vector2, tryents)
 =================
 */
-void PF_tracebox (void)
+static void
+PF_tracebox (void)
 {
 	float		*v1, *v2, *m1, *m2;
 	trace_t		trace;
@@ -695,7 +651,8 @@
 		pr_global_struct->trace_ent = EDICT_TO_PROG(sv.edicts);
 }
 
-void PF_tracetoss (void)
+static void
+PF_tracetoss (void)
 {
 	trace_t trace;
 	edict_t *ent;
@@ -723,25 +680,9 @@
 		pr_global_struct->trace_ent = EDICT_TO_PROG(sv.edicts);
 }
 
-
-/*
-=================
-PF_checkpos
-
-Returns true if the given entity can move to the given position from it's
-current position by walking or rolling.
-FIXME: make work...
-scalar checkpos (entity, vector)
-=================
-*/
-void
-PF_checkpos (void)
-{
-}
-
 //============================================================================
 
-int
+static int
 PF_newcheckclient (Uint32 check)
 {
 	Uint32		i;
@@ -793,8 +734,6 @@
 
 /*
 =================
-PF_checkclient
-
 Returns a client (or object that has a client enemy) that would be a
 valid target.
 
@@ -806,7 +745,7 @@
 name checkclient ()
 =================
 */
-void
+static void
 PF_checkclient (void)
 {
 	edict_t		*ent, *self;
@@ -851,14 +790,12 @@
 
 /*
 =================
-PF_stuffcmd
-
 Sends text over to the client's execution buffer
 
 stuffcmd (clientent, value)
 =================
 */
-void
+static void
 PF_stuffcmd (void)
 {
 	Uint32		entnum;
@@ -878,14 +815,12 @@
 
 /*
 =================
-PF_localcmd
-
 Sends text over to the client's execution buffer
 
 localcmd (string)
 =================
 */
-void
+static void
 PF_localcmd (void)
 {
 	char		*str;
@@ -896,12 +831,10 @@
 
 /*
 =================
-PF_cvar
-
 float cvar (string)
 =================
 */
-void
+static void
 PF_cvar (void)
 {
 	char		*str;
@@ -917,12 +850,10 @@
 
 /*
 =================
-PF_cvar_set
-
 float cvar (string)
 =================
 */
-void
+static void
 PF_cvar_set (void)
 {
 	char		*name, *val;
@@ -940,14 +871,12 @@
 
 /*
 =================
-PF_findradius
-
 Returns a chain of entities that have origins within a spherical area
 
 findradius (origin, radius)
 =================
 */
-void
+static void
 PF_findradius (void)
 {
 	edict_t		*ent, *chain;
@@ -981,18 +910,13 @@
 }
 
 
-/*
-=========
-PF_dprint
-=========
-*/
-void
+static void
 PF_dprint (void)
 {
 	Com_DPrintf ("%s", PF_VarString (0));
 }
 
-void
+static void
 PF_ftos (void)
 {
 	float		v;
@@ -1006,7 +930,7 @@
 	G_INT (OFS_RETURN) = pr_string_temp - pr_strings;
 }
 
-void
+static void
 PF_fabs (void)
 {
 	float		v;
@@ -1015,7 +939,7 @@
 	G_FLOAT (OFS_RETURN) = fabs (v);
 }
 
-void
+static void
 PF_vtos (void)
 {
 	snprintf (pr_string_temp, sizeof (pr_string_temp), "'%5.1f %5.1f %5.1f'",
@@ -1024,7 +948,7 @@
 	G_INT (OFS_RETURN) = pr_string_temp - pr_strings;
 }
 
-void
+static void
 PF_etos (void)
 {
 	snprintf (pr_string_temp, sizeof (pr_string_temp), "entity %i",
@@ -1033,7 +957,7 @@
 }
 
 
-void
+static void
 PF_Spawn (void)
 {
 	edict_t		*ed;
@@ -1042,7 +966,7 @@
 	RETURN_EDICT (ed);
 }
 
-void
+static void
 PF_Remove (void)
 {
 	edict_t		*ed;
@@ -1053,7 +977,7 @@
 
 
 // entity (entity start, .string field, string match) find = #5;
-void
+static void
 PF_Find (void)
 {
 	Uint32		e;
@@ -1092,21 +1016,21 @@
 	RETURN_EDICT (sv.edicts);
 }
 
-void
+static void
 PR_CheckEmptyString (char *s)
 {
 	if (s[0] <= ' ')
 		PR_RunError ("Bad string");
 }
 
-void
+static void
 PF_precache_file (void)
 {
 	// precache_file is only used to copy files with qcc, it does nothing
 	G_INT (OFS_RETURN) = G_INT (OFS_PARM0);
 }
 
-void
+static void
 PF_precache_sound (void)
 {
 	char		*s;
@@ -1133,7 +1057,7 @@
 	PR_RunError ("PF_precache_sound: overflow");
 }
 
-void
+static void
 PF_precache_model (void)
 {
 	char		*s;
@@ -1165,25 +1089,25 @@
 }
 
 
-void
+static void
 PF_coredump (void)
 {
 	ED_PrintEdicts ();
 }
 
-void
+static void
 PF_traceon (void)
 {
 	pr_trace = true;
 }
 
-void
+static void
 PF_traceoff (void)
 {
 	pr_trace = false;
 }
 
-void
+static void
 PF_eprint (void)
 {
 	ED_PrintNum (G_EDICTNUM (OFS_PARM0));
@@ -1191,12 +1115,10 @@
 
 /*
 ===============
-PF_walkmove
-
 float(float yaw, float dist) walkmove
 ===============
 */
-void
+static void
 PF_walkmove (void)
 {
 	edict_t			*ent;
@@ -1235,12 +1157,10 @@
 
 /*
 ===============
-PF_droptofloor
-
 void() droptofloor
 ===============
 */
-void
+static void
 PF_droptofloor (void)
 {
 	edict_t		*ent;
@@ -1268,12 +1188,10 @@
 
 /*
 ===============
-PF_lightstyle
-
 void(float style, string value) lightstyle
 ===============
 */
-void
+static void
 PF_lightstyle (void)
 {
 	int			style;
@@ -1300,7 +1218,7 @@
 		}
 }
 
-void
+static void
 PF_rint (void)
 {
 	float		f;
@@ -1312,25 +1230,20 @@
 		G_FLOAT (OFS_RETURN) = (int) (f - 0.5);
 }
 
-void
+static void
 PF_floor (void)
 {
 	G_FLOAT (OFS_RETURN) = floor (G_FLOAT (OFS_PARM0));
 }
 
-void
+static void
 PF_ceil (void)
 {
 	G_FLOAT (OFS_RETURN) = ceil (G_FLOAT (OFS_PARM0));
 }
 
 
-/*
-=============
-PF_checkbottom
-=============
-*/
-void
+static void
 PF_checkbottom (void)
 {
 	edict_t		*ent;
@@ -1340,12 +1253,7 @@
 	G_FLOAT (OFS_RETURN) = SV_CheckBottom (ent);
 }
 
-/*
-=============
-PF_pointcontents
-=============
-*/
-void
+static void
 PF_pointcontents (void)
 {
 	float		*v;
@@ -1357,12 +1265,10 @@
 
 /*
 =============
-PF_nextent
-
 entity nextent(entity)
 =============
 */
-void
+static void
 PF_nextent (void)
 {
 	Uint32		i;
@@ -1388,13 +1294,11 @@
 
 /*
 =============
-PF_aim
-
 Pick a vector for the player to shoot along
 vector aim(entity, missilespeed)
 =============
 */
-void
+static void
 PF_aim (void)
 {
 	edict_t		*ent, *check, *bestent;
@@ -1470,8 +1374,6 @@
 
 /*
 ==============
-PF_changeyaw
-
 This was a major timewaster in progs, so it was converted to C
 ==============
 */
@@ -1515,11 +1417,10 @@
 
 /*
 ==============
-PF_changepitch
 LordHavoc
 ==============
 */
-void
+static void
 PF_changepitch (void)
 {
 	edict_t		*ent;
@@ -1581,7 +1482,7 @@
 ===============================================================================
 */
 
-sizebuf_t *
+static sizebuf_t *
 WriteDest (void)
 {
 	Uint		entnum;
@@ -1615,50 +1516,50 @@
 	return NULL;
 }
 
-void
+static void
 PF_WriteByte (void)
 {
 	MSG_WriteByte (WriteDest (), G_FLOAT (OFS_PARM1));
 }
 
-void
+static void
 PF_WriteChar (void)
 {
 	MSG_WriteChar (WriteDest (), G_FLOAT (OFS_PARM1));
 }
 
-void
+static void
 PF_WriteShort (void)
 {
 	MSG_WriteShort (WriteDest (), G_FLOAT (OFS_PARM1));
 }
 
-void
+static void
 PF_WriteLong (void)
 {
 	MSG_WriteLong (WriteDest (), G_FLOAT (OFS_PARM1));
 }
 
-void
+static void
 PF_WriteAngle (void)
 {
 	MSG_WriteAngle (WriteDest (), G_FLOAT (OFS_PARM1));
 }
 
-void
+static void
 PF_WriteCoord (void)
 {
 	MSG_WriteCoord (WriteDest (), G_FLOAT (OFS_PARM1));
 }
 
-void
+static void
 PF_WriteString (void)
 {
 	MSG_WriteString (WriteDest (), G_STRING (OFS_PARM1));
 }
 
 
-void
+static void
 PF_WriteEntity (void)
 {
 	MSG_WriteShort (WriteDest (), G_EDICTNUM (OFS_PARM1));
@@ -1666,7 +1567,7 @@
 
 //=============================================================================
 
-void
+static void
 PF_makestatic (void)
 {
 	edict_t		*ent;
@@ -1693,12 +1594,7 @@
 
 //=============================================================================
 
-/*
-==============
-PF_setspawnparms
-==============
-*/
-void
+static void
 PF_setspawnparms (void)
 {
 	edict_t		*ent;
@@ -1717,12 +1613,7 @@
 		(&pr_global_struct->parm1)[i] = client->spawn_parms[i];
 }
 
-/*
-==============
-PF_changelevel
-==============
-*/
-void
+static void
 PF_changelevel (void)
 {
 	char		*s;
@@ -1736,25 +1627,25 @@
 	Cbuf_AddText (va ("changelevel %s\n", s));
 }
 
-void
+static void
 PF_sin (void)
 {
 	G_FLOAT(OFS_RETURN) = sin(G_FLOAT(OFS_PARM0));
 }   
 
-void
+static void
 PF_cos (void)
 {
 	G_FLOAT(OFS_RETURN) = cos(G_FLOAT(OFS_PARM0));
 }   
 
-void
+static void
 PF_sqrt (void)
 {
 	G_FLOAT(OFS_RETURN) = sqrt(G_FLOAT(OFS_PARM0));
 }   
 
-void
+static void
 PF_randomvec (void)
 {
 	vec3_t		temp;
@@ -1769,7 +1660,7 @@
 	VectorCopy (temp, G_VECTOR(OFS_RETURN));
 }
 
-void
+static void
 PF_registercvar (void)
 {
 	char		*name, *value;
@@ -1800,12 +1691,10 @@
 
 /*
 =================
-PF_min
-
 returns the minimum of two or more supplied floats
 =================
 */
-void
+static void
 PF_min (void)
 {
 	Uint		i;
@@ -1828,12 +1717,10 @@
 
 /*
 =================
-PF_max
-
 returns the maximum of two or more supplied floats
 =================
 */
-void
+static void
 PF_max (void)
 {
 	Uint		i;
@@ -1856,12 +1743,10 @@
 
 /*
 =================
-PF_bound
-
 returns float bounded within a supplied range
 =================
 */
-void
+static void
 PF_bound (void)
 {
 	    G_FLOAT(OFS_RETURN) = bound(G_FLOAT(OFS_PARM0), G_FLOAT(OFS_PARM1), G_FLOAT(OFS_PARM2));
@@ -1869,12 +1754,10 @@
 
 /*
 =================
-PF_pow
-
 returns x raised to the y power
 =================
 */
-void
+static void
 PF_pow (void)
 {
 	G_FLOAT(OFS_RETURN) = pow(G_FLOAT(OFS_PARM0), G_FLOAT(OFS_PARM1));
@@ -1882,14 +1765,13 @@
 
 /*
 =================
-PF_copyentity
-
 copies data from one entity to another
 
 copyentity(src, dst)
 =================
 */
-void PF_copyentity (void)
+static void
+PF_copyentity (void)
 {
 	edict_t *in, *out;
 
@@ -1900,15 +1782,14 @@
 
 /*
 =================
-PF_setcolor
-
 sets the color of a client and broadcasts the update to all connected
 clients
 
 setcolor(clientent, value)
 =================
 */
-void PF_setcolor (void)
+static void
+PF_setcolor (void)
 {
 	client_t *client;
 	Uint entnum, i;
@@ -1932,13 +1813,7 @@
 }
 
 
-/*
-=================
-PF_findfloat
-
-=================
-*/
-void
+static void
 PF_findfloat (void)
 {
 	Uint		e;
@@ -1967,7 +1842,8 @@
 
 // chained search for strings in entity fields
 // entity(.string field, string match) findchain = #402;
-void PF_findchain (void)
+static void
+PF_findchain (void)
 {
 	Uint i;
 	int f;
@@ -2006,7 +1882,8 @@
 
 // LordHavoc: chained search for float, int, and entity reference fields
 // entity(.string field, float match) findchainfloat = #403;
-void PF_findchainfloat (void)
+static void
+PF_findchainfloat (void)
 {
 	Uint i;
 	int f;
@@ -2035,7 +1912,7 @@
 	RETURN_EDICT(chain);
 }
 
-void
+static void
 PF_checkextension (void)
 {
 	int			len;
@@ -2063,7 +1940,7 @@
 	G_FLOAT(OFS_RETURN) = false;
 }
 
-void
+static void
 PF_fixme (void)
 {
 	PR_RunError ("unimplemented builtin");
Index: twilight/src/nq/pr_edict.c
diff -u twilight/src/nq/pr_edict.c:1.37 twilight/src/nq/pr_edict.c:1.38
--- twilight/src/nq/pr_edict.c:1.37	Mon Sep 30 05:29:40 2002
+++ twilight/src/nq/pr_edict.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: pr_edict.c,v 1.37 2002/09/30 09:29:40 warp Exp $";
+    "$Id: pr_edict.c,v 1.38 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -68,8 +68,8 @@
 	sizeof (void *) / 4
 };
 
-extern ddef_t *ED_FieldAtOfs (int ofs);
-extern qboolean ED_ParseEpair (void *base, ddef_t *key, char *s);
+static ddef_t *ED_FieldAtOfs (int ofs);
+static qboolean ED_ParseEpair (void *base, ddef_t *key, char *s);
 
 cvar_t *nomonsters;
 cvar_t *gamecfg;
@@ -104,8 +104,8 @@
 	{NULL, ""}
 };
 
-extern ddef_t *ED_FindField (char *name);
-extern dfunction_t *ED_FindFunction (char *name);
+static ddef_t *ED_FindField (char *name);
+static dfunction_t *ED_FindFunction (char *name);
 
 // LordHavoc: in an effort to eliminate time wasted on GetEdictFieldValue...
 // these are defined as externs in progs.h
@@ -130,7 +130,8 @@
 int eval_movement;
 int eval_punchvector;
 
-int FindFieldOffset(char *field)
+static int
+FindFieldOffset(char *field)
 {
 	ddef_t *d;
 	d = ED_FindField (field);
@@ -139,7 +140,8 @@
 	return d->ofs*4;
 }
 
-void FindEdictFieldOffsets(void)
+static void
+FindEdictFieldOffsets(void)
 {
 	eval_gravity = FindFieldOffset ("gravity");
 	eval_button3 = FindFieldOffset ("button3");
@@ -165,12 +167,10 @@
 
 /*
 =================
-ED_ClearEdict
-
 Sets everything to NULL
 =================
 */
-void
+static void
 ED_ClearEdict (edict_t *e)
 {
 	memset (&e->v, 0, progs->entityfields * 4);
@@ -179,8 +179,6 @@
 
 /*
 =================
-ED_Alloc
-
 Either finds a free edict, or allocates a new one.
 Try to avoid reusing an entity that was recently freed, because it
 can cause the client to think the entity morphed into something else
@@ -218,8 +216,6 @@
 
 /*
 =================
-ED_Free
-
 Marks the edict as free
 FIXME: walk all entities and NULL out references to this entity
 =================
@@ -246,12 +242,7 @@
 
 //===========================================================================
 
-/*
-============
-ED_GlobalAtOfs
-============
-*/
-ddef_t *
+static ddef_t *
 ED_GlobalAtOfs (int ofs)
 {
 	ddef_t		*def;
@@ -266,12 +257,7 @@
 	return NULL;
 }
 
-/*
-============
-ED_FieldAtOfs
-============
-*/
-ddef_t *
+static ddef_t *
 ED_FieldAtOfs (int ofs)
 {
 	ddef_t		*def;
@@ -286,12 +272,7 @@
 	return NULL;
 }
 
-/*
-============
-ED_FindField
-============
-*/
-ddef_t *
+static ddef_t *
 ED_FindField (char *name)
 {
 	ddef_t		*def;
@@ -307,12 +288,7 @@
 }
 
 
-/*
-============
-ED_FindGlobal
-============
-*/
-ddef_t *
+static ddef_t *
 ED_FindGlobal (char *name)
 {
 	ddef_t		*def;
@@ -328,12 +304,7 @@
 }
 
 
-/*
-============
-ED_FindFunction
-============
-*/
-dfunction_t *
+static dfunction_t *
 ED_FindFunction (char *name)
 {
 	dfunction_t		*func;
@@ -350,14 +321,12 @@
 
 /*
 ============
-PR_ValueString
-
 Returns a string describing *data in a type specific manner
 =============
 */
-int NoCrash_NUM_FOR_EDICT(edict_t *e, char *filename, int fileline);
+static int NoCrash_NUM_FOR_EDICT(edict_t *e, char *filename, int fileline);
 
-char *
+static char *
 PR_ValueString (etype_t type, eval_t *val)
 {
 	static char		line[1024];
@@ -410,13 +379,11 @@
 
 /*
 ============
-PR_UglyValueString
-
 Returns a string describing *data in a type specific manner
 Easier to parse than PR_ValueString
 =============
 */
-char *
+static char *
 PR_UglyValueString (etype_t type, eval_t *val)
 {
 	static char		line[4096];
@@ -540,8 +507,6 @@
 
 /*
 =============
-ED_Print
-
 For debugging
 LordHavoc:
 	optimized this to print out much more quickly (tempstring)
@@ -595,8 +560,6 @@
 
 /*
 =============
-ED_Write
-
 For savegames
 =============
 */
@@ -648,8 +611,6 @@
 
 /*
 =============
-ED_PrintEdicts
-
 For debugging, prints all the entities in the current server
 =============
 */
@@ -665,12 +626,10 @@
 
 /*
 =============
-ED_PrintEdict_f
-
 For debugging, prints a single edict
 =============
 */
-void
+static void
 ED_PrintEdict_f (void)
 {
 	Uint		i;
@@ -686,12 +645,10 @@
 
 /*
 =============
-ED_Count
-
 For debugging
 =============
 */
-void
+static void
 ED_Count (void)
 {
 	Uint		i, active, models, solid, step;
@@ -729,11 +686,6 @@
 ==============================================================================
 */
 
-/*
-=============
-ED_WriteGlobals
-=============
-*/
 void
 ED_WriteGlobals (FILE * f)
 {
@@ -762,11 +714,6 @@
 	fprintf (f, "}\n");
 }
 
-/*
-=============
-ED_ParseGlobals
-=============
-*/
 void
 ED_ParseGlobals (char *data)
 {
@@ -807,12 +754,7 @@
 //============================================================================
 
 
-/*
-=============
-ED_NewString
-=============
-*/
-char *
+static char *
 ED_NewString (char *string)
 {
 	char		*new, *new_p;
@@ -842,13 +784,11 @@
 
 /*
 =============
-ED_ParseEval
-
 Can parse either fields or globals
 returns false if error
 =============
 */
-qboolean
+static qboolean
 ED_ParseEpair (void *base, ddef_t *key, char *s)
 {
 	Uint			i;
@@ -915,8 +855,6 @@
 
 /*
 ====================
-ED_ParseEdict
-
 Parses an edict out of the given string, returning the new position
 ed should be a properly initialized empty edict.
 Used for initial level load and for savegames.
@@ -1012,8 +950,6 @@
 
 /*
 ================
-ED_LoadFromFile
-
 The entities are directly placed in the array, rather than allocated with
 ED_Alloc, because otherwise an error loading the map would have entity
 number references out of order.
@@ -1373,7 +1309,8 @@
 	FindEdictFieldOffsets(); // LordHavoc: update field offset list
 }
 
-void PR_Fields_f (void)
+static void
+PR_Fields_f (void)
 {
 	Uint		i;
 
@@ -1392,7 +1329,8 @@
 			progs->entityfields * 4 * MAX_EDICTS);
 }
 
-void PR_Globals_f (void)
+static void
+PR_Globals_f (void)
 {
 	Uint		i;
 
@@ -1471,7 +1409,7 @@
 	return b;
 }
 
-int
+static int
 NoCrash_NUM_FOR_EDICT (edict_t *e, char *filename, int fileline)
 {
 	Uint		b;
Index: twilight/src/nq/pr_exec.c
diff -u twilight/src/nq/pr_exec.c:1.19 twilight/src/nq/pr_exec.c:1.20
--- twilight/src/nq/pr_exec.c:1.19	Fri Jul 26 15:48:51 2002
+++ twilight/src/nq/pr_exec.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: pr_exec.c,v 1.19 2002/07/26 19:48:51 knghtbrd Exp $";
+    "$Id: pr_exec.c,v 1.20 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -155,12 +155,7 @@
 
 //=============================================================================
 
-/*
-=================
-PR_PrintStatement
-=================
-*/
-void
+static void
 PR_PrintStatement (dstatement_t *s)
 {
 	int         i;
@@ -190,12 +185,8 @@
 	Com_Printf ("\n");
 }
 
-/*
-============
-PR_StackTrace
-============
-*/
-void PR_StackTrace (void)
+static void
+PR_StackTrace (void)
 {
 	dfunction_t	*f;
 	int			i;
@@ -213,12 +204,6 @@
 	}
 }
 
-/*
-============
-PR_Profile_f
-
-============
-*/
 void
 PR_Profile_f (void)
 {
@@ -254,8 +239,6 @@
 
 /*
 ============
-PR_RunError
-
 Aborts the currently executing function
 ============
 */
@@ -288,20 +271,16 @@
 
 /*
 ============================================================================
-PR_ExecuteProgram
-
 The interpretation main loop
 ============================================================================
 */
 
 /*
 ====================
-PR_EnterFunction
-
 Returns the new program statement counter
 ====================
 */
-int
+static int
 PR_EnterFunction (dfunction_t *f)
 {
 	Uint		i, j, c, o;
@@ -339,12 +318,7 @@
 	return f->first_statement - 1;		// offset the s++
 }
 
-/*
-====================
-PR_LeaveFunction
-====================
-*/
-int
+static int
 PR_LeaveFunction (void)
 {
 	int	i, c;
@@ -369,11 +343,6 @@
 }
 
 
-/*
-====================
-PR_ExecuteProgram
-====================
-*/
 // LordHavoc: optimized
 extern cvar_t *pr_boundscheck;
 #define OPA ((eval_t *)&pr_globals[(unsigned short int) st->a])
Index: twilight/src/nq/progs.h
diff -u twilight/src/nq/progs.h:1.11 twilight/src/nq/progs.h:1.12
--- twilight/src/nq/progs.h:1.11	Mon Jan 27 05:30:07 2003
+++ twilight/src/nq/progs.h	Fri Apr 18 17:09:15 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: progs.h,v 1.11 2003/01/27 10:30:07 warp Exp $
+	$Id: progs.h,v 1.12 2003/04/18 21:09:15 warp Exp $
 */
 
 #ifndef __PROGS_H
@@ -114,8 +114,6 @@
 
 edict_t *ED_Alloc (void);
 void ED_Free (edict_t *ed);
-
-char *ED_NewString (char *string);
 
 // returns a copy of the string allocated from the server's string heap
 
Index: twilight/src/nq/render.h
diff -u twilight/src/nq/render.h:1.50 twilight/src/nq/render.h:1.51
--- twilight/src/nq/render.h:1.50	Thu Apr 17 23:19:30 2003
+++ twilight/src/nq/render.h	Fri Apr 18 17:09:15 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: render.h,v 1.50 2003/04/18 03:19:30 warp Exp $
+	$Id: render.h,v 1.51 2003/04/18 21:09:15 warp Exp $
 */
 
 #ifndef __RENDER_H
@@ -100,7 +100,6 @@
 
 void R_Init_Cvars (void);
 void R_Init (void);
-void R_InitTextures (void);
 
 // must set r_refdef first
 void R_RenderView (void);
Index: twilight/src/nq/sbar.c
diff -u twilight/src/nq/sbar.c:1.37 twilight/src/nq/sbar.c:1.38
--- twilight/src/nq/sbar.c:1.37	Mon Jul 29 23:15:57 2002
+++ twilight/src/nq/sbar.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sbar.c,v 1.37 2002/07/30 03:15:57 knghtbrd Exp $";
+    "$Id: sbar.c,v 1.38 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -83,20 +83,18 @@
 //MED 01/04/97 added hipnotic items array
 qpic_t     *hsb_items[2];
 
-void        Sbar_MiniDeathmatchOverlay (void);
-void        Sbar_DeathmatchOverlay (void);
+static void        Sbar_MiniDeathmatchOverlay (void);
+static void        Sbar_DeathmatchOverlay (void);
 void        M_DrawPic (int x, int y, qpic_t *pic);
 
 cvar_t		*cl_sbar;
 
 /*
 ===============
-Sbar_ShowScores
-
 Tab key down
 ===============
 */
-void
+static void
 Sbar_ShowScores (void)
 {
 	if (sb_showscores)
@@ -106,12 +104,10 @@
 
 /*
 ===============
-Sbar_DontShowScores
-
 Tab key up
 ===============
 */
-void
+static void
 Sbar_DontShowScores (void)
 {
 	sb_showscores = false;
@@ -123,11 +119,6 @@
 	cl_sbar = Cvar_Get ("cl_sbar", "0", CVAR_ARCHIVE, NULL);
 }
 
-/*
-===============
-Sbar_Init
-===============
-*/
 void
 Sbar_Init (void)
 {
@@ -277,25 +268,17 @@
 
 // drawing routines are relative to the status bar location
 
-/*
-=============
-Sbar_DrawPic
-=============
-*/
-void
+static void
 Sbar_DrawPic (int x, int y, qpic_t *pic)
 {
 	Draw_Pic (x, y + (vid.height_2d - SBAR_HEIGHT), pic);
 }
 
 /*
-=============
-Sbar_DrawSubPic
-=============
 JACK: Draws a portion of the picture in the status bar.
 */
 
-void
+static void
 Sbar_DrawSubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width,
 				 int height)
 {
@@ -306,34 +289,22 @@
 
 /*
 ================
-Sbar_DrawCharacter
-
 Draws one solid graphics character
 ================
 */
-void
+static void
 Sbar_DrawCharacter (int x, int y, int num)
 {
 	Draw_Character (x + 4, y + vid.height_2d - SBAR_HEIGHT, num, 8);
 }
 
-/*
-================
-Sbar_DrawString
-================
-*/
-void
+static void
 Sbar_DrawString (int x, int y, char *str)
 {
 	Draw_String (x, y + vid.height_2d - SBAR_HEIGHT, str, 8);
 }
 
-/*
-=============
-Sbar_itoa
-=============
-*/
-int
+static int
 Sbar_itoa (int num, char *buf)
 {
 	char       *str;
@@ -362,12 +333,7 @@
 }
 
 
-/*
-=============
-Sbar_DrawNum
-=============
-*/
-void
+static void
 Sbar_DrawNum (int x, int y, int num, int digits, int color)
 {
 	char        str[12];
@@ -398,12 +364,7 @@
 int		fragsort[MAX_SCOREBOARD];
 int		scoreboardlines;
 
-/*
-===============
-Sbar_SortFrags
-===============
-*/
-void
+static void
 Sbar_SortFrags (void)
 {
 	int	i, j, k;
@@ -426,25 +387,8 @@
 			}
 }
 
-/*
-===============
-Sbar_UpdateScoreboard
-===============
-*/
-void
-Sbar_UpdateScoreboard (void)
-{
-	Sbar_SortFrags ();
-}
-
 
-
-/*
-===============
-Sbar_SoloScoreboard
-===============
-*/
-void
+static void
 Sbar_SoloScoreboard (void)
 {
 	char        str[80];
@@ -478,12 +422,7 @@
 	}
 }
 
-/*
-===============
-Sbar_DrawScoreboard
-===============
-*/
-void
+static void
 Sbar_DrawScoreboard (void)
 {
 	Sbar_SoloScoreboard ();
@@ -494,12 +433,7 @@
 
 //=============================================================================
 
-/*
-===============
-Sbar_DrawInventory
-===============
-*/
-void
+static void
 Sbar_DrawInventory (void)
 {
 	int			i, j, y;
@@ -693,12 +627,7 @@
 
 //=============================================================================
 
-/*
-===============
-Sbar_DrawFrags
-===============
-*/
-void
+static void
 Sbar_DrawFrags (void)
 {
 	Sint32			k;
@@ -746,12 +675,7 @@
 //=============================================================================
 
 
-/*
-===============
-Sbar_DrawFace
-===============
-*/
-void
+static void
 Sbar_DrawFace (void)
 {
 	int			f, anim;
@@ -819,11 +743,6 @@
 	Sbar_DrawPic (112, 0, sb_faces[f][anim]);
 }
 
-/*
-===============
-Sbar_Draw
-===============
-*/
 void
 Sbar_Draw (void)
 {
@@ -943,13 +862,7 @@
 
 //=============================================================================
 
-/*
-==================
-Sbar_IntermissionNumber
-
-==================
-*/
-void
+static void
 Sbar_IntermissionNumber (int x, int y, int num, int digits, int color)
 {
 	char        str[12];
@@ -974,14 +887,8 @@
 		ptr++;
 	}
 }
-
-/*
-==================
-Sbar_DeathmatchOverlay
 
-==================
-*/
-void
+static void
 Sbar_DeathmatchOverlay (void)
 {
 	qpic_t     *pic;
@@ -1028,13 +935,7 @@
 	}
 }
 
-/*
-==================
-Sbar_MiniDeathmatchOverlay
-
-==================
-*/
-void
+static void
 Sbar_MiniDeathmatchOverlay (void)
 {
 	Sint32			k, i, numlines;
@@ -1100,12 +1001,6 @@
 	}
 }
 
-/*
-==================
-Sbar_IntermissionOverlay
-
-==================
-*/
 void
 Sbar_IntermissionOverlay (void)
 {
@@ -1143,12 +1038,6 @@
 }
 
 
-/*
-==================
-Sbar_FinaleOverlay
-
-==================
-*/
 void
 Sbar_FinaleOverlay (void)
 {
Index: twilight/src/nq/screen.h
diff -u twilight/src/nq/screen.h:1.11 twilight/src/nq/screen.h:1.12
--- twilight/src/nq/screen.h:1.11	Sat Jun 29 03:51:29 2002
+++ twilight/src/nq/screen.h	Fri Apr 18 17:09:15 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: screen.h,v 1.11 2002/06/29 07:51:29 knghtbrd Exp $
+	$Id: screen.h,v 1.12 2003/04/18 21:09:15 warp Exp $
 */
 
 #ifndef __SCREEN_H
@@ -40,9 +40,6 @@
 void SCR_EndLoadingPlaque (void);
 
 int SCR_ModalMessage (char *text);
-
-void SCR_CaptureAviDemo (void);
-void AvidemoChanged(cvar_t *);
 
 extern float scr_con_current;
 extern float scr_conlines;		/* lines of console to display */
Index: twilight/src/nq/server.h
diff -u twilight/src/nq/server.h:1.16 twilight/src/nq/server.h:1.17
--- twilight/src/nq/server.h:1.16	Wed Apr  9 06:38:09 2003
+++ twilight/src/nq/server.h	Fri Apr 18 17:09:15 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: server.h,v 1.16 2003/04/09 10:38:09 knghtbrd Exp $
+	$Id: server.h,v 1.17 2003/04/18 21:09:15 warp Exp $
 */
 // server.h
 
@@ -225,7 +225,6 @@
 
 void SV_AddUpdates (void);
 
-void SV_ClientThink (void);
 void SV_AddClientToServer (struct qsocket_s *ret);
 
 void SV_ClientPrintf (const char *fmt, ...);
Index: twilight/src/nq/snd_dma.c
diff -u twilight/src/nq/snd_dma.c:1.33 twilight/src/nq/snd_dma.c:1.34
--- twilight/src/nq/snd_dma.c:1.33	Sun Aug 11 09:35:32 2002
+++ twilight/src/nq/snd_dma.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: snd_dma.c,v 1.33 2002/08/11 13:35:32 warp Exp $";
+    "$Id: snd_dma.c,v 1.34 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -42,13 +42,13 @@
 #include "strlib.h"
 #include "sys.h"
 
-void        S_Play (void);
-void        S_PlayVol (void);
-void        S_SoundList (void);
-void        S_Update_ ();
+static void S_Play (void);
+static void S_PlayVol (void);
+static void S_SoundList (void);
+static void S_Update_ ();
 void        S_StopAllSounds (qboolean clear);
-void        S_StopAllSoundsC (void);
-void		CDAudio_Bgmcallback (cvar_t *cvar);
+static void S_StopAllSoundsC (void);
+static void S_ClearBuffer (void);
 
 // =======================================================================
 // Internal sound data & structures
@@ -59,7 +59,6 @@
 int         total_channels;
 
 int         snd_blocked = 0;
-static qboolean snd_ambient = 1;
 qboolean    snd_initialized = false;
 
 // pointer should go away
@@ -109,21 +108,7 @@
 qboolean    fakedma = false;
 
 
-void
-S_AmbientOff (void)
-{
-	snd_ambient = false;
-}
-
-
-void
-S_AmbientOn (void)
-{
-	snd_ambient = true;
-}
-
-
-void
+static void
 S_SoundInfo_f (void)
 {
 	if (!sound_started || !shm) {
@@ -148,7 +133,7 @@
 ================
 */
 
-void
+static void
 S_Startup (void)
 {
 	int         rc;
@@ -284,7 +269,7 @@
 
 ==================
 */
-sfx_t      *
+static sfx_t      *
 S_FindName (char *name)
 {
 	int         i;
@@ -345,7 +330,7 @@
 SND_PickChannel
 =================
 */
-channel_t  *
+static channel_t  *
 SND_PickChannel (int entnum, int entchannel)
 {
 	int         ch_idx;
@@ -390,7 +375,7 @@
 SND_Spatialize
 =================
 */
-void
+static void
 SND_Spatialize (channel_t *ch)
 {
 	vec_t       dot;
@@ -541,13 +526,13 @@
 		S_ClearBuffer ();
 }
 
-void
+static void
 S_StopAllSoundsC (void)
 {
 	S_StopAllSounds (true);
 }
 
-void
+static void
 S_ClearBuffer (void)
 {
 	int         clear;
@@ -611,7 +596,7 @@
 S_UpdateAmbientSounds
 ===================
 */
-void
+static void
 S_UpdateAmbientSounds (void)
 {
 	mleaf_t    *l;
@@ -619,9 +604,6 @@
 	int         ambient_channel;
 	channel_t  *chan;
 
-	if (!snd_ambient)
-		return;
-
 // calc ambient sound levels
 	if (!cl.worldmodel)
 		return;
@@ -746,7 +728,7 @@
 	S_Update_ ();
 }
 
-void
+static void
 GetSoundtime (void)
 {
 	int         samplepos;
@@ -784,7 +766,7 @@
 }
 
 
-void
+static void
 S_Update_ (void)
 {
 	Uint32	endtime;
@@ -820,7 +802,7 @@
 ===============================================================================
 */
 
-void
+static void
 S_Play (void)
 {
 	static int  hash = 345;
@@ -841,7 +823,7 @@
 	}
 }
 
-void
+static void
 S_PlayVol (void)
 {
 	static int  hash = 543;
@@ -864,7 +846,7 @@
 	}
 }
 
-void
+static void
 S_SoundList (void)
 {
 	int         i;
@@ -903,22 +885,4 @@
 		return;
 	}
 	S_StartSound (cl.viewentity, -1, sfx, vec3_origin, 1, 1);
-}
-
-
-void
-S_ClearPrecache (void)
-{
-}
-
-
-void
-S_BeginPrecaching (void)
-{
-}
-
-
-void
-S_EndPrecaching (void)
-{
 }
Index: twilight/src/nq/sv_main.c
diff -u twilight/src/nq/sv_main.c:1.36 twilight/src/nq/sv_main.c:1.37
--- twilight/src/nq/sv_main.c:1.36	Mon Sep 30 05:29:40 2002
+++ twilight/src/nq/sv_main.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_main.c,v 1.36 2002/09/30 09:29:40 warp Exp $";
+    "$Id: sv_main.c,v 1.37 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -219,13 +219,11 @@
 
 /*
 ================
-SV_SendServerinfo
-
 Sends the first message from the server to a connected client.
 This will be sent on the initial connection and upon each server load.
 ================
 */
-void
+static void
 SV_SendServerinfo (client_t *client)
 {
 	char      **s;
@@ -281,7 +279,7 @@
 once for a player each game, not once for each level change.
 ================
 */
-void
+static void
 SV_ConnectClient (int clientnum)
 {
 	edict_t				*ent;
@@ -402,7 +400,7 @@
 int         fatbytes;
 Uint8       fatpvs[MAX_MAP_LEAFS / 8];
 
-void
+static void
 SV_AddToFatPVS (vec3_t org, mnode_t *node)
 {
 	int         i;
@@ -442,7 +440,7 @@
 given point.
 =============
 */
-Uint8 *
+static Uint8 *
 SV_FatPVS (vec3_t org)
 {
 	fatbytes = (sv.worldmodel->brush->numleafs + 31) >> 3;
@@ -453,14 +451,8 @@
 
 //=============================================================================
 
-
-/*
-=============
-SV_WriteEntitiesToClient
 
-=============
-*/
-void
+static void
 SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg)
 {
 	Uint32		e, i;
@@ -582,7 +574,7 @@
 
 =============
 */
-void
+static void
 SV_CleanupEnts (void)
 {
 	Uint32		e;
@@ -727,12 +719,7 @@
 		MSG_WriteByte (msg, ent->v.weapon);
 }
 
-/*
-=======================
-SV_SendClientDatagram
-=======================
-*/
-qboolean
+static qboolean
 SV_SendClientDatagram (client_t *client)
 {
 	Uint8       buf[MAX_DATAGRAM];
@@ -763,12 +750,7 @@
 	return true;
 }
 
-/*
-=======================
-SV_UpdateToReliableMessages
-=======================
-*/
-void
+static void
 SV_UpdateToReliableMessages (void)
 {
 	Uint32		i, j;
@@ -803,13 +785,11 @@
 
 /*
 =======================
-SV_SendNop
-
 Send a nop message without trashing or sending the accumulated client
 message buffer
 =======================
 */
-void
+static void
 SV_SendNop (client_t *client)
 {
 	sizebuf_t   msg;
@@ -933,7 +913,7 @@
 
 ================
 */
-void
+static void
 SV_CreateBaseline (void)
 {
 	int			i;
@@ -984,12 +964,10 @@
 
 /*
 ================
-SV_SendReconnect
-
 Tell all the clients that the server is changing levels
 ================
 */
-void
+static void
 SV_SendReconnect (void)
 {
 	Uint8		data[128];
Index: twilight/src/nq/sv_move.c
diff -u twilight/src/nq/sv_move.c:1.11 twilight/src/nq/sv_move.c:1.12
--- twilight/src/nq/sv_move.c:1.11	Mon Jun  3 08:00:37 2002
+++ twilight/src/nq/sv_move.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_move.c,v 1.11 2002/06/03 12:00:37 mercury Exp $";
+    "$Id: sv_move.c,v 1.12 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -36,8 +36,6 @@
 
 /*
 =============
-SV_CheckBottom
-
 Returns false if any part of the bottom of the entity is off an edge that
 is not a staircase.
 
@@ -109,8 +107,6 @@
 
 /*
 =============
-SV_movestep
-
 Called by monster program code.
 The move will be adjusted for slopes and stairs, but if the move isn't
 possible, no move is done, false is returned, and
@@ -229,15 +225,13 @@
 
 /*
 ======================
-SV_StepDirection
-
 Turns to the movement direction, and walks the current distance if
 facing it.
 
 ======================
 */
 void        PF_changeyaw (void);
-qboolean
+static qboolean
 SV_StepDirection (edict_t *ent, float yaw, float dist)
 {
 	vec3_t      move, oldorigin;
@@ -265,14 +259,8 @@
 
 	return false;
 }
-
-/*
-======================
-SV_FixCheckBottom
 
-======================
-*/
-void
+static void
 SV_FixCheckBottom (edict_t *ent)
 {
 //  Con_Printf ("SV_FixCheckBottom\n");
@@ -282,14 +270,8 @@
 
 
 
-/*
-================
-SV_NewChaseDir
-
-================
-*/
 #define	DI_NODIR	-1
-void
+static void
 SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
 {
 	float       deltax, deltay;
@@ -325,7 +307,7 @@
 			return;
 	}
 // try other directions
-	if (((rand () & 3) & 1) || Q_abs (deltay) > Q_abs (deltax)) {
+	if (((rand () & 3) & 1) || abs (deltay) > abs (deltax)) {
 		tdir = d[1];
 		d[1] = d[2];
 		d[2] = tdir;
@@ -368,13 +350,7 @@
 
 }
 
-/*
-======================
-SV_CloseEnough
-
-======================
-*/
-qboolean
+static qboolean
 SV_CloseEnough (edict_t *ent, edict_t *goal, float dist)
 {
 	int         i;
@@ -388,12 +364,6 @@
 	return true;
 }
 
-/*
-======================
-SV_MoveToGoal
-
-======================
-*/
 void
 SV_MoveToGoal (void)
 {
Index: twilight/src/nq/sv_phys.c
diff -u twilight/src/nq/sv_phys.c:1.39 twilight/src/nq/sv_phys.c:1.40
--- twilight/src/nq/sv_phys.c:1.39	Mon Oct 28 12:25:08 2002
+++ twilight/src/nq/sv_phys.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_phys.c,v 1.39 2002/10/28 17:25:08 warp Exp $";
+    "$Id: sv_phys.c,v 1.40 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -69,41 +69,9 @@
 #define	MOVE_EPSILON	0.01
 
 extern trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end);
-void SV_Physics_Toss (edict_t *ent);
+static void SV_Physics_Toss (edict_t *ent);
 
-/*
-================
-SV_CheckAllEnts
-================
-*/
-void SV_CheckAllEnts (void)
-{
-	unsigned int	e;
-	edict_t			*check;
-
-	// see if any solid entities are inside the final position
-	check = NEXT_EDICT(sv.edicts);
-	for (e = 1 ; e < sv.num_edicts ; e++, check = NEXT_EDICT(check))
-	{
-		if (check->free)
-			continue;
-		if (check->v.movetype == MOVETYPE_PUSH
-		|| check->v.movetype == MOVETYPE_NONE
-		|| check->v.movetype == MOVETYPE_FOLLOW
-		|| check->v.movetype == MOVETYPE_NOCLIP)
-			continue;
-
-		if (SV_TestEntityPosition (check))
-			Com_Printf ("entity in invalid position\n");
-	}
-}
-
-/*
-================
-SV_CheckVelocity
-================
-*/
-void
+static void
 SV_CheckVelocity (edict_t *ent)
 {
 	int		i;
@@ -132,15 +100,13 @@
 
 /*
 =============
-SV_RunThink
-
 Runs thinking code if time.  There is some play in the exact time the think
 function will be called, because it is called before any movement is done
 in a frame.  Not used for pushmove objects, because they must be exact.
 Returns false if the entity removed itself.
 =============
 */
-qboolean
+static qboolean
 SV_RunThink (edict_t *ent)
 {
 	double	thinktime;
@@ -163,12 +129,10 @@
 
 /*
 ==================
-SV_Impact
-
 Two entities have touched, so run their touch functions
 ==================
 */
-void
+static void
 SV_Impact (edict_t *e1, edict_t *e2)
 {
 	int	old_self, old_other;
@@ -203,7 +167,7 @@
 */
 #define	STOP_EPSILON	0.1
 
-int
+static int
 ClipVelocity (vec3_t in, dvec3_t normal, vec3_t out, double overbounce)
 {
 	double	backoff;
@@ -230,8 +194,6 @@
 
 /*
 ============
-SV_FlyMove
-
 The basic solid body movement clip that slides along multiple planes
 Returns the clipflags if the velocity was modified (hit something solid)
 1 = floor
@@ -245,7 +207,8 @@
 //  angled corners, which you could get stuck on, now they are just a one
 //  frame hiccup)
 #define	MAX_CLIP_PLANES	20
-int SV_FlyMove (edict_t *ent, double time, trace_t *steptrace)
+static int
+SV_FlyMove (edict_t *ent, double time, trace_t *steptrace)
 {
 	int		bumpcount, numbumps, numplanes, i, j, blocked;
 	dvec3_t	planes[MAX_CLIP_PLANES];
@@ -364,13 +327,7 @@
 	return blocked;
 }
 
-/*
-============
-SV_AddGravity
-
-============
-*/
-void
+static void
 SV_AddGravity (edict_t *ent)
 {
 	double		ent_gravity;
@@ -399,12 +356,10 @@
 
 /*
 ============
-SV_PushEntity
-
 Does not change the entities velocity at all
 ============
 */
-trace_t
+static trace_t
 SV_PushEntity (edict_t *ent, vec3_t push, vec3_t pushangles)
 {
 	trace_t	trace;
@@ -436,22 +391,9 @@
 
 	return trace;
 }
-
-model_t *SV_GetModelFromEdict(edict_t *e)
-{
-	int i = e->v.modelindex;
-	if (i <= 0 || i >= MAX_MODELS)
-		return NULL;
-	return sv.models[i];
-}
-
-/*
-============
-SV_PushMove
 
-============
-*/
-void SV_PushMove (edict_t *pusher, double movetime)
+static void
+SV_PushMove (edict_t *pusher, double movetime)
 {
 	unsigned int	e;
 	int				i, index, num_moved;
@@ -637,14 +579,9 @@
 		}
 	}
 }
-
-/*
-================
-SV_Physics_Pusher
 
-================
-*/
-void SV_Physics_Pusher (edict_t *ent)
+static void
+SV_Physics_Pusher (edict_t *ent)
 {
 	double	thinktime;
 	double	oldltime;
@@ -687,13 +624,11 @@
 
 /*
 =============
-SV_CheckStuck
-
 This is a big hack to try and fix the rare case of getting stuck in the world
 clipping hull.
 =============
 */
-void
+static void
 SV_CheckStuck (edict_t *ent)
 {
 	int         i, j;
@@ -731,12 +666,7 @@
 }
 
 
-/*
-=============
-SV_CheckWater
-=============
-*/
-qboolean
+static qboolean
 SV_CheckWater (edict_t *ent)
 {
 	vec3_t      point;
@@ -765,14 +695,8 @@
 
 	return ent->v.waterlevel > 1;
 }
-
-/*
-============
-SV_WallFriction
 
-============
-*/
-void
+static void
 SV_WallFriction (edict_t *ent, trace_t *trace)
 {
 	vec3_t      forward; //, right, up;
@@ -800,8 +724,6 @@
 
 /*
 =====================
-SV_TryUnstick
-
 Player has come to a dead stop, possibly due to the problem with limited
 float precision at some angle joins in the BSP hull.
 
@@ -810,7 +732,7 @@
 This is a hack, but in the interest of good gameplay...
 ======================
 */
-int
+static int
 SV_TryUnstick (edict_t *ent, vec3_t oldvel)
 {
 	int		i, clip;
@@ -880,12 +802,10 @@
 
 /*
 =====================
-SV_WalkMove
-
 Only used by players
 ======================
 */
-void
+static void
 SV_WalkMove (edict_t *ent)
 {
 	vec3_t	upmove, downmove, oldorg, oldvel, nosteporg, nostepvel;
@@ -981,12 +901,10 @@
 
 /*
 ================
-SV_Physics_Client
-
 Player character actions
 ================
 */
-void
+static void
 SV_Physics_Client (edict_t *ent, int num)
 {
 	if (!svs.clients[num - 1].active)
@@ -1055,13 +973,12 @@
 
 /*
 =============
-SV_Physics_Follow
-
 LordHavoc
 Entities that are "stuck" to another entity
 =============
 */
-void SV_Physics_Follow (edict_t *ent)
+static void
+SV_Physics_Follow (edict_t *ent)
 {
 	vec3_t	vf, vr, vu, angles, v;
 	edict_t	*e;
@@ -1099,12 +1016,10 @@
 
 /*
 =============
-SV_Physics_Noclip
-
 A moving object that doesn't obey physics
 =============
 */
-void
+static void
 SV_Physics_Noclip (edict_t *ent)
 {
 	// regular thinking
@@ -1125,13 +1040,7 @@
 ==============================================================================
 */
 
-/*
-=============
-SV_CheckWaterTransition
-
-=============
-*/
-void
+static void
 SV_CheckWaterTransition (edict_t *ent)
 {
 	int cont;
@@ -1166,12 +1075,11 @@
 
 /*
 =============
-SV_Physics_Toss
-
 Toss, bounce, and fly movement.  When onground, do nothing.
 =============
 */
-void SV_Physics_Toss (edict_t *ent)
+static void
+SV_Physics_Toss (edict_t *ent)
 {
 	trace_t	trace;
 	vec3_t	move;
@@ -1263,8 +1171,6 @@
 
 /*
 =============
-SV_Physics_Step
-
 Monsters freefall when they don't have a ground entity, otherwise
 all movement is done with discrete steps.
 
@@ -1272,7 +1178,7 @@
 will fall if the floor is pulled out from under them.
 =============
 */
-void
+static void
 SV_Physics_Step (edict_t *ent)
 {
 	int flags, fall, hitsound;
@@ -1322,14 +1228,9 @@
 }
 
 //============================================================================
-
-/*
-================
-SV_Physics
 
-================
-*/
-void SV_Physics (void)
+void
+SV_Physics (void)
 {
 	unsigned int	i;
 	edict_t			*ent;
@@ -1403,7 +1304,8 @@
 	sv.time += host_frametime;
 }
 
-trace_t SV_Trace_Toss (edict_t *tossent, edict_t *ignore)
+trace_t
+SV_Trace_Toss (edict_t *tossent, edict_t *ignore)
 {
 	int		i;
 	edict_t	tempent, *tent;
Index: twilight/src/nq/sv_user.c
diff -u twilight/src/nq/sv_user.c:1.28 twilight/src/nq/sv_user.c:1.29
--- twilight/src/nq/sv_user.c:1.28	Mon Sep 30 05:29:40 2002
+++ twilight/src/nq/sv_user.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_user.c,v 1.28 2002/09/30 09:29:40 warp Exp $";
+    "$Id: sv_user.c,v 1.29 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -67,11 +67,6 @@
 usercmd_t	cmd;
 
 
-/*
-===============
-SV_SetIdealPitch
-===============
-*/
 #define	MAX_FORWARD	6
 void
 SV_SetIdealPitch (void)
@@ -134,14 +129,8 @@
 	sv_player->v.idealpitch = -dir * sv_idealpitchscale->fvalue;
 }
 
-
-/*
-==================
-SV_UserFriction
 
-==================
-*/
-void
+static void
 SV_UserFriction (void)
 {
 	float      *vel;
@@ -182,13 +171,7 @@
 	}
 }
 
-/*
-==============
-SV_Accelerate
-==============
-*/
-
-void
+static void
 SV_Accelerate (void)
 {
 	int         i;
@@ -206,7 +189,7 @@
 		velocity[i] += accelspeed * wishdir[i];
 }
 
-void
+static void
 SV_AirAccelerate (vec3_t wishveloc)
 {
 	int         i;
@@ -228,7 +211,7 @@
 }
 
 
-void
+static void
 DropPunchAngle (void)
 {
 	float	len;
@@ -252,13 +235,7 @@
 	}
 }
 
-/*
-===================
-SV_FreeMove
-
-===================
-*/
-void
+static void
 SV_FreeMove (void)
 {
 	int			i;
@@ -278,14 +255,8 @@
 		wishspeed = sv_maxspeed->fvalue;
 	}
 }
-
-/*
-===================
-SV_WaterMove
 
-===================
-*/
-void
+static void
 SV_WaterMove (void)
 {
 	int         i;
@@ -343,7 +314,7 @@
 		velocity[i] += accelspeed * wishvel[i];
 }
 
-void
+static void
 SV_WaterJump (void)
 {
 	if (sv.time > sv_player->v.teleport_time || !sv_player->v.waterlevel) {
@@ -354,14 +325,8 @@
 	sv_player->v.velocity[1] = sv_player->v.movedir[1];
 }
 
-
-/*
-===================
-SV_AirMove
 
-===================
-*/
-void
+static void
 SV_AirMove (void)
 {
 	int			i;
@@ -408,13 +373,11 @@
 
 /*
 ===================
-SV_ClientThink
-
 the move fields specify an intended velocity in pix/sec
 the angle fields specify an exact angular motion in degrees
 ===================
 */
-void
+static void
 SV_ClientThink (void)
 {
 	vec3_t		v_angle;
@@ -473,12 +436,7 @@
 }
 
 
-/*
-===================
-SV_ReadClientMove
-===================
-*/
-void
+static void
 SV_ReadClientMove (usercmd_t *move)
 {
 	int		i, bits;
@@ -542,12 +500,10 @@
 
 /*
 ===================
-SV_ReadClientMessage
-
 Returns false if the client should be killed
 ===================
 */
-qboolean
+static qboolean
 SV_ReadClientMessage (void)
 {
 	int		ret;
@@ -641,11 +597,6 @@
 }
 
 
-/*
-==================
-SV_RunClients
-==================
-*/
 void
 SV_RunClients (void)
 {
Index: twilight/src/nq/teamplay.c
diff -u twilight/src/nq/teamplay.c:1.2 twilight/src/nq/teamplay.c:1.3
--- twilight/src/nq/teamplay.c:1.2	Wed Jan 29 15:00:42 2003
+++ twilight/src/nq/teamplay.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: teamplay.c,v 1.2 2003/01/29 20:00:42 warp Exp $
+	$Id: teamplay.c,v 1.3 2003/04/18 21:09:15 warp Exp $
 */
 
 #include "twiconfig.h"
@@ -226,7 +226,7 @@
 	cl_parsesay = Cvar_Get ("cl_parsesay", "0", CVAR_NONE, NULL);
 }
 
-void
+static void
 Team_loc (void)
 {
 	char		*desc = NULL;
Index: twilight/src/nq/vid_sdl.c
diff -u twilight/src/nq/vid_sdl.c:1.117 twilight/src/nq/vid_sdl.c:1.118
--- twilight/src/nq/vid_sdl.c:1.117	Thu Apr 17 23:01:08 2003
+++ twilight/src/nq/vid_sdl.c	Fri Apr 18 17:09:15 2003
@@ -24,7 +24,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: vid_sdl.c,v 1.117 2003/04/18 03:01:08 warp Exp $";
+    "$Id: vid_sdl.c,v 1.118 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -66,8 +66,8 @@
 
 /*-----------------------------------------------------------------------*/
 
-void I_KeypadMode (cvar_t *cvar);
-void IN_WindowedMouse (cvar_t *cvar);
+static void I_KeypadMode (cvar_t *cvar);
+static void IN_WindowedMouse (cvar_t *cvar);
 
 /*-----------------------------------------------------------------------*/
 void
@@ -81,7 +81,7 @@
 GL_Init
 ===============
 */
-void
+static void
 GL_Init (void)
 {
 	qglFinish ();
@@ -480,12 +480,6 @@
 
 
 void
-Force_CenterView_f (void)
-{
-	cl.viewangles[PITCH] = 0;
-}
-
-void
 IN_Init (void)
 {
 	mouse_x = 0.0f;
@@ -498,7 +492,7 @@
 {
 }
 
-void
+static void
 IN_WindowedMouse (cvar_t *cvar)
 {
 	cvar = cvar;
@@ -518,7 +512,7 @@
 		SDL_WM_GrabInput (SDL_GRAB_ON);
 }
 
-void
+static void
 I_KeypadMode (cvar_t *cvar)
 {
 	keypadmode = !!cvar->ivalue;
Index: twilight/src/nq/view.c
diff -u twilight/src/nq/view.c:1.47 twilight/src/nq/view.c:1.48
--- twilight/src/nq/view.c:1.47	Wed Jan 29 15:00:42 2003
+++ twilight/src/nq/view.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: view.c,v 1.47 2003/01/29 20:00:42 warp Exp $";
+    "$Id: view.c,v 1.48 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -95,12 +95,6 @@
 
 extern int in_forward, in_forward2, in_back;
 
-/*
-===============
-V_CalcRoll
-
-===============
-*/
 float
 V_CalcRoll (vec3_t angles, vec3_t velocity)
 {
@@ -125,13 +119,7 @@
 }
 
 
-/*
-===============
-V_CalcBob
-
-===============
-*/
-float
+static float
 V_CalcBob (void)
 {
 	float       bob;
@@ -184,8 +172,6 @@
 
 /*
 ===============
-V_DriftPitch
-
 Moves the client pitch angle towards cl.idealpitch sent by the server.
 
 If the user is adjusting pitch manually, either with lookup/lookdown,
@@ -195,7 +181,7 @@
 lookspring is non 0
 ===============
 */
-void
+static void
 V_DriftPitch (void)
 {
 	float	delta, move;
@@ -258,11 +244,6 @@
 
 float       v_blend[4];					// rgba 0.0 - 1.0
 
-/*
-===============
-V_ParseDamage
-===============
-*/
 void
 V_ParseDamage (void)
 {
@@ -323,12 +304,7 @@
 	v_dmg_time = v_kicktime->fvalue;
 }
 
-/*
-==================
-V_cshift_f
-==================
-*/
-void
+static void
 V_cshift_f (void)
 {
 	cshift_empty.destcolor[0] = Q_atoi(Cmd_Argv (1));
@@ -339,12 +315,10 @@
 
 /*
 ==================
-V_BonusFlash_f
-
 When you run over an item, the server sends this command
 ==================
 */
-void
+static void
 V_BonusFlash_f (void)
 {
 	cl.cshifts[CSHIFT_BONUS].destcolor[0] = 215;
@@ -355,8 +329,6 @@
 
 /*
 =============
-V_SetContentsColor
-
 Underwater, lava, etc each has a color shift
 =============
 */
@@ -384,12 +356,7 @@
 	}
 }
 
-/*
-=============
-V_CalcPowerupCshift
-=============
-*/
-void
+static void
 V_CalcPowerupCshift (void)
 {
 	if (cl.items & IT_QUAD) {
@@ -416,11 +383,6 @@
 		cl.cshifts[CSHIFT_POWERUP].percent = 0;
 }
 
-/*
-=============
-V_CalcBlend
-=============
-*/
 void
 V_CalcBlend (void)
 {
@@ -456,11 +418,6 @@
 	v_blend[3] = bound(0, a				 , 1);
 }
 
-/*
-=============
-V_UpdatePalette
-=============
-*/
 void
 V_UpdatePalette (void)
 {
@@ -499,12 +456,7 @@
 ==============================================================================
 */
 
-/*
-==============
-V_BoundOffsets
-==============
-*/
-void
+static void
 V_BoundOffsets (void)
 {
 	vec3_t org;
@@ -520,12 +472,10 @@
 
 /*
 ==============
-V_AddIdle
-
 Idle swaying
 ==============
 */
-void
+static void
 V_AddIdle (void)
 {
 	r_refdef.viewangles[ROLL] +=
@@ -553,12 +503,10 @@
 
 /*
 ==============
-V_CalcViewRoll
-
 Roll is induced by movement and damage
 ==============
 */
-void
+static void
 V_CalcViewRoll (void)
 {
 	float       side;
@@ -576,13 +524,7 @@
 		r_refdef.viewangles[ROLL] = 80; // dead view angle
 }
 
-/*
-==================
-V_CalcIntermissionRefdef
-
-==================
-*/
-void
+static void
 V_CalcIntermissionRefdef (void)
 {
 	/* ent is the player model (visible when out of body) */
@@ -601,11 +543,6 @@
 		v_iyaw_level->fvalue;
 }
 
-/*
-==================
-V_AddEntity
-==================
-*/
 void
 V_AddEntity ( entity_t *ent )
 {
@@ -617,24 +554,13 @@
 	r_refdef.entities[r_refdef.num_entities++] = &ent->common;
 }
 
-/*
-==================
-V_ClearEntities
-==================
-*/
 void
 V_ClearEntities ( void )
 {
 	r_refdef.num_entities = 0;
 }
 
-/*
-==================
-V_CalcRefdef
-
-==================
-*/
-void
+static void
 V_CalcRefdef (void)
 {
 	entity_t		*ent;
@@ -744,8 +670,6 @@
 
 /*
 ==================
-V_RenderView
-
 The player's clipping box goes from (-16 -16 -24) to (16 16 32) from
 the entity origin, so any view position inside that will be valid
 ==================
@@ -787,11 +711,6 @@
 }
 
 
-/*
-=============
-V_Init_Cvars
-=============
-*/
 void
 V_Init_Cvars (void)
 {
@@ -835,11 +754,6 @@
 	v_centerspeed = Cvar_Get ("v_centerspeed", "500", CVAR_NONE, NULL);
 }
 
-/*
-=============
-V_Init
-=============
-*/
 void
 V_Init (void)
 {
Index: twilight/src/nq/world.c
diff -u twilight/src/nq/world.c:1.29 twilight/src/nq/world.c:1.30
--- twilight/src/nq/world.c:1.29	Tue Aug  6 10:59:08 2002
+++ twilight/src/nq/world.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: world.c,v 1.29 2002/08/06 14:59:08 warp Exp $";
+    "$Id: world.c,v 1.30 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -84,7 +84,7 @@
 
 ===============
 */
-areanode_t *
+static areanode_t *
 SV_CreateAreaNode (int depth, vec3_t mins, vec3_t maxs)
 {
 	areanode_t *anode;
@@ -161,7 +161,7 @@
 SV_TouchLinks
 ====================
 */
-void
+static void
 SV_TouchLinks (edict_t *ent, areanode_t *node)
 {
 	link_t     *l, *next;
@@ -207,13 +207,7 @@
 }
 
 
-/*
-===============
-SV_FindTouchedLeafs
-
-===============
-*/
-void
+static void
 SV_FindTouchedLeafs (edict_t *ent, mnode_t *node)
 {
 	mplane_t   *splitplane;
@@ -471,12 +465,10 @@
 
 /*
 ====================
-SV_ClipToLinks
-
 Mins and maxs enclose the entire area swept by the move
 ====================
 */
-void
+static void
 SV_ClipToLinks (areanode_t *node, moveclip_t * clip)
 {
 	link_t     *l;
@@ -576,7 +568,7 @@
 SV_MoveBounds
 ==================
 */
-void
+static void
 SV_MoveBounds (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end,
 			   vec3_t boxmins, vec3_t boxmaxs)
 {
Index: twilight/src/qw/cl_cam.c
diff -u twilight/src/qw/cl_cam.c:1.28 twilight/src/qw/cl_cam.c:1.29
--- twilight/src/qw/cl_cam.c:1.28	Sat Jun  8 00:22:23 2002
+++ twilight/src/qw/cl_cam.c	Fri Apr 18 17:09:15 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: cl_cam.c,v 1.28 2002/06/08 04:22:23 mercury Exp $";
+    "$Id: cl_cam.c,v 1.29 2003/04/18 21:09:15 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -76,7 +76,7 @@
 	return true;
 }
 
-void
+static void
 Cam_Unlock (void)
 {
 	if (autocam) {
@@ -87,7 +87,7 @@
 	}
 }
 
-void
+static void
 Cam_Lock (int playernum)
 {
 	char	st[40];
@@ -100,7 +100,7 @@
 	locked = false;
 }
 
-trace_t *
+static trace_t *
 Cam_DoTrace (vec3_t vec1, vec3_t vec2)
 {
 	VectorCopy (vec1, pmove.origin);
Index: twilight/src/qw/cl_demo.c
diff -u twilight/src/qw/cl_demo.c:1.28 twilight/src/qw/cl_demo.c:1.29
--- twilight/src/qw/cl_demo.c:1.28	Wed Jan 29 15:00:42 2003
+++ twilight/src/qw/cl_demo.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: cl_demo.c,v 1.28 2003/01/29 20:00:42 warp Exp $";
+    "$Id: cl_demo.c,v 1.29 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -35,7 +35,7 @@
 #include "sys.h"
 #include "strlib.h"
 
-void CL_FinishTimeDemo (void);
+static void CL_FinishTimeDemo (void);
 
 /*
 ==============================================================================
@@ -127,7 +127,7 @@
 Dumps the current net message, prefixed by the length and view angles
 ====================
 */
-void
+static void
 CL_WriteDemoMessage (sizebuf_t *msg)
 {
 	int		len;
@@ -157,7 +157,7 @@
   FIXME...
 ====================
 */
-qboolean
+static qboolean
 CL_GetDemoMessage (void)
 {
 	int			r, i, j;
@@ -322,7 +322,7 @@
 Dumps the current net message, prefixed by the length and view angles
 ====================
 */
-void
+static void
 CL_WriteRecordDemoMessage (sizebuf_t *msg, int seq)
 {
 	int		len, i;
@@ -350,7 +350,7 @@
 	fflush (cls.demofile);
 }
 
-void
+static void
 CL_WriteSetDemoMessage (void)
 {
 	int		len;
@@ -728,7 +728,7 @@
 
 ====================
 */
-void
+static void
 CL_FinishTimeDemo (void)
 {
 	int		frames;
Index: twilight/src/qw/cl_ents.c
diff -u twilight/src/qw/cl_ents.c:1.82 twilight/src/qw/cl_ents.c:1.83
--- twilight/src/qw/cl_ents.c:1.82	Wed Jan 29 15:00:42 2003
+++ twilight/src/qw/cl_ents.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-	"$Id: cl_ents.c,v 1.82 2003/01/29 20:00:42 warp Exp $";
+	"$Id: cl_ents.c,v 1.83 2003/04/18 21:09:17 warp Exp $";
 
 #include <SDL.h>
 
@@ -115,7 +115,7 @@
 CL_NewDlight
 ===============
 */
-void
+static void
 CL_NewDlight (int key, vec3_t org, int effects)
 {
 	dlight_t   *dl = CL_AllocDlight (key);
@@ -190,7 +190,7 @@
 Can go from either a baseline or a previous packet_entity
 ==================
 */
-void
+static void
 CL_ParseDelta (entity_state_t *from, entity_state_t *to, int bits)
 {
 	int         i;
@@ -252,7 +252,7 @@
 FlushEntityPacket
 =================
 */
-void
+static void
 FlushEntityPacket (void)
 {
 	int         word;
@@ -591,7 +591,7 @@
 
 ===============
 */
-void
+static void
 CL_LinkPacketEntities (void)
 {
 	entity_t			*ent;
@@ -747,7 +747,7 @@
 
 =============
 */
-void
+static void
 CL_LinkProjectiles (void)
 {
 	int         i;
@@ -884,7 +884,7 @@
 Called when the CTF flags are set
 ================
 */
-void
+static void
 CL_AddFlagModels (entity_t *ent, int team)
 {
 	int         i;
@@ -960,7 +960,7 @@
 for all current players
 =============
 */
-void
+static void
 CL_LinkPlayers (void)
 {
 	int         j;
@@ -1155,7 +1155,7 @@
 	}
 }
 
-void
+static void
 CL_LinkStaticEntites (void)
 {
 	int		i;
Index: twilight/src/qw/cl_input.c
diff -u twilight/src/qw/cl_input.c:1.38 twilight/src/qw/cl_input.c:1.39
--- twilight/src/qw/cl_input.c:1.38	Fri Feb 21 01:33:00 2003
+++ twilight/src/qw/cl_input.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: cl_input.c,v 1.38 2003/02/21 06:33:00 warp Exp $";
+    "$Id: cl_input.c,v 1.39 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -85,7 +85,7 @@
 int         in_impulse;
 
 
-void
+static void
 KeyDown (kbutton_t *b)
 {
 	int         k;
@@ -115,7 +115,7 @@
 	b->state |= 1 + 2;					// down + impulse down
 }
 
-void
+static void
 KeyUp (kbutton_t *b)
 {
 	int         k;
@@ -148,25 +148,25 @@
 	b->state |= 4;						// impulse up
 }
 
-void
+static void
 IN_KLookDown (void)
 {
 	KeyDown (&in_klook);
 }
 
-void
+static void
 IN_KLookUp (void)
 {
 	KeyUp (&in_klook);
 }
 
-void
+static void
 IN_MLookDown (void)
 {
 	KeyDown (&in_mlook);
 }
 
-void
+static void
 IN_MLookUp (void)
 {
 	KeyUp (&in_mlook);
@@ -174,187 +174,187 @@
 		V_StartPitchDrift ();
 }
 
-void
+static void
 IN_UpDown (void)
 {
 	KeyDown (&in_up);
 }
 
-void
+static void
 IN_UpUp (void)
 {
 	KeyUp (&in_up);
 }
 
-void
+static void
 IN_DownDown (void)
 {
 	KeyDown (&in_down);
 }
 
-void
+static void
 IN_DownUp (void)
 {
 	KeyUp (&in_down);
 }
 
-void
+static void
 IN_LeftDown (void)
 {
 	KeyDown (&in_left);
 }
 
-void
+static void
 IN_LeftUp (void)
 {
 	KeyUp (&in_left);
 }
 
-void
+static void
 IN_RightDown (void)
 {
 	KeyDown (&in_right);
 }
 
-void
+static void
 IN_RightUp (void)
 {
 	KeyUp (&in_right);
 }
 
-void
+static void
 IN_ForwardDown (void)
 {
 	KeyDown (&in_forward);
 }
 
-void
+static void
 IN_ForwardUp (void)
 {
 	KeyUp (&in_forward);
 }
 
-void
+static void
 IN_BackDown (void)
 {
 	KeyDown (&in_back);
 }
 
-void
+static void
 IN_BackUp (void)
 {
 	KeyUp (&in_back);
 }
 
-void
+static void
 IN_LookupDown (void)
 {
 	KeyDown (&in_lookup);
 }
 
-void
+static void
 IN_LookupUp (void)
 {
 	KeyUp (&in_lookup);
 }
 
-void
+static void
 IN_LookdownDown (void)
 {
 	KeyDown (&in_lookdown);
 }
 
-void
+static void
 IN_LookdownUp (void)
 {
 	KeyUp (&in_lookdown);
 }
 
-void
+static void
 IN_MoveleftDown (void)
 {
 	KeyDown (&in_moveleft);
 }
 
-void
+static void
 IN_MoveleftUp (void)
 {
 	KeyUp (&in_moveleft);
 }
 
-void
+static void
 IN_MoverightDown (void)
 {
 	KeyDown (&in_moveright);
 }
 
-void
+static void
 IN_MoverightUp (void)
 {
 	KeyUp (&in_moveright);
 }
 
-void
+static void
 IN_SpeedDown (void)
 {
 	KeyDown (&in_speed);
 }
 
-void
+static void
 IN_SpeedUp (void)
 {
 	KeyUp (&in_speed);
 }
 
-void
+static void
 IN_StrafeDown (void)
 {
 	KeyDown (&in_strafe);
 }
 
-void
+static void
 IN_StrafeUp (void)
 {
 	KeyUp (&in_strafe);
 }
 
-void
+static void
 IN_AttackDown (void)
 {
 	KeyDown (&in_attack);
 }
 
-void
+static void
 IN_AttackUp (void)
 {
 	KeyUp (&in_attack);
 }
 
-void
+static void
 IN_UseDown (void)
 {
 	KeyDown (&in_use);
 }
 
-void
+static void
 IN_UseUp (void)
 {
 	KeyUp (&in_use);
 }
 
-void
+static void
 IN_JumpDown (void)
 {
 	KeyDown (&in_jump);
 }
 
-void
+static void
 IN_JumpUp (void)
 {
 	KeyUp (&in_jump);
 }
 
-void
+static void
 IN_Impulse (void)
 {
 	in_impulse = Q_atoi (Cmd_Argv (1));
@@ -376,7 +376,7 @@
 1.0 if held for the entire time
 ===============
 */
-float
+static float
 CL_KeyState (kbutton_t *key)
 {
 	float       val;
@@ -442,7 +442,7 @@
 Moves the local angle positions
 ================
 */
-void
+static void
 CL_AdjustAngles (void)
 {
 	float       speed;
@@ -489,7 +489,7 @@
 Send the intended movement message to the server
 ================
 */
-void
+static void
 CL_BaseMove (usercmd_t *cmd)
 {
 	CL_AdjustAngles ();
@@ -537,7 +537,7 @@
 CL_FinishMove
 ==============
 */
-void
+static void
 CL_FinishMove (usercmd_t *cmd)
 {
 	int         i;
@@ -686,7 +686,25 @@
 	Netchan_Transmit (&cls.netchan, buf.cursize, buf.data);
 }
 
+/*
+	CL_InputSetRepeatDelay
+*/
+static void
+CL_InputSetRepeatDelay (struct cvar_s *var)
+{
+	SDL_EnableKeyRepeat(var->ivalue, (in_key_repeat_interval) ?
+			in_key_repeat_interval->ivalue : SDL_DEFAULT_REPEAT_INTERVAL);
+}
 
+/*
+	CL_InputSetRepeatDelay
+*/
+static void
+CL_InputSetRepeatInterval (struct cvar_s *var)
+{
+	SDL_EnableKeyRepeat((in_key_repeat_delay) ? in_key_repeat_delay->ivalue
+			: SDL_DEFAULT_REPEAT_DELAY, var->ivalue);
+}
 
 /*
 ============
@@ -766,34 +784,3 @@
 			va ("%i", SDL_DEFAULT_REPEAT_INTERVAL), CVAR_ARCHIVE,
 			CL_InputSetRepeatInterval);
 }
-
-/*
-	CL_InputSetRepeatDelay
-*/
-void
-CL_InputSetRepeatDelay (struct cvar_s *var)
-{
-	SDL_EnableKeyRepeat(var->ivalue, (in_key_repeat_interval) ?
-			in_key_repeat_interval->ivalue : SDL_DEFAULT_REPEAT_INTERVAL);
-}
-
-/*
-	CL_InputSetRepeatDelay
-*/
-void
-CL_InputSetRepeatInterval (struct cvar_s *var)
-{
-	SDL_EnableKeyRepeat((in_key_repeat_delay) ? in_key_repeat_delay->ivalue
-			: SDL_DEFAULT_REPEAT_DELAY, var->ivalue);
-}
-
-/*
-============
-CL_ClearStates
-============
-*/
-void
-CL_ClearStates (void)
-{
-}
-
Index: twilight/src/qw/cl_main.c
diff -u twilight/src/qw/cl_main.c:1.102 twilight/src/qw/cl_main.c:1.103
--- twilight/src/qw/cl_main.c:1.102	Thu Apr 17 23:01:08 2003
+++ twilight/src/qw/cl_main.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: cl_main.c,v 1.102 2003/04/18 03:01:08 warp Exp $";
+    "$Id: cl_main.c,v 1.103 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -167,7 +167,7 @@
 CL_Quit_f
 ==================
 */
-void
+static void
 CL_Quit_f (void)
 {
 	CL_Disconnect ();
@@ -179,7 +179,7 @@
 CL_Version_f
 ======================
 */
-void
+static void
 CL_Version_f (void)
 {
 	Com_Printf ("Version %s\n", VERSION);
@@ -195,7 +195,7 @@
 called when we get a challenge from the server
 ======================
 */
-void
+static void
 CL_SendConnectPacket (int challenge)
 {
 	netadr_t    adr;
@@ -243,7 +243,7 @@
 
 =================
 */
-void
+static void
 CL_CheckForResend (void)
 {
 	netadr_t    adr;
@@ -289,7 +289,7 @@
 
 ================
 */
-void
+static void
 CL_Connect_f (void)
 {
 	char       *server;
@@ -316,7 +316,7 @@
   an unconnected command.
 =====================
 */
-void
+static void
 CL_Rcon_f (void)
 {
 	char        message[1024];
@@ -443,7 +443,7 @@
 
 }
 
-void
+static void
 CL_Disconnect_f (void)
 {
 	CL_Disconnect ();
@@ -458,7 +458,7 @@
 Dump userdata / masterdata for a user
 ====================
 */
-void
+static void
 CL_User_f (void)
 {
 	int         uid;
@@ -490,7 +490,7 @@
 Dump userids for all current players
 ====================
 */
-void
+static void
 CL_Users_f (void)
 {
 	int         i;
@@ -510,7 +510,7 @@
 	Com_Printf ("%i total users\n", c);
 }
 
-void
+static void
 CL_Color_f (void)
 {
 	// just for quake compatability...
@@ -552,7 +552,7 @@
 Sent by server when serverinfo changes
 ==================
 */
-void
+static void
 CL_FullServerinfo_f (void)
 {
 	char       *p;
@@ -585,7 +585,7 @@
 ==================
 Casey was here :)
 */
-void
+static void
 CL_FullInfo_f (void)
 {
 	char        key[512];
@@ -636,7 +636,7 @@
 Allow clients to change userinfo
 ==================
 */
-void
+static void
 CL_SetInfo_f (void)
 {
 	if (Cmd_Argc () == 1) {
@@ -666,7 +666,7 @@
 Contents allows \n escape character
 ====================
 */
-void
+static void
 CL_Packet_f (void)
 {
 	char        send[2048];
@@ -740,7 +740,7 @@
 drop to full console
 =================
 */
-void
+static void
 CL_Changing_f (void)
 {
 	if (cls.download)					// don't change when downloading
@@ -761,7 +761,7 @@
 The server is changing levels
 =================
 */
-void
+static void
 CL_Reconnect_f (void)
 {
 	if (cls.download)					// don't change when downloading
@@ -792,7 +792,7 @@
 Responses to broadcasts, etc
 =================
 */
-void
+static void
 CL_ConnectionlessPacket (void)
 {
 	char	*s, *cmd, data[6];
@@ -902,7 +902,7 @@
 CL_ReadPackets
 =================
 */
-void
+static void
 CL_ReadPackets (void)
 {
 //  while (NET_GetPacket ())
@@ -946,7 +946,7 @@
 CL_Download_f
 =====================
 */
-void
+static void
 CL_Download_f (void)
 {
 	char       *p, *q;
@@ -983,7 +983,7 @@
 	SZ_Print (&cls.netchan.message, va ("download %s\n", Cmd_Argv (1)));
 }
 
-void 
+static void 
 CL_WriteConfig_f (void)
 {
 	if (Cmd_Argc () != 2) {
@@ -1023,7 +1023,7 @@
 }
 
 // don't forward the first argument
-void
+static void
 Cmd_ForwardToServer_f (void)
 {
 	if (cls.state == ca_disconnected) {
@@ -1045,7 +1045,7 @@
 	}
 }
 
-void
+static void
 Cmd_Say_f (void)
 {
 	char	*s;
@@ -1079,7 +1079,7 @@
 CL_Init_Cvars
 =================
 */
-void
+static void
 CL_Init_Cvars (void)
 {
 	extern cvar_t	*noskins;
@@ -1123,6 +1123,7 @@
 	msg = Cvar_Get ("msg", "1", CVAR_ARCHIVE|CVAR_USERINFO, NULL);
 
 	CL_TEnts_Init_Cvars ();
+	Team_Init_Cvars ();
 }
 
 /*
@@ -1130,7 +1131,7 @@
 CL_Init
 =================
 */
-void
+static void
 CL_Init (void)
 {
 	char			st[80];
@@ -1417,7 +1418,7 @@
 		*buf++ ^= 0xff;
 }
 
-void
+static void
 Host_FixupModelNames (void)
 {
 	simple_decrypt (emodel_name, sizeof (emodel_name) - 1);
Index: twilight/src/qw/cl_parse.c
diff -u twilight/src/qw/cl_parse.c:1.71 twilight/src/qw/cl_parse.c:1.72
--- twilight/src/qw/cl_parse.c:1.71	Thu Apr 17 23:19:30 2003
+++ twilight/src/qw/cl_parse.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-	"$Id: cl_parse.c,v 1.71 2003/04/18 03:19:30 warp Exp $";
+	"$Id: cl_parse.c,v 1.72 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -237,7 +237,7 @@
 Model_NextDownload
 =================
 */
-void
+static void
 Model_NextDownload (void)
 {
 	char       *s;
@@ -309,7 +309,7 @@
 Sound_NextDownload
 =================
 */
-void
+static void
 Sound_NextDownload (void)
 {
 	char       *s;
@@ -352,7 +352,7 @@
 CL_RequestNextDownload
 ======================
 */
-void
+static void
 CL_RequestNextDownload (void)
 {
 	switch (cls.downloadtype) {
@@ -385,7 +385,7 @@
 A download message has been received from the server
 =====================
 */
-void
+static void
 CL_ParseDownload (void)
 {
 	int         size, percent;
@@ -563,7 +563,7 @@
 CL_ParseServerData
 ==================
 */
-void
+static void
 CL_ParseServerData (void)
 {
 	char       *str;
@@ -662,7 +662,7 @@
 CL_ParseSoundlist
 ==================
 */
-void
+static void
 CL_ParseSoundlist (void)
 {
 	int         numsounds;
@@ -703,7 +703,7 @@
 CL_ParseModellist
 ==================
 */
-void
+static void
 CL_ParseModellist (void)
 {
 	int         nummodels;
@@ -770,7 +770,7 @@
 CL_ParseStaticSound
 ===================
 */
-void
+static void
 CL_ParseStaticSound (void)
 {
 	vec3_t      org;
@@ -801,7 +801,7 @@
 CL_ParseStartSoundPacket
 ==================
 */
-void
+static void
 CL_ParseStartSoundPacket (void)
 {
 	vec3_t      pos;
@@ -846,7 +846,7 @@
 Server information pertaining to this client only, sent every frame
 ==================
 */
-void
+static void
 CL_ParseClientdata (void)
 {
 	int         i;
@@ -884,7 +884,7 @@
 CL_ProcessUserInfo
 ==============
 */
-void
+static void
 CL_ProcessUserInfo (int slot, player_info_t *player)
 {
 	Uint8	color;
@@ -926,7 +926,7 @@
 CL_UpdateUserinfo
 ==============
 */
-void
+static void
 CL_UpdateUserinfo (void)
 {
 	int         slot;
@@ -950,7 +950,7 @@
 CL_SetInfo
 ==============
 */
-void
+static void
 CL_SetInfo (void)
 {
 	int         slot;
@@ -1024,7 +1024,7 @@
 CL_ServerInfo
 ==============
 */
-void
+static void
 CL_ServerInfo (void)
 {
 	char        key[MAX_MSGLEN];
@@ -1047,7 +1047,7 @@
 CL_SetStat
 =====================
 */
-void
+static void
 CL_SetStat (int stat, int value)
 {
 	int         j;
@@ -1069,7 +1069,7 @@
 CL_MuzzleFlash
 ==============
 */
-void
+static void
 CL_MuzzleFlash (void)
 {
 	vec3_t      fv;
Index: twilight/src/qw/cl_tent.c
diff -u twilight/src/qw/cl_tent.c:1.44 twilight/src/qw/cl_tent.c:1.45
--- twilight/src/qw/cl_tent.c:1.44	Wed Jan 29 15:00:42 2003
+++ twilight/src/qw/cl_tent.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: cl_tent.c,v 1.44 2003/01/29 20:00:42 warp Exp $";
+    "$Id: cl_tent.c,v 1.45 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -107,41 +107,10 @@
 
 /*
 =================
-CL_AllocExplosion
-=================
-*/
-explosion_t *
-CL_AllocExplosion (void)
-{
-	int         i;
-	float       time;
-	int         index;
-
-	for (i = 0; i < MAX_EXPLOSIONS; i++) {
-		if (!cl_explosions[i].model)
-			return &cl_explosions[i];
-	}
-
-// find the oldest explosion
-	time = cl.time;
-	index = 0;
-
-	for (i = 0; i < MAX_EXPLOSIONS; i++) {
-		if (cl_explosions[i].start < time) {
-			time = cl_explosions[i].start;
-			index = i;
-		}
-	}
-
-	return &cl_explosions[index];
-}
-
-/*
-=================
 CL_ParseBeam
 =================
 */
-void
+static void
 CL_ParseBeam (model_t *m, qboolean lightning)
 {
 	int         ent;
@@ -396,7 +365,7 @@
 CL_UpdateBeams
 =================
 */
-void
+static void
 CL_UpdateBeams (void)
 {
 	int         i;
@@ -451,7 +420,7 @@
 CL_UpdateExplosions
 =================
 */
-void
+static void
 CL_UpdateExplosions (void)
 {
 	int         i;
Index: twilight/src/qw/client.h
diff -u twilight/src/qw/client.h:1.61 twilight/src/qw/client.h:1.62
--- twilight/src/qw/client.h:1.61	Sat Apr  5 04:47:42 2003
+++ twilight/src/qw/client.h	Fri Apr 18 17:09:17 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: client.h,v 1.61 2003/04/05 09:47:42 knghtbrd Exp $
+	$Id: client.h,v 1.62 2003/04/18 21:09:17 warp Exp $
 */
 
 #ifndef __CLIENT_H
@@ -380,13 +380,9 @@
 dlight_t *CL_AllocDlight (int key);
 void CL_DecayLights (void);
 
-void CL_Init_Cvars (void);
-void CL_Init (void);
-
 void CL_EstablishConnection (char *host);
 
 void CL_Disconnect (void);
-void CL_Disconnect_f (void);
 void CL_NextDemo (void);
 qboolean CL_DemoBehind (void);
 
@@ -421,8 +417,6 @@
 
 #define freelook (m_freelook->ivalue || (in_mlook.state & 1))
 
-void CL_InputSetRepeatDelay (struct cvar_s *var);
-void CL_InputSetRepeatInterval (struct cvar_s *var);
 void CL_Input_Init_Cvars(void);
 void CL_Input_Init (void);
 void CL_SendCmd (void);
@@ -432,14 +426,9 @@
 void CL_UpdateTEnts (void);
 
 void CL_ClearState (void);
-void CL_ReadPackets (void);
 
 int CL_ReadFromServer (void);
 void CL_WriteToServer (usercmd_t *cmd);
-void CL_BaseMove (usercmd_t *cmd);
-
-float CL_KeyState (kbutton_t *key);
-char *Key_KeynumToString (int keynum);
 
 /*
  * cl_demo.c
@@ -539,8 +528,6 @@
  */
 void CL_InitSkins (void);
 skin_t *Skin_Load (char *skin_name);
-void Skin_Skins_f (void);
-void Skin_AllSkins_f (void);
 void Skin_NextDownload (void);
 
 #define RSSHOT_WIDTH 320
Index: twilight/src/qw/common.c
diff -u twilight/src/qw/common.c:1.83 twilight/src/qw/common.c:1.84
--- twilight/src/qw/common.c:1.83	Sat Mar 22 07:50:34 2003
+++ twilight/src/qw/common.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-	"$Id: common.c,v 1.83 2003/03/22 12:50:34 warp Exp $";
+	"$Id: common.c,v 1.84 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -55,8 +55,10 @@
 cvar_t *game_name;
 cvar_t *registered;
 
-void COM_InitFilesystem (void);
-void COM_Path_f (void);
+static void COM_InitFilesystem (void);
+static void COM_Path_f (void);
+static void Com_PrintHex (char *str, int len);
+static void *SZ_GetSpace (sizebuf_t *buf, size_t length);
 
 
 qboolean standard_quake = true, rogue, hipnotic;
@@ -649,7 +651,7 @@
 	rd_print = NULL;
 }
 
-void Com_PrintHex (char *str, int len)
+static void Com_PrintHex (char *str, int len)
 {
 	char	c;
 	int		i;
@@ -755,7 +757,7 @@
 	buf->overflowed = false;
 }
 
-void *
+static void *
 SZ_GetSpace (sizebuf_t *buf, size_t length)
 {
 	void	   *data;
@@ -850,29 +852,7 @@
 }
 
 
-/*
-============
-COM_FileExtension
-============
-*/
-char *
-COM_FileExtension (char *in)
-{
-	static char		exten[8];
-	int				i;
 
-	while (*in && *in != '.')
-		in++;
-	if (!*in)
-		return "";
-	in++;
-	for (i = 0; i < 7 && *in; i++, in++)
-		exten[i] = *in;
-	exten[i] = 0;
-	return exten;
-}
-
-
 /*
 ==================
 COM_DefaultExtension
@@ -977,7 +957,7 @@
 
 ================
 */
-qboolean 
+static qboolean 
 COM_CheckFile (char *fname)
 {
 	FILE	   *h;
@@ -999,7 +979,7 @@
 Sets the "registered" cvar.
 ================
 */
-void
+static void
 COM_CheckRegistered (void)
 {
 	if (!COM_CheckFile ("gfx/pop.lmp"))
@@ -1122,7 +1102,7 @@
 	return end;
 }
 
-int
+static int
 COM_FileOpenRead (char *path, FILE ** hndl)
 {
 	FILE	   *f;
@@ -1144,7 +1124,7 @@
 
 ============
 */
-void
+static void
 COM_Path_f (void)
 {
 	searchpath_t	   *s;
@@ -1216,44 +1196,6 @@
 }
 
 
-/*
-===========
-COM_CopyFile
-
-Copies a file over from the net to the local cache, creating any directories
-needed.  This is for the convenience of developers using ISDN from home.
-===========
-*/
-void
-COM_CopyFile (char *netpath, char *cachepath)
-{
-	FILE	   *in, *out;
-	unsigned	remaining, count;
-	char		buf[4096];
-
-	remaining = COM_FileOpenRead (netpath, &in);
-	// create directories up to the cache file
-	COM_CreatePath (cachepath);
-	out = fopen (cachepath, "wb");
-	if (!out)
-		Sys_Error ("Error opening %s", cachepath);
-
-	while (remaining)
-	{
-		if (remaining < sizeof (buf))
-			count = remaining;
-		else
-			count = sizeof (buf);
-		fread (buf, 1, count, in);
-		fwrite (buf, 1, count, out);
-		remaining -= count;
-	}
-
-	fclose (in);
-	fclose (out);
-}
-
-
 int file_from_pak;						// last file came from pack
 
 int
@@ -1413,7 +1355,7 @@
 of the list so they override previous pack files.
 =================
 */
-pack_t     *
+static pack_t     *
 COM_LoadPackFile (char *packfile)
 {
 	dpackheader_t	header;
@@ -1471,7 +1413,7 @@
 then loads and adds pak1.pak pak2.pak ...
 ================
 */
-void
+static void
 COM_AddDirectory (char *dir)
 {
 	int				i;
@@ -1518,7 +1460,7 @@
 Wrapper for COM_AddDirectory
 ================
 */
-void
+static void
 COM_AddGameDirectory (char *dir)
 {
 	char		buf[1024];
@@ -1592,7 +1534,7 @@
 COM_InitFilesystem
 ================
 */
-void
+static void
 COM_InitFilesystem (void)
 {
 	Uint			i;
Index: twilight/src/qw/console.c
diff -u twilight/src/qw/console.c:1.52 twilight/src/qw/console.c:1.53
--- twilight/src/qw/console.c:1.52	Tue Mar  4 02:18:27 2003
+++ twilight/src/qw/console.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: console.c,v 1.52 2003/03/04 07:18:27 warp Exp $";
+    "$Id: console.c,v 1.53 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -96,7 +96,7 @@
 Con_Clear_f
 ================
 */
-void
+static void
 Con_Clear_f (void)
 {
 	int i;
@@ -128,7 +128,7 @@
 Con_MessageMode_f
 ================
 */
-void
+static void
 Con_MessageMode_f (void)
 {
 	chat_team = false;
@@ -140,7 +140,7 @@
 Con_MessageMode2_f
 ================
 */
-void
+static void
 Con_MessageMode2_f (void)
 {
 	chat_team = true;
@@ -153,7 +153,7 @@
 
 ================
 */
-void
+static void
 Con_Resize (console_t *con)
 {
 	int			width;
@@ -320,7 +320,7 @@
 The input line scrolls horizontally if typing goes beyond the right edge
 ================
 */
-void
+static void
 Con_DrawInput (void)
 {
 	char		*text;
@@ -543,7 +543,7 @@
 	MEGA Thanks to Taniwha
 
 */
-void
+static void
 Con_DisplayList(char **list)
 {
 	int			i = 0;
Index: twilight/src/qw/gl_rlight.c
diff -u twilight/src/qw/gl_rlight.c:1.72 twilight/src/qw/gl_rlight.c:1.73
--- twilight/src/qw/gl_rlight.c:1.72	Mon Mar  3 23:51:47 2003
+++ twilight/src/qw/gl_rlight.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: gl_rlight.c,v 1.72 2003/03/04 04:51:47 warp Exp $";
+    "$Id: gl_rlight.c,v 1.73 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -215,21 +215,6 @@
 =============================================================================
 */
 
-void
-AddLightBlend (vec3_t v, float a2)
-{
-	float       a;
-
-	v_blend[3] = a = v_blend[3] + a2 * (1 - v_blend[3]);
-
-	a2 = a2 / a;
-	a = 1 - a2;
-
-	v_blend[0] = v_blend[0] * a + v[0] * a2;
-	v_blend[1] = v_blend[1] * a + v[1] * a2;
-	v_blend[2] = v_blend[2] * a + v[2] * a2;
-}
-
 float       bubble_sintable[17], bubble_costable[17];
 
 void
@@ -522,7 +507,7 @@
 mplane_t   *lightplane;
 vec3_t      lightspot;
 
-int
+static int
 RecursiveLightPoint (vec3_t color, mnode_t *node, vec3_t start,
 		vec3_t end)
 {
Index: twilight/src/qw/gl_rmain.c
diff -u twilight/src/qw/gl_rmain.c:1.148 twilight/src/qw/gl_rmain.c:1.149
--- twilight/src/qw/gl_rmain.c:1.148	Thu Apr 17 23:19:30 2003
+++ twilight/src/qw/gl_rmain.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-	"$Id: gl_rmain.c,v 1.148 2003/04/18 03:19:30 warp Exp $";
+	"$Id: gl_rmain.c,v 1.149 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -484,7 +484,7 @@
 Called by R_RenderView, possibily repeatedly.
 ================
 */
-void
+static void
 R_Render3DView (void)
 {
 	R_VisBrushModels ();
@@ -589,7 +589,7 @@
 R_InitTextures
 ==================
 */
-void
+static void
 R_InitTextures (void)
 {
 	int			x, y;
Index: twilight/src/qw/gl_rsurf.c
diff -u twilight/src/qw/gl_rsurf.c:1.131 twilight/src/qw/gl_rsurf.c:1.132
--- twilight/src/qw/gl_rsurf.c:1.131	Thu Apr 17 23:19:30 2003
+++ twilight/src/qw/gl_rsurf.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: gl_rsurf.c,v 1.131 2003/04/18 03:19:30 warp Exp $";
+    "$Id: gl_rsurf.c,v 1.132 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -173,7 +173,7 @@
 	return lit;
 }
 
-inline qboolean
+static inline qboolean
 R_StainBlendTexel (Sint64 k, int *icolor, Uint8 *bl)
 {
 	int			ratio, a;
@@ -203,7 +203,7 @@
 R_StainNode
 ===============
 */
-void
+static void
 R_StainNode (mnode_t *node, model_t *model, vec3_t origin, float radius,
 		int icolor[8])
 {
Index: twilight/src/qw/gl_screen.c
diff -u twilight/src/qw/gl_screen.c:1.64 twilight/src/qw/gl_screen.c:1.65
--- twilight/src/qw/gl_screen.c:1.64	Mon Mar  3 23:51:47 2003
+++ twilight/src/qw/gl_screen.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: gl_screen.c,v 1.64 2003/03/04 04:51:47 warp Exp $";
+    "$Id: gl_screen.c,v 1.65 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -130,13 +130,13 @@
 qboolean	scr_drawloading;
 float		scr_disabled_time;
 
-void		SCR_ScreenShot_f (void);
-void		SCR_RSShot_f (void);
+static void		SCR_ScreenShot_f (void);
+static void		SCR_RSShot_f (void);
 
 Uint8	   *avibuffer;
 Uint32		aviframeno;
 
-void
+static void
 GL_BrightenScreen(void)
 {
 	float		f;
@@ -269,7 +269,7 @@
 }
 
 
-void
+static void
 SCR_DrawCenterString (void)
 {
 	char	   *start;
@@ -312,7 +312,7 @@
 	}
 }
 
-void
+static void
 SCR_CheckDrawCenterString (void)
 {
 	if (scr_center_lines > scr_erase_lines)
@@ -382,7 +382,7 @@
 Keybinding command
 =================
 */
-void
+static void
 SCR_SizeUp_f (void)
 {
 	Cvar_Slide (scr_viewsize, 10);
@@ -396,7 +396,7 @@
 Keybinding command
 =================
 */
-void
+static void
 SCR_SizeDown_f (void)
 {
 	Cvar_Slide (scr_viewsize, -10);
@@ -423,6 +423,18 @@
 		Cvar_Set (cvar, "170");
 }
 
+static void
+AvidemoChanged(cvar_t *cvar)
+{
+	if (cvar->ivalue) 
+		avibuffer = Zone_Alloc(tempzone, vid.width * vid.height * 3);
+	else {
+		if (avibuffer)
+			Zone_Free(avibuffer);
+		aviframeno = 0;
+	}
+}
+
 void
 SCR_Init_Cvars (void)
 {
@@ -473,7 +485,7 @@
 SCR_DrawTurtle
 ==============
 */
-void
+static void
 SCR_DrawTurtle (void)
 {
 	static int		count;
@@ -498,7 +510,7 @@
 SCR_DrawNet
 ==============
 */
-void
+static void
 SCR_DrawNet (void)
 {
 	if (cls.netchan.outgoing_sequence - cls.netchan.incoming_acknowledged <
@@ -510,7 +522,7 @@
 	Draw_Pic (64, 0, scr_net);
 }
 
-void
+static void
 SCR_DrawFPS (void)
 {
 	extern cvar_t	   *show_fps;
@@ -545,7 +557,7 @@
 DrawPause
 ==============
 */
-void
+static void
 SCR_DrawPause (void)
 {
 	qpic_t	   *pic;
@@ -567,7 +579,7 @@
 SCR_DrawLoading
 ==============
 */
-void
+static void
 SCR_DrawLoading (void)
 {
 	qpic_t	   *pic;
@@ -590,7 +602,7 @@
 SCR_SetUpToDrawConsole
 ==================
 */
-void
+static void
 SCR_SetUpToDrawConsole (void)
 {
 	Con_CheckResize ();
@@ -625,7 +637,7 @@
 SCR_DrawConsole
 ==================
 */
-void
+static void
 SCR_DrawConsole (void)
 {
 	if (scr_con_current) {
@@ -651,7 +663,7 @@
 SCR_ScreenShot_f
 ================== 
 */
-void
+static void
 SCR_ScreenShot_f (void)
 {
 	Uint8		*buffer;
@@ -684,7 +696,7 @@
 	Zone_Free (buffer);
 }
 
-void
+static void
 SCR_CaptureAviDemo (void)
 {
 	double			t;
@@ -710,23 +722,12 @@
 	}
 }
 
-void AvidemoChanged(cvar_t *cvar)
-{
-	if (cvar->ivalue) 
-		avibuffer = Zone_Alloc(tempzone, vid.width * vid.height * 3);
-	else {
-		if (avibuffer)
-			Zone_Free(avibuffer);
-		aviframeno = 0;
-	}
-}
-
 /* 
 ============== 
 WritePCXfile 
 ============== 
 */
-void
+static void
 WritePCXfile (char *filename, Uint8 *data, int width, int height,
 			  int rowbytes, Uint8 *palette, qboolean upload)
 {
@@ -849,7 +850,7 @@
 SCR_RSShot_f
 ================== 
 */
-void
+static void
 SCR_RSShot_f (void)
 {
 	int			x, y;
@@ -972,7 +973,7 @@
 char       *scr_notifystring;
 qboolean    scr_drawdialog;
 
-void
+static void
 SCR_DrawNotifyString (void)
 {
 	char	   *start;
Index: twilight/src/qw/keys.c
diff -u twilight/src/qw/keys.c:1.46 twilight/src/qw/keys.c:1.47
--- twilight/src/qw/keys.c:1.46	Sun Nov 17 20:39:51 2002
+++ twilight/src/qw/keys.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: keys.c,v 1.46 2002/11/18 01:39:51 rain Exp $";
+    "$Id: keys.c,v 1.47 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -171,7 +171,7 @@
 ==============================================================================
 */
 
-qboolean
+static qboolean
 CheckForCommand (void)
 {
 	char        command[128];
@@ -210,7 +210,7 @@
 Interactive line editing and console scrollback
 ====================
 */
-void
+static void
 Key_Console (int key)
 {
 	if (key == K_ENTER)
@@ -387,7 +387,7 @@
 char		chat_buffer[MAX_INPUTLINE];
 Uint32		chat_bufferlen = 0;
 
-void
+static void
 Key_Message (int key)
 {
 
@@ -442,7 +442,7 @@
 the K_* names are matched up.
 ===================
 */
-int
+static int
 Key_StringToKeynum (char *str)
 {
 	keyname_t  *kn;
@@ -468,7 +468,7 @@
 FIXME: handle quote special (general escape sequence?)
 ===================
 */
-char       *
+static char       *
 Key_KeynumToString (int keynum)
 {
 	keyname_t  *kn;
@@ -495,7 +495,7 @@
 Key_SetBinding
 ===================
 */
-void
+static void
 Key_SetBinding (int keynum, int bindmap, char *binding)
 {
 	char       *new;
@@ -522,7 +522,7 @@
 Key_In_Unbind_f
 ===================
 */
-void
+static void
 Key_In_Unbind_f (void)
 {
 	int         b, m;
@@ -552,7 +552,7 @@
 Key_In_Bind_f
 ===================
 */
-void
+static void
 Key_In_Bind_f (void)
 {
 	int         i, c, b, m;
@@ -600,7 +600,7 @@
 Key_In_Bindmap_f
 ===================
 */
-void
+static void
 Key_In_Bindmap_f (void)
 {
 	int         m1, m2, c;
@@ -633,7 +633,7 @@
 Key_Unbind_f
 ===================
 */
-void
+static void
 Key_Unbind_f (void)
 {
 	int         b;
@@ -652,7 +652,7 @@
 	Key_SetBinding (b, 0, "");
 }
 
-void
+static void
 Key_Unbindall_f (void)
 {
 	int         i, j;
@@ -669,7 +669,7 @@
 Key_Bind_f
 ===================
 */
-void
+static void
 Key_Bind_f (void)
 {
 	int         i, c, b;
@@ -957,21 +957,5 @@
 			break;
 		default:
 			Host_EndGame ("Bad key_dest");
-	}
-}
-
-/*
-===================
-Key_ClearStates
-===================
-*/
-void
-Key_ClearStates (void)
-{
-	int         i;
-
-	for (i = 0; i < 256; i++) {
-		keydown[i] = false;
-		key_repeats[i] = false;
 	}
 }
Index: twilight/src/qw/net.h
diff -u twilight/src/qw/net.h:1.16 twilight/src/qw/net.h:1.17
--- twilight/src/qw/net.h:1.16	Sat Jul  6 20:33:35 2002
+++ twilight/src/qw/net.h	Fri Apr 18 17:09:17 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: net.h,v 1.16 2002/07/07 00:33:35 warp Exp $
+	$Id: net.h,v 1.17 2003/04/18 21:09:17 warp Exp $
 */
 
 #ifndef __NET_H
@@ -123,7 +123,6 @@
 void Netchan_Init (void);
 void Netchan_Init_Cvars (void);
 void Netchan_Transmit (netchan_t *chan, size_t length, Uint8 *data);
-void Netchan_OutOfBand(netsrc_t sock, netadr_t adr, size_t length, Uint8 *data);
 void Netchan_OutOfBandPrint (netsrc_t sock, netadr_t adr, char *format, ...);
 qboolean Netchan_Process (netchan_t *chan);
 void Netchan_Setup (netsrc_t sock, netchan_t *chan, netadr_t adr, int qport);
Index: twilight/src/qw/net_chan.c
diff -u twilight/src/qw/net_chan.c:1.32 twilight/src/qw/net_chan.c:1.33
--- twilight/src/qw/net_chan.c:1.32	Fri Apr  4 22:23:16 2003
+++ twilight/src/qw/net_chan.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: net_chan.c,v 1.32 2003/04/05 03:23:16 havoc Exp $";
+    "$Id: net_chan.c,v 1.33 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -146,7 +146,7 @@
 Sends an out-of-band datagram
 ================
 */
-void
+static void
 Netchan_OutOfBand (netsrc_t sock, netadr_t adr, size_t length, Uint8 *data)
 {
 	sizebuf_t	send;
Index: twilight/src/qw/net_udp.c
diff -u twilight/src/qw/net_udp.c:1.37 twilight/src/qw/net_udp.c:1.38
--- twilight/src/qw/net_udp.c:1.37	Sun Nov 17 20:39:51 2002
+++ twilight/src/qw/net_udp.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: net_udp.c,v 1.37 2002/11/18 01:39:51 rain Exp $";
+    "$Id: net_udp.c,v 1.38 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -105,7 +105,7 @@
 
 //=============================================================================
 
-void
+static void
 NetadrToSockadr (netadr_t *a, struct sockaddr_in *s)
 {
 	memset (s, 0, sizeof (*s));
@@ -115,7 +115,7 @@
 	s->sin_port = a->port;
 }
 
-void
+static void
 SockadrToNetadr (struct sockaddr_in *s, netadr_t *a)
 {
 	a->type = NA_IP;
@@ -221,11 +221,11 @@
 =============================================================================
 */
 
-qboolean 
+static qboolean
 NET_GetLoopPacket (netsrc_t sock)
 {
-	int		i;
-	loopback_t	*loop = &loopbacks[sock];
+	int     i;
+	loopback_t  *loop = &loopbacks[sock];
 
 	if (loop->send - loop->get > MAX_LOOPBACK)
 		loop->get = loop->send - MAX_LOOPBACK;
@@ -243,11 +243,10 @@
 	return true;
 }
 
-void 
-NET_SendLoopPacket (netsrc_t sock, unsigned int length, void *data, netadr_t to)
-{
-	int		i;
-	loopback_t	*loop = &loopbacks[sock^1];
+static void
+NET_SendLoopPacket (netsrc_t sock, unsigned int length, void *data, netadr_t to){
+	int     i;
+	loopback_t  *loop = &loopbacks[sock^1];
 
 	to = to;
 
@@ -262,6 +261,7 @@
 }
 
 
+
 //=============================================================================
 
 qboolean
@@ -337,7 +337,7 @@
 
 //=============================================================================
 
-int
+static int
 UDP_OpenSocket (int port)
 {
 	int         newsocket;
Index: twilight/src/qw/pmove.c
diff -u twilight/src/qw/pmove.c:1.25 twilight/src/qw/pmove.c:1.26
--- twilight/src/qw/pmove.c:1.25	Sat Jul  6 20:33:35 2002
+++ twilight/src/qw/pmove.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: pmove.c,v 1.25 2002/07/07 00:33:35 warp Exp $";
+    "$Id: pmove.c,v 1.26 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -70,7 +70,7 @@
 */
 #define	STOP_EPSILON	0.1
 
-int
+static int
 PM_ClipVelocity (vec3_t in, vec3_t normal, vec3_t out, float overbounce)
 {
 	float       backoff;
@@ -105,7 +105,7 @@
 */
 #define	MAX_CLIP_PLANES	20
 
-int
+static int
 PM_FlyMove (void)
 {
 	int		bumpcount, numbumps, numplanes, i, j, blocked;
@@ -208,7 +208,7 @@
 Player is on ground, with no upwards velocity
 =============
 */
-void
+static void
 PM_GroundMove (void)
 {
 	vec3_t      start, dest;
@@ -292,7 +292,7 @@
 Handles both ground friction and water friction
 ==================
 */
-void
+static void
 PM_Friction (void)
 {
 	float      *vel;
@@ -362,7 +362,7 @@
 PM_Accelerate
 ==============
 */
-void
+static void
 PM_Accelerate (vec3_t wishdir, float wishspeed, float accel)
 {
 	int         i;
@@ -385,7 +385,7 @@
 		pmove.velocity[i] += accelspeed * wishdir[i];
 }
 
-void
+static void
 PM_AirAccelerate (vec3_t wishdir, float wishspeed, float accel)
 {
 	int         i;
@@ -418,7 +418,7 @@
 
 ===================
 */
-void
+static void
 PM_WaterMove (void)
 {
 	int         i;
@@ -475,7 +475,7 @@
 
 ===================
 */
-void
+static void
 PM_AirMove (void)
 {
 	int         i;
@@ -530,7 +530,7 @@
 PM_CatagorizePosition
 =============
 */
-void
+static void
 PM_CatagorizePosition (void)
 {
 	vec3_t      point;
@@ -592,7 +592,7 @@
 JumpButton
 =============
 */
-void
+static void
 JumpButton (void)
 {
 	if (pmove.dead) {
@@ -636,7 +636,7 @@
 CheckWaterJump
 =============
 */
-void
+static void
 CheckWaterJump (void)
 {
 	vec3_t      spot;
@@ -681,7 +681,7 @@
 allow for the cut precision of the net coordinates
 =================
 */
-void
+static void
 NudgePosition (void)
 {
 	vec3_t      base;
@@ -714,7 +714,7 @@
 SpectatorMove
 ===============
 */
-void
+static void
 SpectatorMove (void)
 {
 	float       speed, drop, friction, control, newspeed;
Index: twilight/src/qw/pmovetst.c
diff -u twilight/src/qw/pmovetst.c:1.21 twilight/src/qw/pmovetst.c:1.22
--- twilight/src/qw/pmovetst.c:1.21	Mon Jul 29 23:15:58 2002
+++ twilight/src/qw/pmovetst.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: pmovetst.c,v 1.21 2002/07/30 03:15:58 knghtbrd Exp $";
+    "$Id: pmovetst.c,v 1.22 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -90,7 +90,7 @@
 BSP trees instead of being compared directly.
 ===================
 */
-hull_t     *
+static hull_t     *
 PM_HullForBox (vec3_t mins, vec3_t maxs)
 {
 	box_planes[0].dist = maxs[0];
@@ -110,7 +110,7 @@
 
 ==================
 */
-int
+static int
 PM_HullPointContents (hull_t *hull, int num, vec3_t p)
 {
 	float       d;
Index: twilight/src/qw/pr_cmds.c
diff -u twilight/src/qw/pr_cmds.c:1.8 twilight/src/qw/pr_cmds.c:1.9
--- twilight/src/qw/pr_cmds.c:1.8	Mon Aug 19 10:09:06 2002
+++ twilight/src/qw/pr_cmds.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: pr_cmds.c,v 1.8 2002/08/19 14:09:06 warp Exp $";
+    "$Id: pr_cmds.c,v 1.9 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -62,7 +62,7 @@
 ===============================================================================
 */
 
-char *
+static char *
 PF_VarString (int first)
 {
 	Uint			i;
@@ -86,7 +86,7 @@
 error(value)
 =================
 */
-void
+static void
 PF_error (void)
 {
 	char       *s;
@@ -111,7 +111,7 @@
 objerror(value)
 =================
 */
-void
+static void
 PF_objerror (void)
 {
 	char       *s;
@@ -137,7 +137,7 @@
 makevectors(vector)
 ==============
 */
-void
+static void
 PF_makevectors (void)
 {
 	AngleVectors (G_VECTOR (OFS_PARM0), pr_global_struct->v_forward,
@@ -153,7 +153,7 @@
 setorigin (entity, origin)
 =================
 */
-void
+static void
 PF_setorigin (void)
 {
 	edict_t    *e;
@@ -175,7 +175,7 @@
 setsize (entity, minvector, maxvector)
 =================
 */
-void
+static void
 PF_setsize (void)
 {
 	edict_t    *e;
@@ -199,7 +199,7 @@
 Also sets size, mins, and maxs for inline bmodels
 =================
 */
-void
+static void
 PF_setmodel (void)
 {
 	edict_t    *e;
@@ -241,7 +241,7 @@
 bprint(value)
 =================
 */
-void
+static void
 PF_bprint (void)
 {
 	char       *s;
@@ -262,7 +262,7 @@
 sprint(clientent, value)
 =================
 */
-void
+static void
 PF_sprint (void)
 {
 	char       *s;
@@ -295,7 +295,7 @@
 centerprint(clientent, value)
 =================
 */
-void
+static void
 PF_centerprint (void)
 {
 	char       *s;
@@ -324,7 +324,7 @@
 vector normalize(vector)
 =================
 */
-void
+static void
 PF_normalize (void)
 {
 	float      *value1;
@@ -355,7 +355,7 @@
 scalar vlen(vector)
 =================
 */
-void
+static void
 PF_vlen (void)
 {
 	float      *value1;
@@ -375,7 +375,7 @@
 float vectoyaw(vector)
 =================
 */
-void
+static void
 PF_vectoyaw (void)
 {
 	float      *value1;
@@ -402,7 +402,7 @@
 vector vectoangles(vector)
 =================
 */
-void
+static void
 PF_vectoangles (void)
 {
 	float      *value1 = G_VECTOR (OFS_PARM0);
@@ -424,7 +424,7 @@
 random()
 =================
 */
-void
+static void
 PF_random (void)
 {
 	float       num;
@@ -441,7 +441,7 @@
 
 =================
 */
-void
+static void
 PF_ambientsound (void)
 {
 	char      **check;
@@ -492,7 +492,7 @@
 
 =================
 */
-void
+static void
 PF_sound (void)
 {
 	char       *sample;
@@ -517,7 +517,7 @@
 break()
 =================
 */
-void
+static void
 PF_break (void)
 {
 	Com_Printf ("break statement\n");
@@ -536,7 +536,7 @@
 traceline (vector1, vector2, tryents)
 =================
 */
-void
+static void
 PF_traceline (void)
 {
 	float		*v1, *v2;
@@ -576,7 +576,8 @@
 tracebox (vector1, vector mins, vector maxs, vector2, tryents)
 =================
 */
-void PF_tracebox (void)
+static void
+PF_tracebox (void)
 {
 	float		*v1, *v2, *m1, *m2;
 	trace_t		trace;
@@ -608,26 +609,11 @@
 		pr_global_struct->trace_ent = EDICT_TO_PROG(sv.edicts);
 }
 
-/*
-=================
-PF_checkpos
-
-Returns true if the given entity can move to the given position from it's
-current position by walking or rolling.
-FIXME: make work...
-scalar checkpos (entity, vector)
-=================
-*/
-void
-PF_checkpos (void)
-{
-}
-
 //============================================================================
 
 Uint8       checkpvs[MAX_MAP_LEAFS / 8];
 
-Uint
+static Uint
 PF_newcheckclient (Uint check)
 {
 	Uint        i;
@@ -694,7 +680,7 @@
 */
 #define	MAX_CHECK	16
 int         c_invis, c_notvis;
-void
+static void
 PF_checkclient (void)
 {
 	edict_t    *ent, *self;
@@ -740,7 +726,7 @@
 stuffcmd (clientent, value)
 =================
 */
-void
+static void
 PF_stuffcmd (void)
 {
 	int         entnum;
@@ -773,7 +759,7 @@
 localcmd (string)
 =================
 */
-void
+static void
 PF_localcmd (void)
 {
 	char       *str;
@@ -789,7 +775,7 @@
 float cvar (string)
 =================
 */
-void
+static void
 PF_cvar (void)
 {
 	char       *str;
@@ -811,7 +797,7 @@
 float cvar (string)
 =================
 */
-void
+static void
 PF_cvar_set (void)
 {
 	char       *name, *val;
@@ -836,7 +822,7 @@
 findradius (origin, radius)
 =================
 */
-void
+static void
 PF_findradius (void)
 {
 	edict_t		*ent, *chain;
@@ -876,7 +862,7 @@
 PF_dprint
 =========
 */
-void
+static void
 PF_dprint (void)
 {
 	Com_Printf ("%s", PF_VarString (0));
@@ -884,7 +870,7 @@
 
 char        pr_string_temp[128];
 
-void
+static void
 PF_ftos (void)
 {
 	float       v;
@@ -898,7 +884,7 @@
 	G_INT (OFS_RETURN) = PR_SetString (pr_string_temp);
 }
 
-void
+static void
 PF_fabs (void)
 {
 	float       v;
@@ -907,7 +893,7 @@
 	G_FLOAT (OFS_RETURN) = fabs (v);
 }
 
-void
+static void
 PF_vtos (void)
 {
 	snprintf (pr_string_temp, sizeof (pr_string_temp), "'%5.1f %5.1f %5.1f'",
@@ -916,7 +902,7 @@
 	G_INT (OFS_RETURN) = PR_SetString (pr_string_temp);
 }
 
-void
+static void
 PF_etos (void)
 {
 	snprintf (pr_string_temp, sizeof (pr_string_temp), "entity %i",
@@ -924,7 +910,7 @@
 	G_INT (OFS_RETURN) = PR_SetString (pr_string_temp);
 }
 
-void
+static void
 PF_Spawn (void)
 {
 	edict_t    *ed;
@@ -933,7 +919,7 @@
 	RETURN_EDICT (ed);
 }
 
-void
+static void
 PF_Remove (void)
 {
 	edict_t    *ed;
@@ -944,7 +930,7 @@
 
 
 // entity (entity start, .string field, string match) find = #5;
-void
+static void
 PF_Find (void)
 {
 	Uint		e;
@@ -981,21 +967,21 @@
 	RETURN_EDICT (sv.edicts);
 }
 
-void
+static void
 PR_CheckEmptyString (char *s)
 {
 	if (s[0] <= ' ')
 		PR_RunError ("Bad string");
 }
 
-void
+static void
 PF_precache_file (void)
 {
 	// precache_file is only used to copy files with qcc, it does nothing
 	G_INT (OFS_RETURN) = G_INT (OFS_PARM0);
 }
 
-void
+static void
 PF_precache_sound (void)
 {
 	char       *s;
@@ -1020,7 +1006,7 @@
 	PR_RunError ("PF_precache_sound: overflow");
 }
 
-void
+static void
 PF_precache_model (void)
 {
 	char       *s;
@@ -1046,25 +1032,25 @@
 }
 
 
-void
+static void
 PF_coredump (void)
 {
 	ED_PrintEdicts ();
 }
 
-void
+static void
 PF_traceon (void)
 {
 	pr_trace = true;
 }
 
-void
+static void
 PF_traceoff (void)
 {
 	pr_trace = false;
 }
 
-void
+static void
 PF_eprint (void)
 {
 	ED_PrintNum (G_EDICTNUM (OFS_PARM0));
@@ -1077,7 +1063,7 @@
 float(float yaw, float dist) walkmove
 ===============
 */
-void
+static void
 PF_walkmove (void)
 {
 	edict_t    *ent;
@@ -1120,7 +1106,7 @@
 void() droptofloor
 ===============
 */
-void
+static void
 PF_droptofloor (void)
 {
 	edict_t    *ent;
@@ -1152,7 +1138,7 @@
 void(float style, string value) lightstyle
 ===============
 */
-void
+static void
 PF_lightstyle (void)
 {
 	int         style;
@@ -1179,7 +1165,7 @@
 		}
 }
 
-void
+static void
 PF_rint (void)
 {
 	float       f;
@@ -1191,13 +1177,13 @@
 		G_FLOAT (OFS_RETURN) = (int) (f - 0.5);
 }
 
-void
+static void
 PF_floor (void)
 {
 	G_FLOAT (OFS_RETURN) = floor (G_FLOAT (OFS_PARM0));
 }
 
-void
+static void
 PF_ceil (void)
 {
 	G_FLOAT (OFS_RETURN) = ceil (G_FLOAT (OFS_PARM0));
@@ -1209,7 +1195,7 @@
 PF_checkbottom
 =============
 */
-void
+static void
 PF_checkbottom (void)
 {
 	edict_t    *ent;
@@ -1224,7 +1210,7 @@
 PF_pointcontents
 =============
 */
-void
+static void
 PF_pointcontents (void)
 {
 	float      *v;
@@ -1241,7 +1227,7 @@
 entity nextent(entity)
 =============
 */
-void
+static void
 PF_nextent (void)
 {
 	Uint		i;
@@ -1270,7 +1256,7 @@
 vector aim(entity, missilespeed)
 =============
 */
-void
+static void
 PF_aim (void)
 {
 	edict_t		*ent, *check, *bestent;
@@ -1446,7 +1432,7 @@
 }
 
 
-void
+static void
 PF_WriteByte (void)
 {
 	if (G_FLOAT (OFS_PARM0) == MSG_ONE) {
@@ -1458,7 +1444,7 @@
 		MSG_WriteByte (WriteDest (), G_FLOAT (OFS_PARM1));
 }
 
-void
+static void
 PF_WriteChar (void)
 {
 	if (G_FLOAT (OFS_PARM0) == MSG_ONE) {
@@ -1470,7 +1456,7 @@
 		MSG_WriteChar (WriteDest (), G_FLOAT (OFS_PARM1));
 }
 
-void
+static void
 PF_WriteShort (void)
 {
 	if (G_FLOAT (OFS_PARM0) == MSG_ONE) {
@@ -1482,7 +1468,7 @@
 		MSG_WriteShort (WriteDest (), G_FLOAT (OFS_PARM1));
 }
 
-void
+static void
 PF_WriteLong (void)
 {
 	if (G_FLOAT (OFS_PARM0) == MSG_ONE) {
@@ -1494,7 +1480,7 @@
 		MSG_WriteLong (WriteDest (), G_FLOAT (OFS_PARM1));
 }
 
-void
+static void
 PF_WriteAngle (void)
 {
 	if (G_FLOAT (OFS_PARM0) == MSG_ONE) {
@@ -1506,7 +1492,7 @@
 		MSG_WriteAngle (WriteDest (), G_FLOAT (OFS_PARM1));
 }
 
-void
+static void
 PF_WriteCoord (void)
 {
 	if (G_FLOAT (OFS_PARM0) == MSG_ONE) {
@@ -1518,7 +1504,7 @@
 		MSG_WriteCoord (WriteDest (), G_FLOAT (OFS_PARM1));
 }
 
-void
+static void
 PF_WriteString (void)
 {
 	if (G_FLOAT (OFS_PARM0) == MSG_ONE) {
@@ -1531,7 +1517,7 @@
 }
 
 
-void
+static void
 PF_WriteEntity (void)
 {
 	if (G_FLOAT (OFS_PARM0) == MSG_ONE) {
@@ -1547,7 +1533,7 @@
 
 int         SV_ModelIndex (char *name);
 
-void
+static void
 PF_makestatic (void)
 {
 	edict_t    *ent;
@@ -1578,7 +1564,7 @@
 PF_setspawnparms
 ==============
 */
-void
+static void
 PF_setspawnparms (void)
 {
 	edict_t    *ent;
@@ -1602,7 +1588,7 @@
 PF_changelevel
 ==============
 */
-void
+static void
 PF_changelevel (void)
 {
 	char       *s;
@@ -1625,7 +1611,7 @@
 logfrag (killer, killee)
 ==============
 */
-void
+static void
 PF_logfrag (void)
 {
 	edict_t    *ent1, *ent2;
@@ -1659,7 +1645,7 @@
 string(entity e, string key) infokey
 ==============
 */
-void
+static void
 PF_infokey (void)
 {
 	edict_t    *e;
@@ -1701,7 +1687,7 @@
 float(string s) stof
 ==============
 */
-void
+static void
 PF_stof (void)
 {
 	char       *s;
@@ -1719,7 +1705,7 @@
 void(vector where, float set) multicast
 ==============
 */
-void
+static void
 PF_multicast (void)
 {
 	float      *o;
@@ -1731,25 +1717,25 @@
 	SV_Multicast (o, to);
 }
 
-void
+static void
 PF_sin (void)
 {
 	G_FLOAT(OFS_RETURN) = sin(G_FLOAT(OFS_PARM0));
 }   
 
-void
+static void
 PF_cos (void)
 {
 	G_FLOAT(OFS_RETURN) = cos(G_FLOAT(OFS_PARM0));
 }   
 
-void
+static void
 PF_sqrt (void)
 {
 	G_FLOAT(OFS_RETURN) = sqrt(G_FLOAT(OFS_PARM0));
 }   
 
-void
+static void
 PF_randomvec (void)
 {
 	vec3_t		temp;
@@ -1764,7 +1750,7 @@
 	VectorCopy (temp, G_VECTOR(OFS_RETURN));
 }
 
-void
+static void
 PF_registercvar (void)
 {
 	char		*name, *value;
@@ -1800,7 +1786,7 @@
 returns the minimum of two or more supplied floats
 =================
 */
-void
+static void
 PF_min (void)
 {
 	Uint		i;
@@ -1828,7 +1814,7 @@
 returns the maximum of two or more supplied floats
 =================
 */
-void
+static void
 PF_max (void)
 {
 	Uint		i;
@@ -1856,7 +1842,7 @@
 returns float bounded within a supplied range
 =================
 */
-void
+static void
 PF_bound (void)
 {
 	G_FLOAT(OFS_RETURN) = bound(G_FLOAT(OFS_PARM0), G_FLOAT(OFS_PARM1), G_FLOAT(OFS_PARM2));
@@ -1869,7 +1855,7 @@
 returns x raised to the y power
 =================
 */
-void
+static void
 PF_pow (void)
 {
 	G_FLOAT(OFS_RETURN) = pow(G_FLOAT(OFS_PARM0), G_FLOAT(OFS_PARM1));
@@ -1881,7 +1867,7 @@
 
 =================
 */
-void
+static void
 PF_findfloat (void)
 {
 	Uint		e;
@@ -1908,7 +1894,7 @@
 	RETURN_EDICT(sv.edicts);
 }
 
-void
+static void
 PF_checkextension (void)
 {
 	int			len;
@@ -1936,7 +1922,7 @@
 	G_FLOAT(OFS_RETURN) = false;
 }
 
-void
+static void
 PF_fixme (void)
 {
 	PR_RunError ("unimplemented bulitin");
Index: twilight/src/qw/pr_edict.c
diff -u twilight/src/qw/pr_edict.c:1.6 twilight/src/qw/pr_edict.c:1.7
--- twilight/src/qw/pr_edict.c:1.6	Mon Jan 27 05:30:07 2003
+++ twilight/src/qw/pr_edict.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: pr_edict.c,v 1.6 2003/01/27 10:30:07 warp Exp $";
+    "$Id: pr_edict.c,v 1.7 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -66,8 +66,8 @@
 	sizeof (void *) / 4
 };
 
-extern ddef_t *ED_FieldAtOfs (int ofs);
-extern qboolean ED_ParseEpair (void *base, ddef_t *key, char *s);
+static ddef_t *ED_FieldAtOfs (int ofs);
+static qboolean ED_ParseEpair (void *base, ddef_t *key, char *s);
 
 cvar_t *pr_checkextension;
 
@@ -99,7 +99,7 @@
 Sets everything to NULL
 =================
 */
-void
+static void
 ED_ClearEdict (edict_t *e)
 {
 	memset (&e->v, 0, progs->entityfields * 4);
@@ -186,7 +186,7 @@
 ED_GlobalAtOfs
 ============
 */
-ddef_t *
+static ddef_t *
 ED_GlobalAtOfs (int ofs)
 {
 	ddef_t		*def;
@@ -206,7 +206,7 @@
 ED_FieldAtOfs
 ============
 */
-ddef_t *
+static ddef_t *
 ED_FieldAtOfs (int ofs)
 {
 	ddef_t		*def;
@@ -226,7 +226,7 @@
 ED_FindField
 ============
 */
-ddef_t *
+static ddef_t *
 ED_FindField (char *name)
 {
 	ddef_t		*def;
@@ -244,31 +244,10 @@
 
 /*
 ============
-ED_FindGlobal
-============
-*/
-ddef_t *
-ED_FindGlobal (char *name)
-{
-	ddef_t		*def;
-	Uint		i;
-
-	for (i = 0; i < progs->numglobaldefs; i++)
-	{
-		def = &pr_globaldefs[i];
-		if (!strcmp (PR_GetString (def->s_name), name))
-			return def;
-	}
-	return NULL;
-}
-
-
-/*
-============
 ED_FindFunction
 ============
 */
-dfunction_t *
+static dfunction_t *
 ED_FindFunction (char *name)
 {
 	dfunction_t		*func;
@@ -322,7 +301,7 @@
 Returns a string describing *data in a type specific manner
 =============
 */
-char *
+static char *
 PR_ValueString (etype_t type, eval_t *val)
 {
 	static char		line[256];
@@ -371,58 +350,6 @@
 
 /*
 ============
-PR_UglyValueString
-
-Returns a string describing *data in a type specific manner
-Easier to parse than PR_ValueString
-=============
-*/
-char *
-PR_UglyValueString (etype_t type, eval_t *val)
-{
-	static char		line[256];
-	ddef_t			*def;
-	dfunction_t		*f;
-
-	type &= ~DEF_SAVEGLOBAL;
-
-	switch (type)
-	{
-		case ev_string:
-			snprintf (line, sizeof (line), "%s", PR_GetString (val->string));
-			break;
-		case ev_entity:
-			snprintf (line, sizeof (line), "%i",
-					  NUM_FOR_EDICT (PROG_TO_EDICT (val->edict)));
-			break;
-		case ev_function:
-			f = pr_functions + val->function;
-			snprintf (line, sizeof (line), "%s", PR_GetString (f->s_name));
-			break;
-		case ev_field:
-			def = ED_FieldAtOfs (val->_int);
-			snprintf (line, sizeof (line), "%s", PR_GetString (def->s_name));
-			break;
-		case ev_void:
-			snprintf (line, sizeof (line), "void");
-			break;
-		case ev_float:
-			snprintf (line, sizeof (line), "%g", val->_float);
-			break;
-		case ev_vector:
-			snprintf (line, sizeof (line), "%g %g %g", val->vector[0],
-					  val->vector[1], val->vector[2]);
-			break;
-		default:
-			snprintf (line, sizeof (line), "bad type %i", type);
-			break;
-	}
-
-	return line;
-}
-
-/*
-============
 PR_GlobalString
 
 Returns a string with a description and the contents of a global,
@@ -531,55 +458,6 @@
 	}
 }
 
-/*
-=============
-ED_Write
-
-For savegames
-=============
-*/
-void
-ED_Write (FILE *f, edict_t *ed)
-{
-	ddef_t		*d;
-	int			*v;
-	Uint		i, j;
-	char		*name;
-	int			type;
-
-	fprintf (f, "{\n");
-
-	if (ed->free)
-	{
-		fprintf (f, "}\n");
-		return;
-	}
-
-	for (i = 1; i < progs->numfielddefs; i++)
-	{
-		d = &pr_fielddefs[i];
-		name = PR_GetString (d->s_name);
-		if (name[strlen (name) - 2] == '_')
-			// skip _x, _y, _z vars
-			continue;
-
-		v = (int *) ((char *) &ed->v + d->ofs * 4);
-
-		// if the value is still all 0, skip the field
-		type = d->type & ~DEF_SAVEGLOBAL;
-		for (j = 0; j < type_size[type]; j++)
-			if (v[j])
-				break;
-		if (j == type_size[type])
-			continue;
-
-		fprintf (f, "\"%s\" ", name);
-		fprintf (f, "\"%s\"\n", PR_UglyValueString (d->type, (eval_t *) v));
-	}
-
-	fprintf (f, "}\n");
-}
-
 void
 ED_PrintNum (int ent)
 {
@@ -613,7 +491,7 @@
 For debugging, prints a single edicy
 =============
 */
-void
+static void
 ED_PrintEdict_f (void)
 {
 	int			i;
@@ -630,7 +508,7 @@
 For debugging
 =============
 */
-void
+static void
 ED_Count (void)
 {
 	Uint		i;
@@ -660,98 +538,11 @@
 }
 
 /*
-==============================================================================
-
-					ARCHIVING GLOBALS
-
-FIXME: need to tag constants, doesn't really work
-==============================================================================
-*/
-
-/*
-=============
-ED_WriteGlobals
-=============
-*/
-void
-ED_WriteGlobals (FILE *f)
-{
-	ddef_t		*def;
-	Uint		i;
-	char		*name;
-	int			type;
-
-	fprintf (f, "{\n");
-	for (i = 0; i < progs->numglobaldefs; i++)
-	{
-		def = &pr_globaldefs[i];
-		type = def->type;
-		if (!(def->type & DEF_SAVEGLOBAL))
-			continue;
-		type &= ~DEF_SAVEGLOBAL;
-
-		if (type != ev_string && type != ev_float && type != ev_entity)
-			continue;
-
-		name = PR_GetString (def->s_name);
-		fprintf (f, "\"%s\" ", name);
-		fprintf (f, "\"%s\"\n",
-				PR_UglyValueString (type, (eval_t *) &pr_globals[def->ofs]));
-	}
-	fprintf (f, "}\n");
-}
-
-/*
 =============
-ED_ParseGlobals
-=============
-*/
-void
-ED_ParseGlobals (char *data)
-{
-	char		keyname[64];
-	ddef_t		*key;
-
-	while (1)
-	{
-		// parse key
-		data = COM_Parse (data);
-		if (com_token[0] == '}')
-			break;
-		if (!data)
-			SV_Error ("ED_ParseEntity: EOF without closing brace");
-
-		strcpy (keyname, com_token);
-
-		// parse value 
-		data = COM_Parse (data);
-		if (!data)
-			SV_Error ("ED_ParseEntity: EOF without closing brace");
-
-		if (com_token[0] == '}')
-			SV_Error ("ED_ParseEntity: closing brace without data");
-
-		key = ED_FindGlobal (keyname);
-		if (!key)
-		{
-			Com_Printf ("%s is not a global\n", keyname);
-			continue;
-		}
-
-		if (!ED_ParseEpair ((void *) pr_globals, key, com_token))
-			SV_Error ("ED_ParseGlobals: parse error");
-	}
-}
-
-//============================================================================
-
-
-/*
-=============
 ED_NewString
 =============
 */
-char *
+static char *
 ED_NewString (char *string)
 {
 	char		*new, *new_p;
@@ -787,7 +578,7 @@
 returns false if error
 =============
 */
-qboolean
+static qboolean
 ED_ParseEpair (void *base, ddef_t *key, char *s)
 {
 	int				i;
@@ -862,7 +653,7 @@
 Used for initial level load and for savegames.
 ====================
 */
-char *
+static char *
 ED_ParseEdict (char *data, edict_t *ent)
 {
 	ddef_t		*key;
Index: twilight/src/qw/pr_exec.c
diff -u twilight/src/qw/pr_exec.c:1.3 twilight/src/qw/pr_exec.c:1.4
--- twilight/src/qw/pr_exec.c:1.3	Mon Jan 27 05:30:07 2003
+++ twilight/src/qw/pr_exec.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: pr_exec.c,v 1.3 2003/01/27 10:30:07 warp Exp $";
+    "$Id: pr_exec.c,v 1.4 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -165,7 +165,7 @@
 PR_PrintStatement
 =================
 */
-void
+static void
 PR_PrintStatement (dstatement_t *s)
 {
 	int         i;
@@ -200,7 +200,7 @@
 PR_StackTrace
 ============
 */
-void
+static void
 PR_StackTrace (void)
 {
 	dfunction_t *f;
@@ -307,7 +307,7 @@
 Returns the new program statement counter
 ====================
 */
-int
+static int
 PR_EnterFunction (dfunction_t *f)
 {
 	Uint		i, j, c, o;
@@ -349,7 +349,7 @@
 PR_LeaveFunction
 ====================
 */
-int
+static int
 PR_LeaveFunction (void)
 {
 	int         i, c;
Index: twilight/src/qw/progs.h
diff -u twilight/src/qw/progs.h:1.3 twilight/src/qw/progs.h:1.4
--- twilight/src/qw/progs.h:1.3	Mon Jan 27 05:30:07 2003
+++ twilight/src/qw/progs.h	Fri Apr 18 17:09:17 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: progs.h,v 1.3 2003/01/27 10:30:07 warp Exp $
+	$Id: progs.h,v 1.4 2003/04/18 21:09:17 warp Exp $
 */
 
 #ifndef __PROGS_H
@@ -91,13 +91,10 @@
 edict_t *ED_Alloc (void);
 void ED_Free (edict_t *ed);
 
-char *ED_NewString (char *string);
-
 // returns a copy of the string allocated from the server's string heap
 
 void ED_Print (edict_t *ed);
 void ED_Write (FILE * f, edict_t *ed);
-char *ED_ParseEdict (char *data, edict_t *ent);
 
 void ED_WriteGlobals (FILE * f);
 void ED_ParseGlobals (char *data);
Index: twilight/src/qw/render.h
diff -u twilight/src/qw/render.h:1.49 twilight/src/qw/render.h:1.50
--- twilight/src/qw/render.h:1.49	Thu Apr 17 23:19:30 2003
+++ twilight/src/qw/render.h	Fri Apr 18 17:09:17 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: render.h,v 1.49 2003/04/18 03:19:30 warp Exp $
+	$Id: render.h,v 1.50 2003/04/18 21:09:17 warp Exp $
 */
 
 #ifndef __RENDER_H
@@ -85,7 +85,6 @@
 
 void R_Init_Cvars (void);
 void R_Init (void);
-void R_InitTextures (void);
 
 // must set r_refdef first
 // called whenever r_refdef or vid change
Index: twilight/src/qw/sbar.c
diff -u twilight/src/qw/sbar.c:1.40 twilight/src/qw/sbar.c:1.41
--- twilight/src/qw/sbar.c:1.40	Mon Sep 30 05:29:41 2002
+++ twilight/src/qw/sbar.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sbar.c,v 1.40 2002/09/30 09:29:41 warp Exp $";
+    "$Id: sbar.c,v 1.41 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -68,9 +68,9 @@
 qboolean    sb_showscores;
 qboolean    sb_showteamscores;
 
-void        Sbar_DeathmatchOverlay (int start);
-void        Sbar_TeamOverlay (void);
-void        Sbar_MiniDeathmatchOverlay (void);
+static void        Sbar_DeathmatchOverlay (int start);
+static void        Sbar_TeamOverlay (void);
+static void        Sbar_MiniDeathmatchOverlay (void);
 
 static qboolean largegame = false;
 
@@ -83,7 +83,7 @@
 Tab key down
 ===============
 */
-void
+static void
 Sbar_ShowTeamScores (void)
 {
 	if (sb_showteamscores)
@@ -99,7 +99,7 @@
 Tab key up
 ===============
 */
-void
+static void
 Sbar_DontShowTeamScores (void)
 {
 	sb_showteamscores = false;
@@ -112,7 +112,7 @@
 Tab key down
 ===============
 */
-void
+static void
 Sbar_ShowScores (void)
 {
 	if (sb_showscores)
@@ -128,7 +128,7 @@
 Tab key up
 ===============
 */
-void
+static void
 Sbar_DontShowScores (void)
 {
 	sb_showscores = false;
@@ -245,7 +245,7 @@
 Sbar_DrawPic
 =============
 */
-void
+static void
 Sbar_DrawPic (int x, int y, qpic_t *pic)
 {
 	Draw_Pic (x, y + (vid.height_2d - SBAR_HEIGHT), pic);
@@ -258,7 +258,7 @@
 JACK: Draws a portion of the picture in the status bar.
 */
 
-void
+static void
 Sbar_DrawSubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width,
 				 int height)
 {
@@ -274,7 +274,7 @@
 Draws one solid graphics character
 ================
 */
-void
+static void
 Sbar_DrawCharacter (int x, int y, int num)
 {
 	Draw_Character (x + 4, y + vid.height_2d - SBAR_HEIGHT, num, 8);
@@ -285,7 +285,7 @@
 Sbar_DrawString
 ================
 */
-void
+static void
 Sbar_DrawString (int x, int y, char *str)
 {
 	Draw_String (x, y + vid.height_2d - SBAR_HEIGHT, str, 8);
@@ -296,7 +296,7 @@
 Sbar_itoa
 =============
 */
-int
+static int
 Sbar_itoa (int num, char *buf)
 {
 	char       *str;
@@ -330,7 +330,7 @@
 Sbar_DrawNum
 =============
 */
-void
+static void
 Sbar_DrawNum (int x, int y, int num, int digits, int color)
 {
 	char        str[12];
@@ -377,7 +377,7 @@
 Sbar_SortFrags
 ===============
 */
-void
+static void
 Sbar_SortFrags ()
 {
 	int         i, j, k;
@@ -409,7 +409,7 @@
 	cl.frags_updated |= FRAGS_SORTED;
 }
 
-void
+static void
 Sbar_SortTeams (void)
 {
 	int         i, j, k;
@@ -484,7 +484,7 @@
 Sbar_SoloScoreboard
 ===============
 */
-void
+static void
 Sbar_SoloScoreboard (void)
 {
 	int         minutes, seconds, tens, units;
@@ -523,7 +523,7 @@
 Sbar_DrawInventory
 ===============
 */
-void
+static void
 Sbar_DrawInventory (void)
 {
 	int         i, j, y;
@@ -605,7 +605,7 @@
 Sbar_DrawFrags
 ===============
 */
-void
+static void
 Sbar_DrawFrags (void)
 {
 	int         i, k, l;
@@ -659,7 +659,7 @@
 Sbar_DrawFace
 ===============
 */
-void
+static void
 Sbar_DrawFace (void)
 {
 	int         f, anim;
@@ -699,7 +699,7 @@
 Sbar_DrawNormal
 =============
 */
-void
+static void
 Sbar_DrawNormal (void)
 {
 	if (cl_sbar->ivalue)
@@ -813,7 +813,7 @@
 
 ==================
 */
-void
+static void
 Sbar_IntermissionNumber (int x, int y, int num, int digits, int color)
 {
 	char        str[12];
@@ -847,7 +847,7 @@
 added by Zoid
 ==================
 */
-void
+static void
 Sbar_TeamOverlay (void)
 {
 	qpic_t		*pic;
@@ -928,7 +928,7 @@
 ping time frags name
 ==================
 */
-void
+static void
 Sbar_DeathmatchOverlay (int start)
 {
 	qpic_t			*pic;
@@ -1067,7 +1067,7 @@
 displayed to right of status bar if there's room
 ==================
 */
-void
+static void
 Sbar_MiniDeathmatchOverlay (void)
 {
 	Sint32			i, k;
Index: twilight/src/qw/screen.h
diff -u twilight/src/qw/screen.h:1.19 twilight/src/qw/screen.h:1.20
--- twilight/src/qw/screen.h:1.19	Sat Jun 29 03:51:29 2002
+++ twilight/src/qw/screen.h	Fri Apr 18 17:09:17 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: screen.h,v 1.19 2002/06/29 07:51:29 knghtbrd Exp $
+	$Id: screen.h,v 1.20 2003/04/18 21:09:17 warp Exp $
 */
 
 #ifndef __SCREEN_H
@@ -35,9 +35,6 @@
 void SCR_SizeUp (void);
 void SCR_SizeDown (void);
 void SCR_CenterPrint (char *str);
-
-void SCR_CaptureAviDemo (void);
-void AvidemoChanged(cvar_t *);
 
 int SCR_ModalMessage (char *text);
 
Index: twilight/src/qw/server.h
diff -u twilight/src/qw/server.h:1.5 twilight/src/qw/server.h:1.6
--- twilight/src/qw/server.h:1.5	Sun Aug 11 09:35:32 2002
+++ twilight/src/qw/server.h	Fri Apr 18 17:09:17 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: server.h,v 1.5 2002/08/11 13:35:32 warp Exp $
+	$Id: server.h,v 1.6 2003/04/18 21:09:17 warp Exp $
 */
 
 #ifndef __SERVER_H
@@ -388,15 +388,10 @@
 qboolean    SV_CheckBottom (struct edict_s *ent);
 qboolean    SV_movestep (struct edict_s *ent, vec3_t move, qboolean relink);
 
-void        SV_WriteClientdataToMessage (client_t *client, sizebuf_t *msg);
-
 void        SV_MoveToGoal (void);
 
-void        SV_SaveSpawnparms (void);
-
 void        SV_Physics_Client (struct edict_s *ent);
 
-void        SV_ExecuteUserCommand (char *s);
 void        SV_InitOperatorCommands (void);
 
 void        SV_SendServerinfo (client_t *client);
@@ -420,12 +415,8 @@
 //
 void        SV_ProgStartFrame (void);
 void        SV_Physics (void);
-void        SV_CheckVelocity (struct edict_s *ent);
-void        SV_AddGravity (struct edict_s *ent, float scale);
 qboolean    SV_RunThink (struct edict_s *ent);
-void        SV_Physics_Toss (struct edict_s *ent);
 void        SV_RunNewmis (void);
-void        SV_Impact (struct edict_s *e1, struct edict_s *e2);
 void        SV_SetMoveVars (void);
 
 //
@@ -456,11 +447,6 @@
 typedef enum { RD_NONE, RD_CLIENT, RD_PACKET } redirect_t;
 void        SV_BeginRedirect (redirect_t rd);
 void        SV_EndRedirect (void);
-
-//
-// sv_ccmds.c
-//
-void        SV_Status_f (void);
 
 //
 // sv_ents.c
Index: twilight/src/qw/skin.c
diff -u twilight/src/qw/skin.c:1.26 twilight/src/qw/skin.c:1.27
--- twilight/src/qw/skin.c:1.26	Sun Aug 18 23:42:47 2002
+++ twilight/src/qw/skin.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: skin.c,v 1.26 2002/08/19 03:42:47 warp Exp $";
+    "$Id: skin.c,v 1.27 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -256,7 +256,7 @@
 Refind all skins, downloading if needed.
 ==========
 */
-void
+static void
 Skin_Skins_f (void)
 {
 #if 0
@@ -281,7 +281,7 @@
 Sets all skins to one specific one
 ==========
 */
-void
+static void
 Skin_AllSkins_f (void)
 {
 	strcpy (allskins, Cmd_Argv (1));
Index: twilight/src/qw/snd_dma.c
diff -u twilight/src/qw/snd_dma.c:1.33 twilight/src/qw/snd_dma.c:1.34
--- twilight/src/qw/snd_dma.c:1.33	Sun Aug 11 09:35:32 2002
+++ twilight/src/qw/snd_dma.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: snd_dma.c,v 1.33 2002/08/11 13:35:32 warp Exp $";
+    "$Id: snd_dma.c,v 1.34 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -42,13 +42,13 @@
 #include "strlib.h"
 #include "sys.h"
 
-void        S_Play (void);
-void        S_PlayVol (void);
-void        S_SoundList (void);
-void        S_Update_ ();
+static void S_Play (void);
+static void S_PlayVol (void);
+static void S_SoundList (void);
+static void S_Update_ ();
 void        S_StopAllSounds (qboolean clear);
-void        S_StopAllSoundsC (void);
-void		CDAudio_Bgmcallback (cvar_t *cvar);
+static void S_StopAllSoundsC (void);
+static void S_ClearBuffer (void);
 
 // =======================================================================
 // Internal sound data & structures
@@ -59,7 +59,6 @@
 int         total_channels;
 
 int         snd_blocked = 0;
-static qboolean snd_ambient = 1;
 qboolean    snd_initialized = false;
 
 // pointer should go away
@@ -109,21 +108,7 @@
 qboolean    fakedma = false;
 
 
-void
-S_AmbientOff (void)
-{
-	snd_ambient = false;
-}
-
-
-void
-S_AmbientOn (void)
-{
-	snd_ambient = true;
-}
-
-
-void
+static void
 S_SoundInfo_f (void)
 {
 	if (!sound_started || !shm) {
@@ -148,7 +133,7 @@
 ================
 */
 
-void
+static void
 S_Startup (void)
 {
 	int         rc;
@@ -284,7 +269,7 @@
 
 ==================
 */
-sfx_t      *
+static sfx_t      *
 S_FindName (char *name)
 {
 	int         i;
@@ -345,7 +330,7 @@
 SND_PickChannel
 =================
 */
-channel_t  *
+static channel_t  *
 SND_PickChannel (int entnum, int entchannel)
 {
 	int         ch_idx;
@@ -390,7 +375,7 @@
 SND_Spatialize
 =================
 */
-void
+static void
 SND_Spatialize (channel_t *ch)
 {
 	vec_t       dot;
@@ -541,13 +526,13 @@
 		S_ClearBuffer ();
 }
 
-void
+static void
 S_StopAllSoundsC (void)
 {
 	S_StopAllSounds (true);
 }
 
-void
+static void
 S_ClearBuffer (void)
 {
 	int         clear;
@@ -611,7 +596,7 @@
 S_UpdateAmbientSounds
 ===================
 */
-void
+static void
 S_UpdateAmbientSounds (void)
 {
 	mleaf_t    *l;
@@ -619,9 +604,6 @@
 	int         ambient_channel;
 	channel_t  *chan;
 
-	if (!snd_ambient)
-		return;
-
 // calc ambient sound levels
 	if (!cl.worldmodel)
 		return;
@@ -746,7 +728,7 @@
 	S_Update_ ();
 }
 
-void
+static void
 GetSoundtime (void)
 {
 	int         samplepos;
@@ -784,7 +766,7 @@
 }
 
 
-void
+static void
 S_Update_ (void)
 {
 	Uint32	endtime;
@@ -820,7 +802,7 @@
 ===============================================================================
 */
 
-void
+static void
 S_Play (void)
 {
 	static int  hash = 345;
@@ -841,7 +823,7 @@
 	}
 }
 
-void
+static void
 S_PlayVol (void)
 {
 	static int  hash = 543;
@@ -864,7 +846,7 @@
 	}
 }
 
-void
+static void
 S_SoundList (void)
 {
 	int         i;
@@ -903,22 +885,4 @@
 		return;
 	}
 	S_StartSound (cl.viewentity, -1, sfx, vec3_origin, 1, 1);
-}
-
-
-void
-S_ClearPrecache (void)
-{
-}
-
-
-void
-S_BeginPrecaching (void)
-{
-}
-
-
-void
-S_EndPrecaching (void)
-{
 }
Index: twilight/src/qw/sv_ccmds.c
diff -u twilight/src/qw/sv_ccmds.c:1.3 twilight/src/qw/sv_ccmds.c:1.4
--- twilight/src/qw/sv_ccmds.c:1.3	Sun Apr  6 17:57:27 2003
+++ twilight/src/qw/sv_ccmds.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_ccmds.c,v 1.3 2003/04/06 21:57:27 rain Exp $";
+    "$Id: sv_ccmds.c,v 1.4 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -62,7 +62,7 @@
 Make a master server current
 ====================
 */
-void
+static void
 SV_SetMaster_f (void)
 {
 	char        data[2];
@@ -98,7 +98,7 @@
 SV_Quit_f
 ==================
 */
-void
+static void
 SV_Quit_f (void)
 {
 	SV_FinalMessage ("server shutdown\n");
@@ -112,7 +112,7 @@
 SV_Logfile_f
 ============
 */
-void
+static void
 SV_Logfile_f (void)
 {
 	if (sys_logname->svalue)
@@ -132,7 +132,7 @@
 SV_Fraglogfile_f
 ============
 */
-void
+static void
 SV_Fraglogfile_f (void)
 {
 	char        name[MAX_OSPATH];
@@ -173,7 +173,7 @@
 Sets host_client and sv_player to the player with idnum Cmd_Argv(1)
 ==================
 */
-qboolean
+static qboolean
 SV_SetPlayer (void)
 {
 	client_t   *cl;
@@ -203,7 +203,7 @@
 Sets client to godmode
 ==================
 */
-void
+static void
 SV_God_f (void)
 {
 	if (!sv_allow_cheats) {
@@ -223,7 +223,7 @@
 }
 
 
-void
+static void
 SV_Noclip_f (void)
 {
 	if (!sv_allow_cheats) {
@@ -250,7 +250,7 @@
 SV_Give_f
 ==================
 */
-void
+static void
 SV_Give_f (void)
 {
 	char       *t;
@@ -309,7 +309,7 @@
 command from the console or progs.
 ======================
 */
-void
+static void
 SV_Map_f (void)
 {
 	char        level[MAX_QPATH];
@@ -347,7 +347,7 @@
 Kick a user off of the server
 ==================
 */
-void
+static void
 SV_Kick_f (void)
 {
 	int         i;
@@ -378,7 +378,7 @@
 SV_Status_f
 ================
 */
-void
+static void
 SV_Status_f (void)
 {
 	int         i, j, l;
@@ -482,7 +482,7 @@
 SV_ConSay_f
 ==================
 */
-void
+static void
 SV_ConSay_f (void)
 {
 	client_t   *client;
@@ -516,7 +516,7 @@
 SV_Heartbeat_f
 ==================
 */
-void
+static void
 SV_Heartbeat_f (void)
 {
 	svs.last_heartbeat = -9999;
@@ -540,7 +540,7 @@
   Examine or change the serverinfo string
 ===========
 */
-void
+static void
 SV_Serverinfo_f (void)
 {
 	cvar_t     *var;
@@ -579,7 +579,7 @@
   Examine or change the serverinfo string
 ===========
 */
-void
+static void
 SV_Localinfo_f (void)
 {
 	if (Cmd_Argc () == 1) {
@@ -609,7 +609,7 @@
 Examine a users info strings
 ===========
 */
-void
+static void
 SV_User_f (void)
 {
 	if (Cmd_Argc () != 2) {
@@ -630,7 +630,7 @@
 Sets the fake *gamedir to a different directory.
 ================
 */
-void
+static void
 SV_Gamedir (void)
 {
 	char       *dir;
@@ -665,7 +665,7 @@
 ================
 */
 
-void
+static void
 SV_Floodprot_f (void)
 {
 	int         arg1, arg2, arg3;
@@ -707,7 +707,7 @@
 	fp_secondsdead = arg3;
 }
 
-void
+static void
 SV_Floodprotmsg_f (void)
 {
 	if (Cmd_Argc () == 1) {
@@ -728,7 +728,7 @@
 ================
 */
 extern char        gamedirfile[MAX_OSPATH];
-void
+static void
 SV_Gamedir_f (void)
 {
 	char       *dir;
@@ -760,7 +760,7 @@
 SV_Snap
 ================
 */
-void
+static void
 SV_Snap (int uid)
 {
 	client_t   *cl;
@@ -815,7 +815,7 @@
 SV_Snap_f
 ================
 */
-void
+static void
 SV_Snap_f (void)
 {
 	int         uid;
@@ -835,7 +835,7 @@
 SV_Snap
 ================
 */
-void
+static void
 SV_SnapAll_f (void)
 {
 	client_t   *cl;
Index: twilight/src/qw/sv_ents.c
diff -u twilight/src/qw/sv_ents.c:1.5 twilight/src/qw/sv_ents.c:1.6
--- twilight/src/qw/sv_ents.c:1.5	Tue Aug  6 10:59:09 2002
+++ twilight/src/qw/sv_ents.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_ents.c,v 1.5 2002/08/06 14:59:09 warp Exp $";
+    "$Id: sv_ents.c,v 1.6 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -54,7 +54,7 @@
 int         fatbytes;
 Uint8       fatpvs[MAX_MAP_LEAFS / 8];
 
-void
+static void
 SV_AddToFatPVS (vec3_t org, mnode_t *node)
 {
 	int         i;
@@ -95,7 +95,7 @@
 given point.
 =============
 */
-Uint8 *
+static Uint8 *
 SV_FatPVS (vec3_t org)
 {
 	fatbytes = (sv.worldmodel->brush->numleafs + 31) >> 3;
@@ -114,7 +114,7 @@
 
 extern int  sv_nailmodel, sv_supernailmodel, sv_playermodel;
 
-qboolean
+static qboolean
 SV_AddNailUpdate (edict_t *ent)
 {
 	if (ent->v.modelindex != sv_nailmodel
@@ -127,7 +127,7 @@
 	return true;
 }
 
-void
+static void
 SV_EmitNailUpdate (sizebuf_t *msg)
 {
 	Uint8       bits[6];				// [48 bits] xyzpy 12 12 12 4 8 
@@ -174,7 +174,7 @@
 Can delta from either a baseline or a previous packet_entity
 ==================
 */
-void
+static void
 SV_WriteDelta (entity_state_t *from, entity_state_t *to, sizebuf_t *msg,
 			   qboolean force)
 {
@@ -270,7 +270,7 @@
 
 =============
 */
-void
+static void
 SV_EmitPacketEntities (client_t *client, packet_entities_t *to, sizebuf_t *msg)
 {
 	edict_t    *ent;
@@ -336,7 +336,7 @@
 
 =============
 */
-void
+static void
 SV_WritePlayersToClient (client_t *client, edict_t *clent, Uint8 *pvs,
 		sizebuf_t *msg)
 {
Index: twilight/src/qw/sv_init.c
diff -u twilight/src/qw/sv_init.c:1.9 twilight/src/qw/sv_init.c:1.10
--- twilight/src/qw/sv_init.c:1.9	Mon Aug 19 10:09:06 2002
+++ twilight/src/qw/sv_init.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_init.c,v 1.9 2002/08/19 14:09:06 warp Exp $";
+    "$Id: sv_init.c,v 1.10 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -102,7 +102,7 @@
 baseline will be transmitted
 ================
 */
-void
+static void
 SV_CreateBaseline (void)
 {
 	int			i;
@@ -172,7 +172,7 @@
 transition to another level
 ================
 */
-void
+static void
 SV_SaveSpawnparms (void)
 {
 	int         i, j;
@@ -206,7 +206,7 @@
 (Potentially Hearable Set)
 ================
 */
-void
+static void
 SV_CalcPHS (void)
 {
 	int         rowbytes, rowwords;
@@ -273,7 +273,7 @@
 				vcount / num, count / num, num);
 }
 
-unsigned
+static unsigned
 SV_CheckModel (char *mdl)
 {
 	Uint8	*buf;
Index: twilight/src/qw/sv_main.c
diff -u twilight/src/qw/sv_main.c:1.5 twilight/src/qw/sv_main.c:1.6
--- twilight/src/qw/sv_main.c:1.5	Sun Nov 17 18:32:20 2002
+++ twilight/src/qw/sv_main.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_main.c,v 1.5 2002/11/17 23:32:20 rain Exp $";
+    "$Id: sv_main.c,v 1.6 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -353,7 +353,7 @@
 This message can be up to around 5k with worst case string lengths.
 ================
 */
-void
+static void
 SVC_Status (void)
 {
 	int         i;
@@ -391,7 +391,7 @@
 */
 #define	LOG_HIGHWATER	4096
 #define	LOG_FLUSH		10*60
-void
+static void
 SV_CheckLog (void)
 {
 	sizebuf_t  *sz;
@@ -422,7 +422,7 @@
 instead of the data.
 ================
 */
-void
+static void
 SVC_Log (void)
 {
 	int         seq;
@@ -458,7 +458,7 @@
 Just responds with an acknowledgement
 ================
 */
-void
+static void
 SVC_Ping (void)
 {
 	char        data;
@@ -479,7 +479,7 @@
 challenge, they must give a valid IP address.
 =================
 */
-void
+static void
 SVC_GetChallenge (void)
 {
 	int         i;
@@ -518,7 +518,7 @@
 A connection request that did not come from the master
 ==================
 */
-void
+static void
 SVC_DirectConnect (void)
 {
 	char        userinfo[1024];
@@ -743,7 +743,7 @@
 Redirect all printfs
 ===============
 */
-void
+static void
 SVC_RemoteCommand (void)
 {
 	int         i;
@@ -794,7 +794,7 @@
 connectionless packets.
 =================
 */
-void
+static void
 SV_ConnectionlessPacket (void)
 {
 	char       *s;
@@ -928,7 +928,7 @@
 SV_AddIP_f
 =================
 */
-void
+static void
 SV_AddIP_f (void)
 {
 	int         i;
@@ -953,7 +953,7 @@
 SV_RemoveIP_f
 =================
 */
-void
+static void
 SV_RemoveIP_f (void)
 {
 	ipfilter_t  f;
@@ -977,7 +977,7 @@
 SV_ListIP_f
 =================
 */
-void
+static void
 SV_ListIP_f (void)
 {
 	int         i;
@@ -995,7 +995,7 @@
 SV_WriteIP_f
 =================
 */
-void
+static void
 SV_WriteIP_f (void)
 {
 	FILE       *f;
@@ -1026,7 +1026,7 @@
 SV_SendBan
 =================
 */
-void
+static void
 SV_SendBan (void)
 {
 	Netchan_OutOfBandPrint (NS_SERVER, net_from, "%c\nbanned.\n", A2C_PRINT);
@@ -1037,7 +1037,7 @@
 SV_FilterPacket
 =================
 */
-qboolean
+static qboolean
 SV_FilterPacket (void)
 {
 	int         i;
@@ -1059,7 +1059,7 @@
 SV_ReadPackets
 =================
 */
-void
+static void
 SV_ReadPackets (void)
 {
 	int         i;
@@ -1126,7 +1126,7 @@
 if necessary
 ==================
 */
-void
+static void
 SV_CheckTimeouts (void)
 {
 	int         i;
@@ -1165,7 +1165,7 @@
 Add them exactly as if they had been typed at the console
 ===================
 */
-void
+static void
 SV_GetConsoleCommands (void)
 {
 	char       *cmd;
@@ -1184,7 +1184,7 @@
 
 ===================
 */
-void
+static void
 SV_CheckVars (void)
 {
 	static char *pw, *spw;
@@ -1277,7 +1277,7 @@
 SV_InitLocal
 ===============
 */
-void
+static void
 SV_InitLocal (void)
 {
 	int         i;
@@ -1592,7 +1592,7 @@
 SV_InitNet
 ====================
 */
-void
+static void
 SV_InitNet (void)
 {
 	Uint	port;
Index: twilight/src/qw/sv_move.c
diff -u twilight/src/qw/sv_move.c:1.1 twilight/src/qw/sv_move.c:1.2
--- twilight/src/qw/sv_move.c:1.1	Fri Jun  7 18:23:13 2002
+++ twilight/src/qw/sv_move.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_move.c,v 1.1 2002/06/07 22:23:13 knghtbrd Exp $";
+    "$Id: sv_move.c,v 1.2 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -239,7 +239,7 @@
 ======================
 */
 void        PF_changeyaw (void);
-qboolean
+static qboolean
 SV_StepDirection (edict_t *ent, float yaw, float dist)
 {
 	vec3_t      move, oldorigin;
@@ -274,7 +274,7 @@
 
 ======================
 */
-void
+static void
 SV_FixCheckBottom (edict_t *ent)
 {
 	ent->v.flags = (int) ent->v.flags | FL_PARTIALGROUND;
@@ -289,7 +289,7 @@
 ================
 */
 #define	DI_NODIR	-1
-void
+static void
 SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
 {
 	float       deltax, deltay;
@@ -325,7 +325,7 @@
 			return;
 	}
 // try other directions
-	if (((rand () & 3) & 1) || Q_abs (deltay) > Q_abs (deltax)) {
+	if (((rand () & 3) & 1) || abs (deltay) > abs (deltax)) {
 		tdir = d[1];
 		d[1] = d[2];
 		d[2] = tdir;
@@ -374,7 +374,7 @@
 
 ======================
 */
-qboolean
+static qboolean
 SV_CloseEnough (edict_t *ent, edict_t *goal, float dist)
 {
 	int         i;
Index: twilight/src/qw/sv_phys.c
diff -u twilight/src/qw/sv_phys.c:1.2 twilight/src/qw/sv_phys.c:1.3
--- twilight/src/qw/sv_phys.c:1.2	Fri Jul 26 15:48:52 2002
+++ twilight/src/qw/sv_phys.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_phys.c,v 1.2 2002/07/26 19:48:52 knghtbrd Exp $";
+    "$Id: sv_phys.c,v 1.3 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -72,41 +72,14 @@
 
 #define	MOVE_EPSILON	0.01
 
-void        SV_Physics_Toss (edict_t *ent);
+static void        SV_Physics_Toss (edict_t *ent);
 
 /*
 ================
-SV_CheckAllEnts
-================
-*/
-void
-SV_CheckAllEnts (void)
-{
-	Uint		e;
-	edict_t		*check;
-
-	// see if any solid entities are inside the final position
-	check = NEXT_EDICT (sv.edicts);
-	for (e = 1; e < sv.num_edicts; e++, check = NEXT_EDICT (check))
-	{
-		if (check->free)
-			continue;
-		if (check->v.movetype == MOVETYPE_PUSH
-				|| check->v.movetype == MOVETYPE_NONE
-				|| check->v.movetype == MOVETYPE_NOCLIP)
-			continue;
-
-		if (SV_TestEntityPosition (check))
-			Com_Printf ("entity in invalid position\n");
-	}
-}
-
-/*
-================
 SV_CheckVelocity
 ================
 */
-void
+static void
 SV_CheckVelocity (edict_t *ent)
 {
 	int         i;
@@ -181,7 +154,7 @@
 Two entities have touched, so run their touch functions
 ==================
 */
-void
+static void
 SV_Impact (edict_t *e1, edict_t *e2)
 {
 	int         old_self, old_other;
@@ -217,7 +190,7 @@
 */
 #define	STOP_EPSILON	0.1
 
-int
+static int
 ClipVelocity (vec3_t in, dvec3_t normal, vec3_t out, float overbounce)
 {
 	float       backoff;
@@ -256,7 +229,7 @@
 ============
 */
 #define	MAX_CLIP_PLANES	5
-int
+static int
 SV_FlyMove (edict_t *ent, float time, trace_t *steptrace)
 {
 	int         bumpcount, numbumps;
@@ -381,7 +354,7 @@
 
 ============
 */
-void
+static void
 SV_AddGravity (edict_t *ent, float scale)
 {
 	ent->v.velocity[2] -= scale * movevars.gravity * host_frametime;
@@ -402,7 +375,7 @@
 Does not change the entities velocity at all
 ============
 */
-trace_t
+static trace_t
 SV_PushEntity (edict_t *ent, vec3_t push)
 {
 	trace_t     trace;
@@ -440,7 +413,7 @@
 
 ============
 */
-qboolean
+static qboolean
 SV_Push (edict_t *pusher, vec3_t move)
 {
 	Uint		i, e, savesolid;
@@ -576,7 +549,7 @@
 
 ============
 */
-void
+static void
 SV_PushMove (edict_t *pusher, float movetime)
 {
 	int			i;
@@ -603,7 +576,7 @@
 
 ================
 */
-void
+static void
 SV_Physics_Pusher (edict_t *ent)
 {
 	float       thinktime;
@@ -655,7 +628,7 @@
 Non moving objects can only think
 =============
 */
-void
+static void
 SV_Physics_None (edict_t *ent)
 {
 // regular thinking
@@ -671,7 +644,7 @@
 A moving object that doesn't obey physics
 =============
 */
-void
+static void
 SV_Physics_Noclip (edict_t *ent)
 {
 // regular thinking
@@ -698,7 +671,7 @@
 
 =============
 */
-void
+static void
 SV_CheckWaterTransition (edict_t *ent)
 {
 	int         cont;
@@ -732,7 +705,7 @@
 Toss, bounce, and fly movement.  When onground, do nothing.
 =============
 */
-void
+static void
 SV_Physics_Toss (edict_t *ent)
 {
 	trace_t     trace;
@@ -809,7 +782,7 @@
 FIXME: is this true?
 =============
 */
-void
+static void
 SV_Physics_Step (edict_t *ent)
 {
 	qboolean    hitsound;
@@ -856,7 +829,7 @@
 
 ================
 */
-void
+static void
 SV_RunEntity (edict_t *ent)
 {
 	if (ent->lastruntime == sv.time)
Index: twilight/src/qw/sv_send.c
diff -u twilight/src/qw/sv_send.c:1.4 twilight/src/qw/sv_send.c:1.5
--- twilight/src/qw/sv_send.c:1.4	Tue Aug  6 10:59:09 2002
+++ twilight/src/qw/sv_send.c	Fri Apr 18 17:09:17 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_send.c,v 1.4 2002/08/06 14:59:09 warp Exp $";
+    "$Id: sv_send.c,v 1.5 2003/04/18 21:09:17 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -64,7 +64,7 @@
 SV_FlushRedirect
 ==================
 */
-void
+static void
 SV_FlushRedirect (void)
 {
 	if (sv_redirected == RD_PACKET) {
@@ -81,7 +81,7 @@
 	sv_outputbuf[0] = 0;
 }
 
-void
+static void
 SV_RedirectedPrint (char *msg)
 {
 	// add to redirected message
@@ -432,7 +432,7 @@
 
 ==================
 */
-void
+static void
 SV_WriteClientdataToMessage (client_t *client, sizebuf_t *msg)
 {
 	int         i;
@@ -478,7 +478,7 @@
 when a reliable message can be delivered this frame.
 =======================
 */
-void
+static void
 SV_UpdateClientStats (client_t *client)
 {
 	edict_t    *ent;
@@ -527,7 +527,7 @@
 SV_SendClientDatagram
 =======================
 */
-qboolean
+static qboolean
 SV_SendClientDatagram (client_t *client)
 {
 	Uint8       buf[MAX_DATAGRAM];
@@ -573,7 +573,7 @@
 SV_UpdateToReliableMessages
 =======================
 */
-void
+static void
 SV_UpdateToReliableMessages (void)
 {
 	int         i, j;
Index: twilight/src/qw/sv_sys.c
diff -u twilight/src/qw/sv_sys.c:1.12 twilight/src/qw/sv_sys.c:1.13
--- twilight/src/qw/sv_sys.c:1.12	Fri Apr  4 21:46:44 2003
+++ twilight/src/qw/sv_sys.c	Fri Apr 18 17:09:18 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_sys.c,v 1.12 2003/04/05 02:46:44 havoc Exp $";
+    "$Id: sv_sys.c,v 1.13 2003/04/18 21:09:18 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -515,6 +515,7 @@
 #ifdef _CONSOLE 
 #undef main
 #endif
+extern void CL_Init (void);
 
 int
 main (int argc, char *argv[])
Index: twilight/src/qw/sv_user.c
diff -u twilight/src/qw/sv_user.c:1.6 twilight/src/qw/sv_user.c:1.7
--- twilight/src/qw/sv_user.c:1.6	Tue Aug  6 10:59:09 2002
+++ twilight/src/qw/sv_user.c	Fri Apr 18 17:09:18 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sv_user.c,v 1.6 2002/08/06 14:59:09 warp Exp $";
+    "$Id: sv_user.c,v 1.7 2003/04/18 21:09:18 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -81,7 +81,7 @@
 This will be sent on the initial connection and upon each server load.
 ================
 */
-void
+static void
 SV_New_f (void)
 {
 	char       *gamedir;
@@ -151,7 +151,7 @@
 SV_Soundlist_f
 ==================
 */
-void
+static void
 SV_Soundlist_f (void)
 {
 	char      **s;
@@ -205,7 +205,7 @@
 SV_Modellist_f
 ==================
 */
-void
+static void
 SV_Modellist_f (void)
 {
 	char      **s;
@@ -258,7 +258,7 @@
 SV_PreSpawn_f
 ==================
 */
-void
+static void
 SV_PreSpawn_f (void)
 {
 	Sint32	buf;
@@ -325,7 +325,7 @@
 SV_Spawn_f
 ==================
 */
-void
+static void
 SV_Spawn_f (void)
 {
 	int         i;
@@ -426,7 +426,7 @@
 SV_SpawnSpectator
 ==================
 */
-void
+static void
 SV_SpawnSpectator (void)
 {
 	Uint		i;
@@ -453,7 +453,7 @@
 SV_Begin_f
 ==================
 */
-void
+static void
 SV_Begin_f (void)
 {
 	unsigned    pmodel = 0, emodel = 0;
@@ -534,7 +534,7 @@
 SV_NextDownload_f
 ==================
 */
-void
+static void
 SV_NextDownload_f (void)
 {
 	Uint8       buffer[1024];
@@ -573,7 +573,7 @@
 SV_NextUpload
 ==================
 */
-void
+static void
 SV_NextUpload (void)
 {
 	int         percent;
@@ -651,7 +651,7 @@
 SV_BeginDownload_f
 ==================
 */
-void
+static void
 SV_BeginDownload_f (void)
 {
 	char			*name, *p;
@@ -726,7 +726,7 @@
 SV_Say
 ==================
 */
-void
+static void
 SV_Say (qboolean team)
 {
 	client_t   *client;
@@ -823,7 +823,7 @@
 SV_Say_f
 ==================
 */
-void
+static void
 SV_Say_f (void)
 {
 	SV_Say (false);
@@ -834,7 +834,7 @@
 SV_Say_Team_f
 ==================
 */
-void
+static void
 SV_Say_Team_f (void)
 {
 	SV_Say (true);
@@ -852,7 +852,7 @@
 clients
 =================
 */
-void
+static void
 SV_Pings_f (void)
 {
 	client_t   *client;
@@ -879,7 +879,7 @@
 SV_Kill_f
 ==================
 */
-void
+static void
 SV_Kill_f (void)
 {
 	if (sv_player->v.health <= 0) 
@@ -926,7 +926,7 @@
 SV_Pause_f
 ==================
 */
-void
+static void
 SV_Pause_f (void)
 {
 	char        st[sizeof (host_client->name) + 32];
@@ -960,7 +960,7 @@
 The client is going to disconnect, so remove the connection immediately
 =================
 */
-void
+static void
 SV_Drop_f (void)
 {
 	SV_EndRedirect ();
@@ -976,7 +976,7 @@
 Change the bandwidth estimate for a client
 =================
 */
-void
+static void
 SV_PTrack_f (void)
 {
 	int         i;
@@ -1021,7 +1021,7 @@
 Change the bandwidth estimate for a client
 =================
 */
-void
+static void
 SV_Rate_f (void)
 {
 	int         rate;
@@ -1048,7 +1048,7 @@
 Change the message level for a client
 =================
 */
-void
+static void
 SV_Msg_f (void)
 {
 	if (Cmd_Argc () != 2) 
@@ -1071,7 +1071,7 @@
 Allow clients to change userinfo
 ==================
 */
-void
+static void
 SV_SetInfo_f (void)
 {
 	int         i;
@@ -1123,13 +1123,13 @@
 Dumps the serverinfo info string
 ==================
 */
-void
+static void
 SV_ShowServerinfo_f (void)
 {
 	Info_Print (svs.info);
 }
 
-void
+static void
 SV_NoSnap_f (void)
 {
 	if (*host_client->uploadfn) 
@@ -1184,7 +1184,7 @@
 SV_ExecuteUserCommand
 ==================
 */
-void
+static void
 SV_ExecuteUserCommand (char *s)
 {
 	ucmd_t     *u;
@@ -1260,7 +1260,7 @@
 
 ====================
 */
-void
+static void
 AddLinksToPmove (areanode_t *node)
 {
 	link_t     *l, *next;
@@ -1318,65 +1318,7 @@
 		AddLinksToPmove (node->children[1]);
 }
 
-
 /*
-================
-AddAllEntsToPmove
-
-For debugging
-================
-*/
-void
-AddAllEntsToPmove (void)
-{
-	Uint		e;
-	edict_t		*check;
-	Uint		i;
-	physent_t	*pe;
-	int			pl;
-
-	pl = EDICT_TO_PROG (sv_player);
-	check = NEXT_EDICT (sv.edicts);
-	for (e = 1; e < sv.num_edicts; e++, check = NEXT_EDICT (check))
-	{
-		if (check->free)
-			continue;
-		if (check->v.owner == pl)
-			continue;
-		if (check->v.solid == SOLID_BSP
-				|| check->v.solid == SOLID_BBOX
-				|| check->v.solid == SOLID_SLIDEBOX)
-		{
-			if (check == sv_player)
-				continue;
-
-			for (i = 0; i < 3; i++)
-				if (check->v.absmin[i] > pmove_maxs[i]
-						|| check->v.absmax[i] < pmove_mins[i])
-					break;
-			if (i != 3)
-				continue;
-			pe = &pmove.physents[pmove.numphysent];
-
-			VectorCopy (check->v.origin, pe->origin);
-			pe->info = e;
-			pe->id = -1;
-			if (check->v.solid == SOLID_BSP)
-				pe->model = sv.models[(int) (check->v.modelindex)];
-			else
-			{
-				pe->model = NULL;
-				VectorCopy (check->v.mins, pe->mins);
-				VectorCopy (check->v.maxs, pe->maxs);
-			}
-
-			if (++pmove.numphysent == MAX_PHYSENTS)
-				break;
-		}
-	}
-}
-
-/*
 ===========
 SV_PreRunCmd
 ===========
@@ -1384,7 +1326,7 @@
 */
 Uint8       playertouch[(MAX_EDICTS + 7) / 8];
 
-void
+static void
 SV_PreRunCmd (void)
 {
 	memset (playertouch, 0, sizeof (playertouch));
@@ -1395,7 +1337,7 @@
 SV_RunCmd
 ===========
 */
-void
+static void
 SV_RunCmd (usercmd_t *ucmd, qboolean inside)
 {
 	edict_t    *ent;
@@ -1549,7 +1491,7 @@
 ===========
 Done after running a player command.
 */
-void
+static void
 SV_PostRunCmd (void)
 {
 	// run post-think
Index: twilight/src/qw/teamplay.c
diff -u twilight/src/qw/teamplay.c:1.2 twilight/src/qw/teamplay.c:1.3
--- twilight/src/qw/teamplay.c:1.2	Fri Feb 21 01:33:00 2003
+++ twilight/src/qw/teamplay.c	Fri Apr 18 17:09:18 2003
@@ -23,7 +23,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: teamplay.c,v 1.2 2003/02/21 06:33:00 warp Exp $
+	$Id: teamplay.c,v 1.3 2003/04/18 21:09:18 warp Exp $
 */
 
 #include "twiconfig.h"
@@ -231,7 +231,7 @@
 	cl_parsesay = Cvar_Get ("cl_parsesay", "0", CVAR_NONE, NULL);
 }
 
-void
+static void
 Team_loc (void)
 {
 	char		*desc = NULL;
Index: twilight/src/qw/vid_sdl.c
diff -u twilight/src/qw/vid_sdl.c:1.126 twilight/src/qw/vid_sdl.c:1.127
--- twilight/src/qw/vid_sdl.c:1.126	Thu Apr 17 23:01:08 2003
+++ twilight/src/qw/vid_sdl.c	Fri Apr 18 17:09:18 2003
@@ -24,7 +24,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: vid_sdl.c,v 1.126 2003/04/18 03:01:08 warp Exp $";
+    "$Id: vid_sdl.c,v 1.127 2003/04/18 21:09:18 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -63,8 +63,8 @@
 
 /*-----------------------------------------------------------------------*/
 
-void I_KeypadMode (cvar_t *cvar);
-void IN_WindowedMouse (cvar_t *cvar);
+static void I_KeypadMode (cvar_t *cvar);
+static void IN_WindowedMouse (cvar_t *cvar);
 
 /*-----------------------------------------------------------------------*/
 void
@@ -78,7 +78,7 @@
 GL_Init
 ===============
 */
-void
+static void
 GL_Init (void)
 {
 	qglFinish ();
@@ -477,12 +477,6 @@
 
 
 void
-Force_CenterView_f (void)
-{
-	cl.viewangles[PITCH] = 0;
-}
-
-void
 IN_Init (void)
 {
 	mouse_x = 0.0f;
@@ -495,7 +489,7 @@
 {
 }
 
-void
+static void
 IN_WindowedMouse (cvar_t *cvar)
 {
 	cvar = cvar;
@@ -515,7 +509,7 @@
 		SDL_WM_GrabInput (SDL_GRAB_ON);
 }
 
-void
+static void
 I_KeypadMode (cvar_t *cvar)
 {
 	keypadmode = !!cvar->ivalue;
Index: twilight/src/qw/view.c
diff -u twilight/src/qw/view.c:1.41 twilight/src/qw/view.c:1.42
--- twilight/src/qw/view.c:1.41	Wed Jan 29 15:00:42 2003
+++ twilight/src/qw/view.c	Fri Apr 18 17:09:18 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: view.c,v 1.41 2003/01/29 20:00:42 warp Exp $";
+    "$Id: view.c,v 1.42 2003/04/18 21:09:18 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -128,7 +128,7 @@
 
 ===============
 */
-float
+static float
 V_CalcBob (void)
 {
 	static double	bobtime;
@@ -201,7 +201,7 @@
 lookspring is non 0
 ===============
 */
-void
+static void
 V_DriftPitch (void)
 {
 	float	delta, move;
@@ -332,7 +332,7 @@
 V_cshift_f
 ==================
 */
-void
+static void
 V_cshift_f (void)
 {
 	cshift_empty.destcolor[0] = Q_atoi(Cmd_Argv (1));
@@ -348,7 +348,7 @@
 When you run over an item, the server sends this command
 ==================
 */
-void
+static void
 V_BonusFlash_f (void)
 {
 	cl.cshifts[CSHIFT_BONUS].destcolor[0] = 215;
@@ -393,7 +393,7 @@
 V_CalcPowerupCshift
 =============
 */
-void
+static void
 V_CalcPowerupCshift (void)
 {
 	if (cl.stats[STAT_ITEMS] & IT_QUAD) {
@@ -505,31 +505,12 @@
 
 /*
 ==============
-V_BoundOffsets
-==============
-*/
-void
-V_BoundOffsets (void)
-{
-	vec3_t org;
-	
-	VectorCopy (cl.simorg, org);
-
-	/* absolutely bound refresh relative to entity clipping hull
-	   so the view can never be inside a solid wall */
-	r_refdef.vieworg[0] = bound(org[0] - 14, r_refdef.vieworg[0], org[0] + 14);
-	r_refdef.vieworg[1] = bound(org[1] - 14, r_refdef.vieworg[1], org[1] + 14);
-	r_refdef.vieworg[2] = bound(org[2] - 22, r_refdef.vieworg[2], org[2] + 30);
-}
-
-/*
-==============
 V_AddIdle
 
 Idle swaying
 ==============
 */
-void
+static void
 V_AddIdle (void)
 {
 	r_refdef.viewangles[ROLL] +=
@@ -560,7 +541,7 @@
 Roll is induced by movement and damage
 ==============
 */
-void
+static void
 V_CalcViewRoll (void)
 {
 	float       side;
@@ -581,7 +562,7 @@
 
 ==================
 */
-void
+static void
 V_CalcIntermissionRefdef (void)
 {
 	/* view is the weapon model (only visible from inside body) */
@@ -632,7 +613,7 @@
 
 ==================
 */
-void
+static void
 V_CalcRefdef (void)
 {
 	int				i;
@@ -740,7 +721,7 @@
 DropPunchAngle
 =============
 */
-void
+static void
 DropPunchAngle (void)
 {
 	cl.punchangle -= 10 * host_frametime;
Index: twilight/src/qw/world.c
diff -u twilight/src/qw/world.c:1.5 twilight/src/qw/world.c:1.6
--- twilight/src/qw/world.c:1.5	Tue Aug  6 10:59:09 2002
+++ twilight/src/qw/world.c	Fri Apr 18 17:09:18 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: world.c,v 1.5 2002/08/06 14:59:09 warp Exp $";
+    "$Id: world.c,v 1.6 2003/04/18 21:09:18 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -81,7 +81,7 @@
 can just be stored out and get a proper hull_t structure.
 ===================
 */
-void
+static void
 SV_InitBoxHull (void)
 {
 	int         i;
@@ -118,7 +118,7 @@
 BSP trees instead of being compared directly.
 ===================
 */
-hull_t     *
+static hull_t     *
 SV_HullForBox (vec3_t mins, vec3_t maxs)
 {
 	box_planes[0].dist = maxs[0];
@@ -143,7 +143,7 @@
 testing object's origin to get a point to use with the returned hull.
 ================
 */
-hull_t     *
+static hull_t     *
 SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset)
 {
 	model_t    *model;
@@ -205,7 +205,7 @@
 
 ===============
 */
-areanode_t *
+static areanode_t *
 SV_CreateAreaNode (int depth, vec3_t mins, vec3_t maxs)
 {
 	areanode_t *anode;
@@ -282,7 +282,7 @@
 SV_TouchLinks
 ====================
 */
-void
+static void
 SV_TouchLinks (edict_t *ent, areanode_t *node)
 {
 	link_t     *l, *next;
@@ -334,7 +334,7 @@
 
 ===============
 */
-void
+static void
 SV_FindTouchedLeafs (edict_t *ent, mnode_t *node)
 {
 	mplane_t   *splitplane;
@@ -464,7 +464,7 @@
 
 ==================
 */
-int
+static int
 SV_HullPointContents (hull_t *hull, int num, vec3_t p)
 {
 	float       d;
@@ -543,7 +543,7 @@
 
 ==================
 */
-qboolean
+static qboolean
 SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1,
 					   vec3_t p2, trace_t *trace)
 {
@@ -675,7 +675,7 @@
 eventually rotation) of the end points
 ==================
 */
-trace_t
+static trace_t
 SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t maxs,
 					 vec3_t end)
 {
@@ -720,7 +720,7 @@
 Mins and maxs enclose the entire area swept by the move
 ====================
 */
-void
+static void
 SV_ClipToLinks (areanode_t *node, moveclip_t * clip)
 {
 	link_t     *l, *next;
@@ -798,7 +798,7 @@
 SV_MoveBounds
 ==================
 */
-void
+static void
 SV_MoveBounds (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end,
 			   vec3_t boxmins, vec3_t boxmaxs)
 {
@@ -858,65 +858,3 @@
 
 	return clip.trace;
 }
-
-//=============================================================================
-
-/*
-============
-SV_TestPlayerPosition
-
-============
-*/
-edict_t *
-SV_TestPlayerPosition (edict_t *ent, vec3_t origin)
-{
-	hull_t		*hull;
-	edict_t		*check;
-	vec3_t		boxmins, boxmaxs;
-	vec3_t		offset;
-	Uint		e;
-
-	// check world first
-	hull = &sv.worldmodel->hulls[1];
-	if (SV_HullPointContents (hull, hull->firstclipnode, origin)
-			!= CONTENTS_EMPTY)
-		return sv.edicts;
-
-	// check all entities
-	VectorAdd (origin, ent->v.mins, boxmins);
-	VectorAdd (origin, ent->v.maxs, boxmaxs);
-
-	check = NEXT_EDICT (sv.edicts);
-	for (e = 1; e < sv.num_edicts; e++, check = NEXT_EDICT (check))
-	{
-		if (check->free)
-			continue;
-		if (check->v.solid != SOLID_BSP &&
-			check->v.solid != SOLID_BBOX && check->v.solid != SOLID_SLIDEBOX)
-			continue;
-
-		if (boxmins[0] > check->v.absmax[0]
-				|| boxmins[1] > check->v.absmax[1]
-				|| boxmins[2] > check->v.absmax[2]
-				|| boxmaxs[0] < check->v.absmin[0]
-				|| boxmaxs[1] < check->v.absmin[1]
-				|| boxmaxs[2] < check->v.absmin[2])
-			continue;
-
-		if (check == ent)
-			continue;
-
-		// get the clipping hull
-		hull = SV_HullForEntity (check, ent->v.mins, ent->v.maxs, offset);
-
-		VectorSubtract (origin, offset, offset);
-
-		// test the point
-		if (SV_HullPointContents (hull, hull->firstclipnode, offset)
-				!= CONTENTS_EMPTY)
-			return check;
-	}
-
-	return NULL;
-}
-
Index: twilight/src/qw/world.h
diff -u twilight/src/qw/world.h:1.1 twilight/src/qw/world.h:1.2
--- twilight/src/qw/world.h:1.1	Fri Jun  7 18:23:14 2002
+++ twilight/src/qw/world.h	Fri Apr 18 17:09:18 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: world.h,v 1.1 2002/06/07 22:23:14 knghtbrd Exp $
+	$Id: world.h,v 1.2 2003/04/18 21:09:18 warp Exp $
 */
 // world.h
 
@@ -106,8 +106,6 @@
 
 // passedict is explicitly excluded from clipping checks (normally NULL)
 
-
-struct edict_s    *SV_TestPlayerPosition (struct edict_s *ent, vec3_t origin);
 
 #endif // __WORLD_H
 
Index: twilight/src/renderer/dglfuncs.h
diff -u twilight/src/renderer/dglfuncs.h:1.12 twilight/src/renderer/dglfuncs.h:1.13
--- twilight/src/renderer/dglfuncs.h:1.12	Sun Apr  6 17:57:27 2003
+++ twilight/src/renderer/dglfuncs.h	Fri Apr 18 17:09:18 2003
@@ -29,7 +29,7 @@
 	WARRANTY whatsoever, express or implied, in the hopes that others will use
 	it instead of other less-evolved hacks which usually don't work right.  ;)
 
-	$Id: dglfuncs.h,v 1.12 2003/04/06 21:57:27 rain Exp $
+	$Id: dglfuncs.h,v 1.13 2003/04/18 21:09:18 warp Exp $
 */
 
 #define DYNGL_DONT_NEED(ret, func, params)
@@ -86,7 +86,7 @@
 DYNGL_EXT (void, glLockArraysEXT, (GLint, GLsizei), "GL_EXT_compiled_vertex_array")
 DYNGL_NEED (void, glMatrixMode, (GLenum mode))
 DYNGL_WANT (void, glLoadTransposeMatrixf, (const GLfloat * m), Alt_glLoadTransposeMatrixf)
-DYNGL_WANT (void, glMultTransposeMatrixf, (const GLfloat * m), Alt_glLoadTransposeMatrixf)
+DYNGL_WANT (void, glMultTransposeMatrixf, (const GLfloat * m), Alt_glMultTransposeMatrixf)
 DYNGL_EXT (void, glLoadTransposeMatrixfARB, (const GLfloat * m), "GL_ARB_transpose_matrix")
 DYNGL_EXT (void, glMultTransposeMatrixfARB, (const GLfloat * m), "GL_ARB_transpose_matrix")
 DYNGL_NEED (void, glLoadMatrixf, (const GLfloat * m))
Index: twilight/src/renderer/dyngl.c
diff -u twilight/src/renderer/dyngl.c:1.9 twilight/src/renderer/dyngl.c:1.10
--- twilight/src/renderer/dyngl.c:1.9	Wed Nov 20 18:57:38 2002
+++ twilight/src/renderer/dyngl.c	Fri Apr 18 17:09:18 2003
@@ -11,7 +11,7 @@
 	other less-evolved hacks which usually don't work right.  ;)
 */
 static const char rcsid[] =
-"$Id: dyngl.c,v 1.9 2002/11/20 23:57:38 warp Exp $";
+"$Id: dyngl.c,v 1.10 2003/04/18 21:09:18 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -33,7 +33,7 @@
  * officially by OpenGL 1.2, but may not exist in old/crappy drivers.  ;)
  */
 
-DYNGLCALL void DYNGLENTRY
+static void DYNGLENTRY
 Alt_glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count,
 		GLenum type, const GLvoid *indices)
 {
@@ -45,7 +45,7 @@
 
 static matrix4x4_t	conv_matrix;
 
-DYNGLCALL void DYNGLENTRY
+static void DYNGLENTRY
 Alt_glLoadTransposeMatrixf (const GLfloat * m)
 {
 	if (qglLoadTransposeMatrixfARB)
@@ -57,7 +57,7 @@
 	}
 }
 
-DYNGLCALL void DYNGLENTRY
+static void DYNGLENTRY
 Alt_glMultTransposeMatrixf (const GLfloat * m)
 {
 	if (qglMultTransposeMatrixfARB)
Index: twilight/src/renderer/dyngl.h
diff -u twilight/src/renderer/dyngl.h:1.4 twilight/src/renderer/dyngl.h:1.5
--- twilight/src/renderer/dyngl.h:1.4	Sun Apr  6 08:48:31 2003
+++ twilight/src/renderer/dyngl.h	Fri Apr 18 17:09:18 2003
@@ -29,7 +29,7 @@
 	whatsoever, express or implied, in the hopes that others will use it
 	instead of other less-evolved hacks which usually don't work right.  ;)
 
-	$Id: dyngl.h,v 1.4 2003/04/06 12:48:31 warp Exp $
+	$Id: dyngl.h,v 1.5 2003/04/18 21:09:18 warp Exp $
 */
 
 #ifndef __dyngl_h
@@ -196,7 +196,6 @@
 #define DYNGL_EXT(ret, name, args, extension)								\
 	DYNGLCALL ret (DYNGLENTRY * q##name) args;
 #define DYNGL_WANT(ret, name, args, alt)									\
-	DYNGLCALL ret (DYNGLENTRY alt) args;									\
 	DYNGLCALL ret (DYNGLENTRY * q##name) args;
 #include "dglfuncs.h"
 #undef DYNGL_NEED
Index: twilight/src/renderer/gl_arrays.c
diff -u twilight/src/renderer/gl_arrays.c:1.5 twilight/src/renderer/gl_arrays.c:1.6
--- twilight/src/renderer/gl_arrays.c:1.5	Thu Apr 17 23:19:30 2003
+++ twilight/src/renderer/gl_arrays.c	Fri Apr 18 17:09:18 2003
@@ -22,7 +22,7 @@
 		Boston, MA  02111-1307, USA
 */
 static const char rcsid[] =
-	"$Id: gl_arrays.c,v 1.5 2003/04/18 03:19:30 warp Exp $";
+	"$Id: gl_arrays.c,v 1.6 2003/04/18 21:09:18 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -32,7 +32,7 @@
 #include "dyngl.h"
 #include "gl_arrays.h"
 
-memzone_t	*vzone;
+static memzone_t	*vzone;
 
 texcoord_t	*tc0_array_p;
 texcoord_t	*tc1_array_p;
Index: twilight/src/renderer/gl_info.c
diff -u twilight/src/renderer/gl_info.c:1.14 twilight/src/renderer/gl_info.c:1.15
--- twilight/src/renderer/gl_info.c:1.14	Thu Apr 17 23:19:30 2003
+++ twilight/src/renderer/gl_info.c	Fri Apr 18 17:09:18 2003
@@ -24,7 +24,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: gl_info.c,v 1.14 2003/04/18 03:19:30 warp Exp $";
+    "$Id: gl_info.c,v 1.15 2003/04/18 21:09:18 warp Exp $";
 
 #include "twiconfig.h"
 #include "SDL.h"
@@ -77,7 +77,7 @@
 	Check for buggy OpenGL drivers.
 */
 
-void
+static void
 GLInfo_CheckDriverQuirks (void)
 {
 	/*
@@ -115,7 +115,7 @@
 	Check for the OpenGL extensions we use
 */
 
-void
+static void
 GLInfo_CheckExtensions (void)
 {
 	qboolean	gl_mtexcombine_arb = 0, gl_mtexcombine_ext = 0;
@@ -180,7 +180,7 @@
 			gl_vbo ? "Yes" : "No");
 }
 
-void
+static void
 GL_Info_f (void)
 {
 	Com_Printf ("Frame Buffer: %d bpp, %d-%d-%d-%d, %s buffered\n",
@@ -198,7 +198,7 @@
 
 /*
 ===============
-GL_Init_Cvars
+GLInfo_Init_Cvars
 ===============
 */
 void
@@ -213,7 +213,7 @@
 
 /*
 ===============
-GL_Init
+GLInfo_Init
 ===============
 */
 void
Index: twilight/src/renderer/gl_textures.c
diff -u twilight/src/renderer/gl_textures.c:1.23 twilight/src/renderer/gl_textures.c:1.24
--- twilight/src/renderer/gl_textures.c:1.23	Thu Apr 17 23:19:30 2003
+++ twilight/src/renderer/gl_textures.c	Fri Apr 18 17:09:18 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: gl_textures.c,v 1.23 2003/04/18 03:19:30 warp Exp $";
+    "$Id: gl_textures.c,v 1.24 2003/04/18 21:09:18 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -43,6 +43,9 @@
 #include "sys.h"
 #include "wad.h"
 
+static Uint32 * GLT_8to32_convert (Uint8 *data, int width, int height, Uint32 *palette, qboolean check_empty);
+static void GLT_FloodFill8 (Uint8 * skin, int skinwidth, int skinheight);
+static qboolean GLT_Skin_CheckForInvalidTexCoords(astvert_t *texcoords, int numverts, int width, int height);
 
 /*
  * Stuff for tracking of loaded textures.
@@ -245,7 +248,7 @@
 	}
 }
 
-qboolean
+static qboolean
 GLT_TriangleCheck8 (Uint32 *tex, span_t *span, int width, int height,
 		astvert_t texcoords[3], Uint32 color)
 {
@@ -358,7 +361,7 @@
 	Zone_Free(triangles);
 }
 
-qboolean
+static qboolean
 GLT_Skin_CheckForInvalidTexCoords(astvert_t *texcoords, int numverts,
 		int width, int height)
 {
@@ -437,7 +440,7 @@
 	Zone_Free(iskin);
 }
 
-void
+static void
 GLT_Delete_Sub_Skin (skin_sub_t *sub)
 {
 	GLT_Delete(sub->texnum);
@@ -446,7 +449,7 @@
 	Zone_Free(sub);
 }
 
-void
+static void
 GLT_Delete_Indices (skin_indices_t *i)
 {
 	if (i->i)
@@ -483,7 +486,7 @@
  * =========================================================================
  */
 
-Uint32 *
+static Uint32 *
 GLT_8to32_convert (Uint8 *data, int width, int height, Uint32 *palette,
 		qboolean check_empty)
 {
@@ -563,7 +566,7 @@
 	else if (pos[off] != 255) fdc = pos[off]; \
 }
 
-void
+static void
 GLT_FloodFill8 (Uint8 * skin, int skinwidth, int skinheight)
 {
 	Uint8		fillcolor = *skin;		// assume this is the pixel to fill
@@ -809,7 +812,7 @@
 	}
 }
 
-void
+static void
 R_ResampleTextureMMX (void *indata, int inwidth, int inheight, void *outdata,
 		int outwidth, int outheight)
 {
@@ -930,7 +933,7 @@
 	}
 }
 
-void
+static void
 R_ResampleTextureMMX_EXT (void *indata, int inwidth, int inheight, void *outdata,
 		int outwidth, int outheight)
 {
@@ -1056,7 +1059,7 @@
 }
 #endif
 
-void
+static void
 R_ResampleTexture (void *indata, int inwidth, int inheight, void *outdata,
 		int outwidth, int outheight)
 {
@@ -1078,7 +1081,7 @@
 Operates in place, quartering the size of the texture
 ================
 */
-void
+static void
 GL_MipMap (Uint8 *in, Uint8 *out, int width, int height)
 {
 	int i, j;
Index: twilight/src/renderer/gl_textures.h
diff -u twilight/src/renderer/gl_textures.h:1.12 twilight/src/renderer/gl_textures.h:1.13
--- twilight/src/renderer/gl_textures.h:1.12	Thu Apr 17 23:19:30 2003
+++ twilight/src/renderer/gl_textures.h	Fri Apr 18 17:09:19 2003
@@ -22,7 +22,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-    "$Id: gl_textures.h,v 1.12 2003/04/18 03:19:30 warp Exp $";
+    "$Id: gl_textures.h,v 1.13 2003/04/18 21:09:19 warp Exp $";
 */
 
 #ifndef __gl_textures_h
@@ -33,10 +33,7 @@
 #include "image.h"
 #include "wad.h"
 
-extern Uint32 *GLT_8to32_convert (Uint8 *data, int width, int height, Uint32 *palette, qboolean check_empty);
-extern void GLT_FloodFill8 (Uint8 * skin, int skinwidth, int skinheight);
 extern void GLT_Skin_Parse (Uint8 *data, skin_t *skin, aliashdr_t *amodel, char *name, int width, int height, int frames, float interval);
-extern void GLT_Delete_Sub_Skin (skin_sub_t *sub);
 extern void GLT_Delete_Skin (skin_t *skin);
 extern void GLT_Init_Cvars ();
 extern void GLT_Init ();
Index: twilight/src/renderer/mod_alias.c
diff -u twilight/src/renderer/mod_alias.c:1.4 twilight/src/renderer/mod_alias.c:1.5
--- twilight/src/renderer/mod_alias.c:1.4	Mon Aug 19 10:09:06 2002
+++ twilight/src/renderer/mod_alias.c	Fri Apr 18 17:09:19 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: mod_alias.c,v 1.4 2002/08/19 14:09:06 warp Exp $";
+    "$Id: mod_alias.c,v 1.5 2003/04/18 21:09:19 warp Exp $";
 
 #include "twiconfig.h"
 #include <math.h>
@@ -89,7 +89,7 @@
 Mod_LoadAliasFrame
 =================
 */
-void *
+static void *
 Mod_LoadAliasFrame (void *pin, maliasframedesc_t *frame, model_t *mod)
 {
 	trivertx_t		*pinframe;
@@ -142,7 +142,7 @@
 Mod_LoadAliasGroup
 =================
 */
-void *
+static void *
 Mod_LoadAliasGroup (Uint8 *datapointer, maliasframedesc_t *frame, model_t *mod)
 {
 	daliasgroup_t		*pingroup;
@@ -206,7 +206,7 @@
 Mod_LoadAllSkins
 ===============
 */
-Uint8 *
+static Uint8 *
 Mod_LoadAllSkins (model_t *mod, Uint8 *datapointer, qboolean load)
 {
 	int					i, height, width, numgroups, numskins, numskins2;
@@ -338,7 +338,7 @@
 
 static int nummflags = sizeof(modelflags) / sizeof(modelflags[0]) - 1;
 
-int
+static int
 Mod_FindModelFlags(char *name)
 {
 	int	i;
Index: twilight/src/renderer/mod_brush.c
diff -u twilight/src/renderer/mod_brush.c:1.12 twilight/src/renderer/mod_brush.c:1.13
--- twilight/src/renderer/mod_brush.c:1.12	Sun Apr  6 08:48:31 2003
+++ twilight/src/renderer/mod_brush.c	Fri Apr 18 17:09:19 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: mod_brush.c,v 1.12 2003/04/06 12:48:31 warp Exp $";
+    "$Id: mod_brush.c,v 1.13 2003/04/18 21:09:19 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -359,7 +359,7 @@
 Fills in s->texturemins[] and s->extents[]
 ================
 */
-void
+static void
 CalcSurfaceExtents (msurface_t *s, model_t *mod)
 {
 	float		mins[2], maxs[2], val;
@@ -559,12 +559,6 @@
 		else
 			bheader->tex_chains[surf->texinfo->texture->tex_idx].n_items++;
 
-		/*
-		if (surf->flags & SURF_SUBDIVIDE)
-			CountSubdividedGLPolyFromEdges (surf, mod);
-		else
-			CountGLPolyFromEdges (surf, mod);
-		*/
 		bheader->numsets += surf->numedges;
 	}
 
Index: twilight/src/renderer/mod_sprite.c
diff -u twilight/src/renderer/mod_sprite.c:1.5 twilight/src/renderer/mod_sprite.c:1.6
--- twilight/src/renderer/mod_sprite.c:1.5	Mon Mar  3 23:51:47 2003
+++ twilight/src/renderer/mod_sprite.c	Fri Apr 18 17:09:19 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: mod_sprite.c,v 1.5 2003/03/04 04:51:47 warp Exp $";
+    "$Id: mod_sprite.c,v 1.6 2003/04/18 21:09:19 warp Exp $";
 
 #include "twiconfig.h"
 #include <math.h>
@@ -51,7 +51,7 @@
 Mod_LoadSpriteFrame
 =================
 */
-void *
+static void *
 Mod_LoadSpriteFrame (void *pin, model_t *mod, mspriteframe_t **ppframe,
 		int framenum)
 {
@@ -100,7 +100,7 @@
 Mod_LoadSpriteGroup
 =================
 */
-void *
+static void *
 Mod_LoadSpriteGroup (void *pin, model_t *mod, mspriteframe_t **ppframe,
 		int framenum)
 {
Index: twilight/src/renderer/palette.c
diff -u twilight/src/renderer/palette.c:1.1 twilight/src/renderer/palette.c:1.2
--- twilight/src/renderer/palette.c:1.1	Sat Mar 22 07:50:34 2003
+++ twilight/src/renderer/palette.c	Fri Apr 18 17:09:19 2003
@@ -24,7 +24,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: palette.c,v 1.1 2003/03/22 12:50:34 warp Exp $";
+    "$Id: palette.c,v 1.2 2003/04/18 21:09:19 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -48,33 +48,33 @@
 float d_8tofloattable[256][4];
 
 cvar_t *gl_fb;
-cvar_t *v_hwgamma;
+static cvar_t *v_hwgamma;
 
-cvar_t *v_black;
-cvar_t *v_black_r;
-cvar_t *v_black_b;
-cvar_t *v_black_g;
-cvar_t *v_grey;
-cvar_t *v_grey_r;
-cvar_t *v_grey_b;
-cvar_t *v_grey_g;
-cvar_t *v_white;
-cvar_t *v_white_r;
-cvar_t *v_white_b;
-cvar_t *v_white_g;
-
-cvar_t *v_tblack;
-cvar_t *v_tblack_r;
-cvar_t *v_tblack_b;
-cvar_t *v_tblack_g;
-cvar_t *v_tgrey;
-cvar_t *v_tgrey_r;
-cvar_t *v_tgrey_b;
-cvar_t *v_tgrey_g;
-cvar_t *v_twhite;
-cvar_t *v_twhite_r;
-cvar_t *v_twhite_b;
-cvar_t *v_twhite_g;
+static cvar_t *v_black;
+static cvar_t *v_black_r;
+static cvar_t *v_black_b;
+static cvar_t *v_black_g;
+static cvar_t *v_grey;
+static cvar_t *v_grey_r;
+static cvar_t *v_grey_b;
+static cvar_t *v_grey_g;
+static cvar_t *v_white;
+static cvar_t *v_white_r;
+static cvar_t *v_white_b;
+static cvar_t *v_white_g;
+
+static cvar_t *v_tblack;
+static cvar_t *v_tblack_r;
+static cvar_t *v_tblack_b;
+static cvar_t *v_tblack_g;
+static cvar_t *v_tgrey;
+static cvar_t *v_tgrey_r;
+static cvar_t *v_tgrey_b;
+static cvar_t *v_tgrey_g;
+static cvar_t *v_twhite;
+static cvar_t *v_twhite_r;
+static cvar_t *v_twhite_b;
+static cvar_t *v_twhite_g;
 
 static Uint16 hw_gamma_ramps[3][256];
 static Uint8 tex_gamma_ramps[3][256];
Index: twilight/src/renderer/palette.h
diff -u twilight/src/renderer/palette.h:1.1 twilight/src/renderer/palette.h:1.2
--- twilight/src/renderer/palette.h:1.1	Sat Mar 22 07:50:34 2003
+++ twilight/src/renderer/palette.h	Fri Apr 18 17:09:19 2003
@@ -42,33 +42,6 @@
 extern float d_8tofloattable[256][4];
 
 extern cvar_t *gl_fb;
-extern cvar_t *v_hwgamma;
-
-extern cvar_t *v_black;
-extern cvar_t *v_black_r;
-extern cvar_t *v_black_b;
-extern cvar_t *v_black_g;
-extern cvar_t *v_grey;
-extern cvar_t *v_grey_r;
-extern cvar_t *v_grey_b;
-extern cvar_t *v_grey_g;
-extern cvar_t *v_white;
-extern cvar_t *v_white_r;
-extern cvar_t *v_white_b;
-extern cvar_t *v_white_g;
-
-extern cvar_t *v_tblack;
-extern cvar_t *v_tblack_r;
-extern cvar_t *v_tblack_b;
-extern cvar_t *v_tblack_g;
-extern cvar_t *v_tgrey;
-extern cvar_t *v_tgrey_r;
-extern cvar_t *v_tgrey_b;
-extern cvar_t *v_tgrey_g;
-extern cvar_t *v_twhite;
-extern cvar_t *v_twhite_r;
-extern cvar_t *v_twhite_b;
-extern cvar_t *v_twhite_g;
 
 extern void PAL_Init_Cvars (void);
 
Index: twilight/src/renderer/r_explosion.c
diff -u twilight/src/renderer/r_explosion.c:1.2 twilight/src/renderer/r_explosion.c:1.3
--- twilight/src/renderer/r_explosion.c:1.2	Thu Apr 17 23:19:31 2003
+++ twilight/src/renderer/r_explosion.c	Fri Apr 18 17:09:19 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: r_explosion.c,v 1.2 2003/04/18 03:19:31 warp Exp $";
+    "$Id: r_explosion.c,v 1.3 2003/04/18 21:09:19 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -81,7 +81,7 @@
 static cvar_t *r_explosionclip, *r_drawexplosions;
 static cvar_t *r_explosioncolor_r, *r_explosioncolor_g, *r_explosioncolor_b, *r_explosioncolor_a;
 
-int
+static int
 R_ExplosionVert (int column, int row)
 {
 	int			i;
@@ -235,7 +235,7 @@
 	}
 }
 
-void
+static void
 R_MoveExplosion (explosion_t *e)
 {
 	int			i;
@@ -294,7 +294,7 @@
 			R_MoveExplosion(&explosion[i]);
 }
 
-void
+static void
 R_DrawExplosion (explosion_t *e)
 {
 	int			i;
Index: twilight/src/renderer/sky.c
diff -u twilight/src/renderer/sky.c:1.10 twilight/src/renderer/sky.c:1.11
--- twilight/src/renderer/sky.c:1.10	Thu Apr 17 23:19:31 2003
+++ twilight/src/renderer/sky.c	Fri Apr 18 17:09:19 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: sky.c,v 1.10 2003/04/18 03:19:31 warp Exp $";
+    "$Id: sky.c,v 1.11 2003/04/18 21:09:19 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -266,7 +266,7 @@
 ==================
 */
 char       *suf[6] = { "rt", "bk", "lf", "ft", "up", "dn" };
-qboolean
+static qboolean
 Sky_LoadSkys (cvar_t *cvar)
 {
 	int			i;
@@ -304,7 +304,7 @@
 R_SkyChanged
 ==============
 */
-void
+static void
 Sky_Changed (cvar_t *unused)
 {
 	unused = unused;
Index: twilight/src/renderer/sky.h
diff -u twilight/src/renderer/sky.h:1.5 twilight/src/renderer/sky.h:1.6
--- twilight/src/renderer/sky.h:1.5	Thu Apr 17 23:19:31 2003
+++ twilight/src/renderer/sky.h	Fri Apr 18 17:09:19 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: sky.h,v 1.5 2003/04/18 03:19:31 warp Exp $
+	$Id: sky.h,v 1.6 2003/04/18 21:09:19 warp Exp $
 */
 
 #ifndef __R_SKY_H
@@ -41,7 +41,6 @@
 void Sky_Init (void);
 void Sky_InitSky (texture_t *unused, Uint8 *pixels);
 void Sky_Box_Draw (void);
-void Sky_Changed (cvar_t *unused);
 void Sky_Sphere_Draw (void);
 void Sky_Depth_Draw_Chain (model_t *mod, chain_head_t *chain);
 void Sky_Fast_Draw_Chain (model_t *mod, chain_head_t *chain);
Index: twilight/src/renderer/surface.c
diff -u twilight/src/renderer/surface.c:1.7 twilight/src/renderer/surface.c:1.8
--- twilight/src/renderer/surface.c:1.7	Sun Apr  6 08:48:31 2003
+++ twilight/src/renderer/surface.c	Fri Apr 18 17:09:19 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: surface.c,v 1.7 2003/04/06 12:48:31 warp Exp $";
+    "$Id: surface.c,v 1.8 2003/04/18 21:09:19 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -59,267 +59,6 @@
 Surf_Init_Cvars (void)
 {
 	gl_subdivide_size =Cvar_Get("gl_subdivide_size", "128", CVAR_ARCHIVE, NULL);
-}
-
-#if 0
-static void
-BoundPoly (int numverts, float *verts, vec3_t mins, vec3_t maxs)
-{
-	int         i, j;
-	float      *v;
-
-	mins[0] = mins[1] = mins[2] = 9999;
-	maxs[0] = maxs[1] = maxs[2] = -9999;
-	v = verts;
-	for (i = 0; i < numverts; i++)
-		for (j = 0; j < 3; j++, v++) {
-			if (*v < mins[j])
-				mins[j] = *v;
-			if (*v > maxs[j])
-				maxs[j] = *v;
-		}
-}
-
-static void
-CountSubdividePolygon (brushhdr_t *brush, int numverts, float *verts,
-		memzone_t *zone)
-{
-	int         i, j, k;
-	vec3_t      mins, maxs;
-	float       m;
-	float      *v;
-	vec3_t      front[64], back[64];
-	int         f, b;
-	float       dist[64];
-	float       frac;
-
-	if (!numverts)
-		Sys_Error ("numverts = 0!");
-	if (numverts > 60)
-		Sys_Error ("numverts = %i", numverts);
-
-	BoundPoly (numverts, verts, mins, maxs);
-
-	for (i = 0; i < 3; i++) {
-		m = (mins[i] + maxs[i]) * 0.5;
-		m = gl_subdivide_size->ivalue
-			* floor (m / gl_subdivide_size->ivalue + 0.5);
-		if (maxs[i] - m < 8)
-			continue;
-		if (m - mins[i] < 8)
-			continue;
-
-		// cut it
-		v = verts + i;
-		for (j = 0; j < numverts; j++, v += 3)
-			dist[j] = *v - m;
-
-		// wrap cases
-		dist[j] = dist[0];
-		v -= i;
-		VectorCopy (verts, v);
-
-		f = b = 0;
-		v = verts;
-		for (j = 0; j < numverts; j++, v += 3) {
-			if (dist[j] >= 0) {
-				VectorCopy (v, front[f]);
-				f++;
-			}
-			if (dist[j] <= 0) {
-				VectorCopy (v, back[b]);
-				b++;
-			}
-			if (dist[j] == 0 || dist[j + 1] == 0)
-				continue;
-			if ((dist[j] > 0) != (dist[j + 1] > 0)) {
-				// clip point
-				frac = dist[j] / (dist[j] - dist[j + 1]);
-				for (k = 0; k < 3; k++)
-					front[f][k] = back[b][k] = v[k] + frac * (v[3 + k] - v[k]);
-				f++;
-				b++;
-			}
-		}
-
-		CountSubdividePolygon (brush, f, front[0], zone);
-		CountSubdividePolygon (brush, b, back[0], zone);
-		return;
-	}
-
-	brush->numsets += numverts;
-}
-
-/*
-================
-Breaks a polygon up along axial 64 unit
-boundaries so that turbulent and sky warps
-can be done reasonably.
-================
-*/
-void
-CountSubdividedGLPolyFromEdges (msurface_t *surf, model_t *model)
-{
-	vec3_t		 verts[64];
-	int			 numverts;
-	int			 i;
-	int			 lindex;
-	float		*vec;
-	brushhdr_t	*brush = model->brush;
-	memzone_t	*zone = model->zone;
-
-	warpface = surf;
-
-	// 
-	// convert edges back to a normal polygon
-	// 
-	numverts = 0;
-	for (i = 0; i < surf->numedges; i++) {
-		lindex = brush->surfedges[surf->firstedge + i];
-
-		if (lindex > 0)
-			vec = brush->vertices[brush->edges[lindex].v[0]].v;
-		else
-			vec = brush->vertices[brush->edges[-lindex].v[1]].v;
-		VectorCopy (vec, verts[numverts]);
-		numverts++;
-	}
-
-	CountSubdividePolygon (brush, numverts, verts[0], zone);
-}
-
-static void
-SubdividePolygon (brushhdr_t *brush, Uint numverts, Uint *verts,
-		memzone_t *zone)
-{
-	int         i, j, k, v;
-	vec3_t      mins, maxs;
-	float       m;
-	vec3_t      front[64], back[64];
-	int         f, b;
-	float       dist[64];
-	float       frac;
-	glpoly_t   *poly;
-
-	if (!numverts)
-		Sys_Error ("numverts = 0!");
-	if (numverts > 60)
-		Sys_Error ("numverts = %i", numverts);
-
-	BoundPoly (numverts, verts, mins, maxs);
-	v = 0;
-
-	for (i = 0; i < 3; i++) {
-		m = (mins[i] + maxs[i]) * 0.5;
-		m = gl_subdivide_size->ivalue
-			* floor (m / gl_subdivide_size->ivalue + 0.5);
-		if (maxs[i] - m < 8)
-			continue;
-		if (m - mins[i] < 8)
-			continue;
-
-		// cut it
-		v = verts + i;
-		for (j = 0; j < numverts; j++, v += 3)
-			dist[j] = *v - m;
-
-		// wrap cases
-		dist[j] = dist[0];
-		v -= i;
-		VectorCopy (verts, v);
-
-		f = b = 0;
-		v = verts;
-		for (j = 0; j < numverts; j++, v += 3) {
-			if (dist[j] >= 0) {
-				VectorCopy (v, front[f]);
-				f++;
-			}
-			if (dist[j] <= 0) {
-				VectorCopy (v, back[b]);
-				b++;
-			}
-			if (dist[j] == 0 || dist[j + 1] == 0)
-				continue;
-			if ((dist[j] > 0) != (dist[j + 1] > 0)) {
-				// clip point
-				frac = dist[j] / (dist[j] - dist[j + 1]);
-				for (k = 0; k < 3; k++)
-					front[f][k] = back[b][k] = v[k] + frac * (v[3 + k] - v[k]);
-				f++;
-				b++;
-			}
-		}
-
-		SubdividePolygon (brush, f, front[0], zone);
-		SubdividePolygon (brush, b, back[0], zone);
-		return;
-	}
-
-	poly = Zone_Alloc (zone, sizeof (glpoly_t)); 
-	poly->tc = Zone_Alloc (zone, numverts * sizeof (texcoord_t));
-	poly->v = Zone_Alloc (zone, numverts * sizeof (vertex_t));
-
-	poly->next = warpface->polys;
-	warpface->polys = poly;
-	poly->numverts = numverts;
-	for (i = 0; i < numverts; i++, verts += 3) {
-		VectorCopy (verts, poly->v[i].v);
-		poly->tc[i].v[0] = DotProduct (verts, warpface->texinfo->vecs[0]);
-		poly->tc[i].v[1] = DotProduct (verts, warpface->texinfo->vecs[1]);
-	}
-}
-
-/*
-================
-GL_SubdivideSurface
-
-Breaks a polygon up along axial 64 unit
-boundaries so that turbulent and sky warps
-can be done reasonably.
-================
-*/
-void
-BuildSubdividedGLPolyFromEdges (msurface_t *surf, model_t *model)
-{
-	Uint		 verts[64];
-	int			 numverts;
-	int			 i;
-	int			 lindex;
-	float		*vec;
-	brushhdr_t	*brush = model->brush;
-	memzone_t	*zone = model->zone;
-
-	warpface = surf;
-
-	// 
-	// convert edges back to a normal polygon
-	// 
-	numverts = 0;
-	for (i = 0; i < surf->numedges; i++) {
-		lindex = brush->surfedges[surf->firstedge + i];
-
-		if (lindex > 0)
-			verts[numverts++] = brush->edges[lindex].v[0];
-		else
-			verts[numverts++] = brush->edges[-lindex].v[0];
-	}
-
-	SubdividePolygon (brush, numverts, verts, zone);
-}
-#endif
-
-/*
-================
-CountGLPolyFromEdges
-================
- */
-void
-CountGLPolyFromEdges (msurface_t *surf, model_t *model)
-{
-	brushhdr_t	*brush = model->brush;
-
-	brush->numsets += surf->numedges;
 }
 
 /*
Index: twilight/src/renderer/surface.h
diff -u twilight/src/renderer/surface.h:1.4 twilight/src/renderer/surface.h:1.5
--- twilight/src/renderer/surface.h:1.4	Sun Apr  6 08:48:31 2003
+++ twilight/src/renderer/surface.h	Fri Apr 18 17:09:19 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: surface.h,v 1.4 2003/04/06 12:48:31 warp Exp $
+	$Id: surface.h,v 1.5 2003/04/18 21:09:19 warp Exp $
 */
 
 #ifndef __R_SURFACE_H
@@ -29,9 +29,6 @@
 
 #include "model.h"
 
-void CountSubdividedGLPolyFromEdges (msurface_t *surf, model_t *model);
-void CountGLPolyFromEdges (msurface_t *surf, model_t *model);
-void BuildSubdividedGLPolyFromEdges (msurface_t *surf, model_t *model);
 void BuildGLPolyFromEdges (msurface_t *surf, model_t *model, int *count);
 void SetupLightmapSettings ();
 
Index: twilight/src/sound/cdaudio.h
diff -u twilight/src/sound/cdaudio.h:1.3 twilight/src/sound/cdaudio.h:1.4
--- twilight/src/sound/cdaudio.h:1.3	Sat Feb  2 20:56:52 2002
+++ twilight/src/sound/cdaudio.h	Fri Apr 18 17:09:19 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: cdaudio.h,v 1.3 2002/02/03 01:56:52 eviltypeguy Exp $
+	$Id: cdaudio.h,v 1.4 2003/04/18 21:09:19 warp Exp $
 */
 
 #ifndef __CDAUDIO_H
@@ -30,7 +30,6 @@
 int CDAudio_Init (void);
 void CDAudio_Init_Cvars (void);
 void CDAudio_Play (Uint8 track, qboolean looping);
-void CDAudio_Stop (void);
 void CDAudio_Pause (void);
 void CDAudio_Resume (void);
 void CDAudio_Shutdown (void);
Index: twilight/src/sound/cdmusic.c
diff -u twilight/src/sound/cdmusic.c:1.9 twilight/src/sound/cdmusic.c:1.10
--- twilight/src/sound/cdmusic.c:1.9	Sat Jul  6 20:33:37 2002
+++ twilight/src/sound/cdmusic.c	Fri Apr 18 17:09:19 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-	"$Id: cdmusic.c,v 1.9 2002/07/07 00:33:37 warp Exp $";
+	"$Id: cdmusic.c,v 1.10 2003/04/18 21:09:19 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -92,6 +92,25 @@
 	return 0;
 }
 
+static void
+CDAudio_Stop (void)
+{
+	if (!cd_handle || !enabled)
+		return;
+
+	if (!playing)
+		return;
+
+	if (SDL_CDStop (cd_handle) < 0)
+		Com_DPrintf ("CDAudio_Stop: Unable to stop CD-ROM (%s)\n",
+					 SDL_GetError ());
+
+	wasPlaying = false;
+	playing = false;
+	pausetime = -1.0;
+	endOfTrack = -1.0;
+}
+
 void
 CDAudio_Play (Uint8 track, qboolean looping)
 {
@@ -155,25 +174,6 @@
 }
 
 void
-CDAudio_Stop (void)
-{
-	if (!cd_handle || !enabled)
-		return;
-
-	if (!playing)
-		return;
-
-	if (SDL_CDStop (cd_handle) < 0)
-		Com_DPrintf ("CDAudio_Stop: Unable to stop CD-ROM (%s)\n",
-					 SDL_GetError ());
-
-	wasPlaying = false;
-	playing = false;
-	pausetime = -1.0;
-	endOfTrack = -1.0;
-}
-
-void
 CDAudio_Pause (void)
 {
 	if (!cd_handle || !enabled)
@@ -325,19 +325,6 @@
 
 		return;
 	}
-}
-
-void
-CDAudio_Bgmcallback (cvar_t *cvar)
-{
-	if (cdvolume) {
-		Cvar_Set (cvar, "0.0");
-		CDAudio_Pause ();
-	} else {
-		Cvar_Set (cvar, "1.0");
-		CDAudio_Resume ();
-	}
-	cdvolume = cvar->fvalue;
 }
 
 void
Index: twilight/src/sound/mem.c
diff -u twilight/src/sound/mem.c:1.7 twilight/src/sound/mem.c:1.8
--- twilight/src/sound/mem.c:1.7	Sun Aug 11 09:35:33 2002
+++ twilight/src/sound/mem.c	Fri Apr 18 17:09:19 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: mem.c,v 1.7 2002/08/11 13:35:33 warp Exp $";
+    "$Id: mem.c,v 1.8 2003/04/18 21:09:19 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -34,6 +34,8 @@
 #include "strlib.h"
 #include "sys.h"
 
+static wavinfo_t GetWavinfo (char *name, Uint8 *wav, int wavlength);
+
 int         cache_full_cycle;
 
 Uint8      *S_Alloc (int size);
@@ -43,7 +45,7 @@
 ResampleSfx
 ================
 */
-void
+static void
 ResampleSfx (sfx_t *sfx, int inrate, int inwidth, Uint8 *data)
 {
 	int         outcount;
@@ -176,7 +178,7 @@
 int         iff_chunk_len;
 char		*iff_name;
 
-short
+static short
 GetLittleShort (void)
 {
 	short       val = 0;
@@ -187,7 +189,7 @@
 	return val;
 }
 
-int
+static int
 GetLittleLong (void)
 {
 	int         val = 0;
@@ -200,7 +202,7 @@
 	return val;
 }
 
-void
+static void
 FindNextChunk (char *name)
 {
 	while (1) {
@@ -231,7 +233,7 @@
 	}
 }
 
-void
+static void
 FindChunk (char *name)
 {
 	last_chunk = iff_data;
@@ -244,7 +246,7 @@
 GetWavinfo
 ============
 */
-wavinfo_t
+static wavinfo_t
 GetWavinfo (char *name, Uint8 *wav, int wavlength)
 {
 	wavinfo_t   info;
Index: twilight/src/sound/mix.c
diff -u twilight/src/sound/mix.c:1.4 twilight/src/sound/mix.c:1.5
--- twilight/src/sound/mix.c:1.4	Fri Aug  9 15:05:29 2002
+++ twilight/src/sound/mix.c	Fri Apr 18 17:09:19 2003
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: mix.c,v 1.4 2002/08/09 19:05:29 warp Exp $";
+    "$Id: mix.c,v 1.5 2003/04/18 21:09:19 warp Exp $";
 
 #include "twiconfig.h"
 
@@ -41,9 +41,9 @@
 int        *snd_p, snd_linear_count, snd_vol;
 short      *snd_out;
 
-void        Snd_WriteLinearBlastStereo16 (void);
+static void        Snd_WriteLinearBlastStereo16 (void);
 
-void
+static void
 Snd_WriteLinearBlastStereo16 (void)
 {
 	int         i;
@@ -68,7 +68,7 @@
 	}
 }
 
-void
+static void
 S_TransferStereo16 (int endtime)
 {
 	int         lpos;
@@ -101,7 +101,7 @@
 	}
 }
 
-void
+static void
 S_TransferPaintBuffer (int endtime)
 {
 	int         out_idx;
@@ -164,8 +164,8 @@
 ===============================================================================
 */
 
-void        SND_PaintChannelFrom8 (channel_t *ch, sfx_t *sfx, int endtime);
-void        SND_PaintChannelFrom16 (channel_t *ch, sfx_t *sfx, int endtime);
+static void SND_PaintChannelFrom8 (channel_t *ch, sfx_t *sfx, int endtime);
+static void SND_PaintChannelFrom16 (channel_t *ch, sfx_t *sfx, int endtime);
 
 void
 S_PaintChannels (int endtime)
@@ -244,7 +244,7 @@
 }
 
 
-void
+static void
 SND_PaintChannelFrom8 (channel_t *ch, sfx_t *sfx, int count)
 {
 	int			 data, i;
@@ -270,7 +270,7 @@
 }
 
 
-void
+static void
 SND_PaintChannelFrom16 (channel_t *ch, sfx_t *sfx, int count)
 {
 	int			 data;
Index: twilight/src/sound/sound.h
diff -u twilight/src/sound/sound.h:1.6 twilight/src/sound/sound.h:1.7
--- twilight/src/sound/sound.h:1.6	Sun Aug 11 09:35:33 2002
+++ twilight/src/sound/sound.h	Fri Apr 18 17:09:19 2003
@@ -21,7 +21,7 @@
 		59 Temple Place - Suite 330
 		Boston, MA  02111-1307, USA
 
-	$Id: sound.h,v 1.6 2002/08/11 13:35:33 warp Exp $
+	$Id: sound.h,v 1.7 2003/04/18 21:09:19 warp Exp $
 */
 // sound.h -- client sound i/o functions
 
@@ -89,7 +89,6 @@
 
 void        S_Init_Cvars (void);
 void        S_Init (void);
-void        S_Startup (void);
 void        S_Shutdown (void);
 void        S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin,
 						  float fvol, float attenuation);
@@ -97,25 +96,15 @@
 						   float attenuation);
 void        S_StopSound (int entnum, int entchannel);
 void        S_StopAllSounds (qboolean clear);
-void        S_ClearBuffer (void);
 void        S_Update (vec3_t origin, vec3_t v_forward, vec3_t v_right,
 					  vec3_t v_up);
 void        S_ExtraUpdate (void);
 
 sfx_t      *S_PrecacheSound (char *sample);
 void        S_TouchSound (char *sample);
-void        S_ClearPrecache (void);
-void        S_BeginPrecaching (void);
-void        S_EndPrecaching (void);
 void        S_PaintChannels (int endtime);
 void        S_InitPaintChannels (void);
 
-// picks a channel based on priorities, empty slots, number of channels
-channel_t  *SND_PickChannel (int entnum, int entchannel);
-
-// spatializes a channel
-void        SND_Spatialize (channel_t *ch);
-
 // initializes cycling through a DMA buffer and returns information on it
 qboolean    SNDDMA_Init (void);
 
@@ -169,12 +158,7 @@
 void		 S_LocalSound (char *s);
 sfx_t		*S_LoadSound (sfx_t *s);
 
-wavinfo_t   GetWavinfo (char *name, Uint8 *wav, int wavlength);
-
 void        SND_InitScaletable (void);
-
-void        S_AmbientOff (void);
-void        S_AmbientOn (void);
 
 extern int soundtime;
 