aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-05-08 09:48:45 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-05-08 09:48:45 +0000
commitefd3c0f51505be44449bef84ae3c2776183d4513 (patch)
treef4eec6d7d16b38a5cd21313b19afb67244a2f5f2 /code
parent0c74111e6f0d2f5ca5b0ca8d4912af71048c4d8d (diff)
downloadioquake3-aero-efd3c0f51505be44449bef84ae3c2776183d4513.tar.gz
ioquake3-aero-efd3c0f51505be44449bef84ae3c2776183d4513.zip
mark functions static (#4010)
git-svn-id: svn://svn.icculus.org/quake3/trunk@1550 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r--code/server/server.h2
-rw-r--r--code/server/sv_bot.c30
-rw-r--r--code/server/sv_ccmds.c4
-rw-r--r--code/server/sv_client.c12
-rw-r--r--code/server/sv_init.c12
-rw-r--r--code/server/sv_main.c20
-rw-r--r--code/server/sv_world.c6
7 files changed, 43 insertions, 43 deletions
diff --git a/code/server/server.h b/code/server/server.h
index 64c4d1e..d3c49c9 100644
--- a/code/server/server.h
+++ b/code/server/server.h
@@ -394,6 +394,8 @@ int SV_BotGetConsoleMessage( int client, char *buf, int size );
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
diff --git a/code/server/sv_bot.c b/code/server/sv_bot.c
index b0fc1e8..8583f86 100644
--- a/code/server/sv_bot.c
+++ b/code/server/sv_bot.c
@@ -133,7 +133,7 @@ void BotDrawDebugPolygons(void (*drawPoly)(int color, int numPoints, float *poin
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 @@ void QDECL BotImport_Print(int type, char *fmt, ...)
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 @@ void BotImport_Trace(bsp_trace_t *bsptrace, vec3_t start, vec3_t mins, vec3_t ma
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 @@ void BotImport_EntityTrace(bsp_trace_t *bsptrace, vec3_t start, vec3_t mins, vec
BotImport_PointContents
==================
*/
-int BotImport_PointContents(vec3_t point) {
+static int BotImport_PointContents(vec3_t point) {
return SV_PointContents(point, -1);
}
@@ -235,7 +235,7 @@ int BotImport_PointContents(vec3_t point) {
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 @@ int BotImport_inPVS(vec3_t p1, vec3_t p2) {
BotImport_BSPEntityData
==================
*/
-char *BotImport_BSPEntityData(void) {
+static char *BotImport_BSPEntityData(void) {
return CM_EntityString();
}
@@ -253,7 +253,7 @@ char *BotImport_BSPEntityData(void) {
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 @@ void BotImport_BSPModelMinsMaxsOrigin(int modelnum, vec3_t angles, vec3_t outmin
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 @@ void *BotImport_GetMemory(int size) {
BotImport_FreeMemory
==================
*/
-void BotImport_FreeMemory(void *ptr) {
+static void BotImport_FreeMemory(void *ptr) {
Z_Free(ptr);
}
@@ -302,7 +302,7 @@ void BotImport_FreeMemory(void *ptr) {
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 @@ int BotImport_DebugPolygonCreate(int color, int numPoints, vec3_t *points) {
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 @@ void BotImport_DebugPolygonDelete(int id)
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 @@ int BotImport_DebugLineCreate(void) {
BotImport_DebugLineDelete
==================
*/
-void BotImport_DebugLineDelete(int line) {
+static void BotImport_DebugLineDelete(int line) {
BotImport_DebugPolygonDelete(line);
}
@@ -387,7 +387,7 @@ void BotImport_DebugLineDelete(int line) {
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 @@ void BotImport_DebugLineShow(int line, vec3_t start, vec3_t end, int color) {
SV_BotClientCommand
==================
*/
-void BotClientCommand( int client, char *command ) {
+static void BotClientCommand( int client, char *command ) {
SV_ExecuteClientCommand( &svs.clients[client], command, qtrue );
}
diff --git a/code/server/sv_ccmds.c b/code/server/sv_ccmds.c
index 01bc60d..d54fe6e 100644
--- a/code/server/sv_ccmds.c
+++ b/code/server/sv_ccmds.c
@@ -518,7 +518,7 @@ SV_RehashBans_f
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 @@ void SV_RehashBans_f(void)
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 &&
diff --git a/code/server/sv_client.c b/code/server/sv_client.c
index de621b0..5ef1336 100644
--- a/code/server/sv_client.c
+++ b/code/server/sv_client.c
@@ -232,7 +232,7 @@ Check whether a certain address is banned
==================
*/
-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 @@ It will be resent if the client acknowledges a later message but has
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 @@ SV_StopDownload_f
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 @@ SV_DoneDownload_f
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 argument will be the last acknowledged block from the client, it should be
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 @@ void SV_NextDownload_f( client_t *cl )
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 );
diff --git a/code/server/sv_init.c b/code/server/sv_init.c
index 52102ce..41ac351 100644
--- a/code/server/sv_init.c
+++ b/code/server/sv_init.c
@@ -216,7 +216,7 @@ to the clients -- only the fields that differ from the
baseline will be transmitted
================
*/
-void SV_CreateBaseline( void ) {
+static void SV_CreateBaseline( void ) {
sharedEntity_t *svent;
int entnum;
@@ -241,7 +241,7 @@ SV_BoundMaxClients
===============
*/
-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 @@ NOT cause this to be called, unless the game is exited to
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 @@ void SV_ChangeMaxClients( void ) {
SV_ClearServer
================
*/
-void SV_ClearServer(void) {
+static void SV_ClearServer(void) {
int i;
for ( i = 0 ; i < MAX_CONFIGSTRINGS ; i++ ) {
@@ -381,7 +381,7 @@ SV_TouchCGame
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 @@ SV_Init
Only called at main exe startup, not for each game
===============
*/
-void SV_BotInitBotLib(void);
-
void SV_Init (void) {
SV_AddOperatorCommands ();
diff --git a/code/server/sv_main.c b/code/server/sv_main.c
index 33554cd..94f20d0 100644
--- a/code/server/sv_main.c
+++ b/code/server/sv_main.c
@@ -76,7 +76,7 @@ SV_ExpandNewlines
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 @@ char *SV_ExpandNewlines( char *in ) {
======================
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 @@ and all connected players. Used for getting detailed information after
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 @@ SVC_FlushRedirect
================
*/
-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 @@ Shift down the remaining args
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 @@ Clients that are in the game can still send
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 @@ SV_CalcPings
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 @@ for a few seconds to make sure any final reliable message gets resent
if necessary
==================
*/
-void SV_CheckTimeouts( void ) {
+static void SV_CheckTimeouts( void ) {
int i;
client_t *cl;
int droppoint;
@@ -737,7 +737,7 @@ void SV_CheckTimeouts( void ) {
SV_CheckPaused
==================
*/
-qboolean SV_CheckPaused( void ) {
+static qboolean SV_CheckPaused( void ) {
int count;
client_t *cl;
int i;
diff --git a/code/server/sv_world.c b/code/server/sv_world.c
index e8485ce..b2cec81 100644
--- a/code/server/sv_world.c
+++ b/code/server/sv_world.c
@@ -103,7 +103,7 @@ SV_CreateworldSector
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 @@ SV_AreaEntities_r
====================
*/
-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 @@ SV_ClipMoveToEntities
====================
*/
-void SV_ClipMoveToEntities( moveclip_t *clip ) {
+static void SV_ClipMoveToEntities( moveclip_t *clip ) {
int i, num;
int touchlist[MAX_GENTITIES];
sharedEntity_t *touch;