[quake3-commits] r1550 - trunk/code/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri May 8 05:48:45 EDT 2009


Author: ludwig
Date: 2009-05-08 05:48:45 -0400 (Fri, 08 May 2009)
New Revision: 1550

Modified:
   trunk/code/server/server.h
   trunk/code/server/sv_bot.c
   trunk/code/server/sv_ccmds.c
   trunk/code/server/sv_client.c
   trunk/code/server/sv_init.c
   trunk/code/server/sv_main.c
   trunk/code/server/sv_world.c
Log:
mark functions static (#4010)

Modified: trunk/code/server/server.h
===================================================================
--- trunk/code/server/server.h	2009-05-08 09:48:40 UTC (rev 1549)
+++ trunk/code/server/server.h	2009-05-08 09:48:45 UTC (rev 1550)
@@ -394,6 +394,8 @@
 int BotImport_DebugPolygonCreate(int color, int numPoints, vec3_t *points);
 void BotImport_DebugPolygonDelete(int id);
 
+void SV_BotInitBotLib(void);
+
 //============================================================
 //
 // high level object sorting to reduce interaction tests

Modified: trunk/code/server/sv_bot.c
===================================================================
--- trunk/code/server/sv_bot.c	2009-05-08 09:48:40 UTC (rev 1549)
+++ trunk/code/server/sv_bot.c	2009-05-08 09:48:45 UTC (rev 1550)
@@ -133,7 +133,7 @@
 BotImport_Print
 ==================
 */
-void QDECL BotImport_Print(int type, char *fmt, ...)
+static void QDECL BotImport_Print(int type, char *fmt, ...)
 {
 	char str[2048];
 	va_list ap;
@@ -175,7 +175,7 @@
 BotImport_Trace
 ==================
 */
-void BotImport_Trace(bsp_trace_t *bsptrace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int passent, int contentmask) {
+static void BotImport_Trace(bsp_trace_t *bsptrace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int passent, int contentmask) {
 	trace_t trace;
 
 	SV_Trace(&trace, start, mins, maxs, end, passent, contentmask, qfalse);
@@ -200,7 +200,7 @@
 BotImport_EntityTrace
 ==================
 */
-void BotImport_EntityTrace(bsp_trace_t *bsptrace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int entnum, int contentmask) {
+static void BotImport_EntityTrace(bsp_trace_t *bsptrace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int entnum, int contentmask) {
 	trace_t trace;
 
 	SV_ClipToEntity(&trace, start, mins, maxs, end, entnum, contentmask, qfalse);
@@ -226,7 +226,7 @@
 BotImport_PointContents
 ==================
 */
-int BotImport_PointContents(vec3_t point) {
+static int BotImport_PointContents(vec3_t point) {
 	return SV_PointContents(point, -1);
 }
 
@@ -235,7 +235,7 @@
 BotImport_inPVS
 ==================
 */
-int BotImport_inPVS(vec3_t p1, vec3_t p2) {
+static int BotImport_inPVS(vec3_t p1, vec3_t p2) {
 	return SV_inPVS (p1, p2);
 }
 
@@ -244,7 +244,7 @@
 BotImport_BSPEntityData
 ==================
 */
-char *BotImport_BSPEntityData(void) {
+static char *BotImport_BSPEntityData(void) {
 	return CM_EntityString();
 }
 
@@ -253,7 +253,7 @@
 BotImport_BSPModelMinsMaxsOrigin
 ==================
 */
-void BotImport_BSPModelMinsMaxsOrigin(int modelnum, vec3_t angles, vec3_t outmins, vec3_t outmaxs, vec3_t origin) {
+static void BotImport_BSPModelMinsMaxsOrigin(int modelnum, vec3_t angles, vec3_t outmins, vec3_t outmaxs, vec3_t origin) {
 	clipHandle_t h;
 	vec3_t mins, maxs;
 	float max;
@@ -281,7 +281,7 @@
 BotImport_GetMemory
 ==================
 */
-void *BotImport_GetMemory(int size) {
+static void *BotImport_GetMemory(int size) {
 	void *ptr;
 
 	ptr = Z_TagMalloc( size, TAG_BOTLIB );
@@ -293,7 +293,7 @@
 BotImport_FreeMemory
 ==================
 */
-void BotImport_FreeMemory(void *ptr) {
+static void BotImport_FreeMemory(void *ptr) {
 	Z_Free(ptr);
 }
 
@@ -302,7 +302,7 @@
 BotImport_HunkAlloc
 =================
 */
-void *BotImport_HunkAlloc( int size ) {
+static void *BotImport_HunkAlloc( int size ) {
 	if( Hunk_CheckMark() ) {
 		Com_Error( ERR_DROP, "SV_Bot_HunkAlloc: Alloc with marks already set\n" );
 	}
@@ -341,7 +341,7 @@
 BotImport_DebugPolygonShow
 ==================
 */
-void BotImport_DebugPolygonShow(int id, int color, int numPoints, vec3_t *points) {
+static void BotImport_DebugPolygonShow(int id, int color, int numPoints, vec3_t *points) {
 	bot_debugpoly_t *poly;
 
 	if (!debugpolygons) return;
@@ -368,7 +368,7 @@
 BotImport_DebugLineCreate
 ==================
 */
-int BotImport_DebugLineCreate(void) {
+static int BotImport_DebugLineCreate(void) {
 	vec3_t points[1];
 	return BotImport_DebugPolygonCreate(0, 0, points);
 }
@@ -378,7 +378,7 @@
 BotImport_DebugLineDelete
 ==================
 */
-void BotImport_DebugLineDelete(int line) {
+static void BotImport_DebugLineDelete(int line) {
 	BotImport_DebugPolygonDelete(line);
 }
 
@@ -387,7 +387,7 @@
 BotImport_DebugLineShow
 ==================
 */
-void BotImport_DebugLineShow(int line, vec3_t start, vec3_t end, int color) {
+static void BotImport_DebugLineShow(int line, vec3_t start, vec3_t end, int color) {
 	vec3_t points[4], dir, cross, up = {0, 0, 1};
 	float dot;
 
@@ -420,7 +420,7 @@
 SV_BotClientCommand
 ==================
 */
-void BotClientCommand( int client, char *command ) {
+static void BotClientCommand( int client, char *command ) {
 	SV_ExecuteClientCommand( &svs.clients[client], command, qtrue );
 }
 

Modified: trunk/code/server/sv_ccmds.c
===================================================================
--- trunk/code/server/sv_ccmds.c	2009-05-08 09:48:40 UTC (rev 1549)
+++ trunk/code/server/sv_ccmds.c	2009-05-08 09:48:45 UTC (rev 1550)
@@ -518,7 +518,7 @@
 Load saved bans from file.
 ==================
 */
-void SV_RehashBans_f(void)
+static void SV_RehashBans_f(void)
 {
 	int index, filelen;
 	fileHandle_t readfrom;
@@ -569,7 +569,7 @@
 			
 			if(NET_StringToAdr(curpos + 2, &serverBans[index].ip, NA_UNSPEC))
 			{
-				serverBans[index].isexception = !(curpos[0] == '0');
+				serverBans[index].isexception = (curpos[0] != '0');
 				serverBans[index].subnet = atoi(maskpos);
 				
 				if(serverBans[index].ip.type == NA_IP &&

Modified: trunk/code/server/sv_client.c
===================================================================
--- trunk/code/server/sv_client.c	2009-05-08 09:48:40 UTC (rev 1549)
+++ trunk/code/server/sv_client.c	2009-05-08 09:48:45 UTC (rev 1550)
@@ -232,7 +232,7 @@
 ==================
 */
 
-qboolean SV_IsBanned(netadr_t *from, qboolean isexception)
+static qboolean SV_IsBanned(netadr_t *from, qboolean isexception)
 {
 	int index, addrlen, curbyte, netmask, cmpmask;
 	serverBan_t *curban;
@@ -644,7 +644,7 @@
 the wrong gamestate.
 ================
 */
-void SV_SendClientGameState( client_t *client ) {
+static void SV_SendClientGameState( client_t *client ) {
 	int			start;
 	entityState_t	*base, nullstate;
 	msg_t		msg;
@@ -781,7 +781,7 @@
 Abort a download if in progress
 ==================
 */
-void SV_StopDownload_f( client_t *cl ) {
+static void SV_StopDownload_f( client_t *cl ) {
 	if (*cl->downloadName)
 		Com_DPrintf( "clientDownload: %d : file \"%s\" aborted\n", (int) (cl - svs.clients), cl->downloadName );
 
@@ -795,7 +795,7 @@
 Downloads are finished
 ==================
 */
-void SV_DoneDownload_f( client_t *cl ) {
+static void SV_DoneDownload_f( client_t *cl ) {
 	Com_DPrintf( "clientDownload: %s Done\n", cl->name);
 	// resend the game state to update any clients that entered during the download
 	SV_SendClientGameState(cl);
@@ -809,7 +809,7 @@
 the same as cl->downloadClientBlock
 ==================
 */
-void SV_NextDownload_f( client_t *cl )
+static void SV_NextDownload_f( client_t *cl )
 {
 	int block = atoi( Cmd_Argv(1) );
 
@@ -838,7 +838,7 @@
 SV_BeginDownload_f
 ==================
 */
-void SV_BeginDownload_f( client_t *cl ) {
+static void SV_BeginDownload_f( client_t *cl ) {
 
 	// Kill any existing download
 	SV_CloseDownload( cl );

Modified: trunk/code/server/sv_init.c
===================================================================
--- trunk/code/server/sv_init.c	2009-05-08 09:48:40 UTC (rev 1549)
+++ trunk/code/server/sv_init.c	2009-05-08 09:48:45 UTC (rev 1550)
@@ -216,7 +216,7 @@
 baseline will be transmitted
 ================
 */
-void SV_CreateBaseline( void ) {
+static void SV_CreateBaseline( void ) {
 	sharedEntity_t *svent;
 	int				entnum;	
 
@@ -241,7 +241,7 @@
 
 ===============
 */
-void SV_BoundMaxClients( int minimum ) {
+static void SV_BoundMaxClients( int minimum ) {
 	// get the current maxclients value
 	Cvar_Get( "sv_maxclients", "8", 0 );
 
@@ -265,7 +265,7 @@
 the menu system first.
 ===============
 */
-void SV_Startup( void ) {
+static void SV_Startup( void ) {
 	if ( svs.initialized ) {
 		Com_Error( ERR_FATAL, "SV_Startup: svs.initialized" );
 	}
@@ -363,7 +363,7 @@
 SV_ClearServer
 ================
 */
-void SV_ClearServer(void) {
+static void SV_ClearServer(void) {
 	int i;
 
 	for ( i = 0 ; i < MAX_CONFIGSTRINGS ; i++ ) {
@@ -381,7 +381,7 @@
   touch the cgame.vm so that a pure client can load it if it's in a seperate pk3
 ================
 */
-void SV_TouchCGame(void) {
+static void SV_TouchCGame(void) {
 	fileHandle_t	f;
 	char filename[MAX_QPATH];
 
@@ -627,8 +627,6 @@
 Only called at main exe startup, not for each game
 ===============
 */
-void SV_BotInitBotLib(void);
-
 void SV_Init (void) {
 	SV_AddOperatorCommands ();
 

Modified: trunk/code/server/sv_main.c
===================================================================
--- trunk/code/server/sv_main.c	2009-05-08 09:48:40 UTC (rev 1549)
+++ trunk/code/server/sv_main.c	2009-05-08 09:48:45 UTC (rev 1550)
@@ -76,7 +76,7 @@
 Converts newlines to "\n" so a line prints nicer
 ===============
 */
-char	*SV_ExpandNewlines( char *in ) {
+static char	*SV_ExpandNewlines( char *in ) {
 	static	char	string[1024];
 	int		l;
 
@@ -99,10 +99,10 @@
 ======================
 SV_ReplacePendingServerCommands
 
-  This is ugly
+FIXME: This is ugly
 ======================
 */
-int SV_ReplacePendingServerCommands( client_t *client, const char *cmd ) {
+static int SV_ReplacePendingServerCommands( client_t *client, const char *cmd ) {
 	int i, index, csnum1, csnum2;
 
 	for ( i = client->reliableSent+1; i <= client->reliableSequence; i++ ) {
@@ -322,7 +322,7 @@
 the simple info query.
 ================
 */
-void SVC_Status( netadr_t from ) {
+static void SVC_Status( netadr_t from ) {
 	char	player[1024];
 	char	status[MAX_MSGLEN];
 	int		i;
@@ -440,7 +440,7 @@
 
 ================
 */
-void SV_FlushRedirect( char *outputbuf ) {
+static void SV_FlushRedirect( char *outputbuf ) {
 	NET_OutOfBandPrint( NS_SERVER, svs.redirectAddress, "print\n%s", outputbuf );
 }
 
@@ -453,7 +453,7 @@
 Redirect all printfs
 ===============
 */
-void SVC_RemoteCommand( netadr_t from, msg_t *msg ) {
+static void SVC_RemoteCommand( netadr_t from, msg_t *msg ) {
 	qboolean	valid;
 	unsigned int time;
 	char		remaining[1024];
@@ -523,7 +523,7 @@
 connectionless packets.
 =================
 */
-void SV_ConnectionlessPacket( netadr_t from, msg_t *msg ) {
+static void SV_ConnectionlessPacket( netadr_t from, msg_t *msg ) {
 	char	*s;
 	char	*c;
 
@@ -636,7 +636,7 @@
 Updates the cl->ping variables
 ===================
 */
-void SV_CalcPings( void ) {
+static void SV_CalcPings( void ) {
 	int			i, j;
 	client_t	*cl;
 	int			total, count;
@@ -696,7 +696,7 @@
 if necessary
 ==================
 */
-void SV_CheckTimeouts( void ) {
+static void SV_CheckTimeouts( void ) {
 	int		i;
 	client_t	*cl;
 	int			droppoint;
@@ -737,7 +737,7 @@
 SV_CheckPaused
 ==================
 */
-qboolean SV_CheckPaused( void ) {
+static qboolean SV_CheckPaused( void ) {
 	int		count;
 	client_t	*cl;
 	int		i;

Modified: trunk/code/server/sv_world.c
===================================================================
--- trunk/code/server/sv_world.c	2009-05-08 09:48:40 UTC (rev 1549)
+++ trunk/code/server/sv_world.c	2009-05-08 09:48:45 UTC (rev 1550)
@@ -103,7 +103,7 @@
 Builds a uniformly subdivided tree for the given world size
 ===============
 */
-worldSector_t *SV_CreateworldSector( int depth, vec3_t mins, vec3_t maxs ) {
+static worldSector_t *SV_CreateworldSector( int depth, vec3_t mins, vec3_t maxs ) {
 	worldSector_t	*anode;
 	vec3_t		size;
 	vec3_t		mins1, maxs1, mins2, maxs2;
@@ -379,7 +379,7 @@
 
 ====================
 */
-void SV_AreaEntities_r( worldSector_t *node, areaParms_t *ap ) {
+static void SV_AreaEntities_r( worldSector_t *node, areaParms_t *ap ) {
 	svEntity_t	*check, *next;
 	sharedEntity_t *gcheck;
 	int			count;
@@ -507,7 +507,7 @@
 
 ====================
 */
-void SV_ClipMoveToEntities( moveclip_t *clip ) {
+static void SV_ClipMoveToEntities( moveclip_t *clip ) {
 	int			i, num;
 	int			touchlist[MAX_GENTITIES];
 	sharedEntity_t *touch;



More information about the quake3-commits mailing list