Skip to content

Commit

Permalink
* Applied ajax's cleanup patch
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Sep 23, 2005
1 parent 4c6f59c commit fe14a45
Show file tree
Hide file tree
Showing 40 changed files with 166 additions and 166 deletions.
2 changes: 1 addition & 1 deletion code/botlib/be_aas_file.c
Expand Up @@ -305,7 +305,7 @@ char *AAS_LoadAASLump(fileHandle_t fp, int offset, int length, int *lastoffset,
AAS_Error("can't seek to aas lump\n");
AAS_DumpAASData();
botimport.FS_FCloseFile(fp);
return 0;
return NULL;
} //end if
} //end if
//allocate memory
Expand Down
2 changes: 1 addition & 1 deletion code/botlib/be_aas_sample.c
Expand Up @@ -1388,7 +1388,7 @@ int AAS_AreaInfo( int areanum, aas_areainfo_t *info )
//===========================================================================
aas_plane_t *AAS_PlaneFromNum(int planenum)
{
if (!aasworld.loaded) return 0;
if (!aasworld.loaded) return NULL;

return &aasworld.planes[planenum];
} //end of the function AAS_PlaneFromNum
2 changes: 1 addition & 1 deletion code/botlib/be_ai_goal.c
Expand Up @@ -146,7 +146,7 @@ fielddef_t iteminfo_fields[] =
{"respawntime", ITEMINFO_OFS(respawntime), FT_FLOAT},
{"mins", ITEMINFO_OFS(mins), FT_FLOAT|FT_ARRAY, 3},
{"maxs", ITEMINFO_OFS(maxs), FT_FLOAT|FT_ARRAY, 3},
{0, 0, 0}
{NULL, 0, 0}
};

structdef_t iteminfo_struct =
Expand Down
2 changes: 1 addition & 1 deletion code/cgame/cg_main.c
Expand Up @@ -1114,7 +1114,7 @@ CG_BuildSpectatorString
=======================
*/
void CG_BuildSpectatorString() {
void CG_BuildSpectatorString(void) {
int i;
cg.spectatorList[0] = 0;
for (i = 0; i < MAX_CLIENTS; i++) {
Expand Down
16 changes: 8 additions & 8 deletions code/cgame/cg_newdraw.c
Expand Up @@ -40,7 +40,7 @@ int drawTeamOverlayModificationCount = -1;
//static char teamChat1[256];
//static char teamChat2[256];

void CG_InitTeamChat() {
void CG_InitTeamChat(void) {
memset(teamChat1, 0, sizeof(teamChat1));
memset(teamChat2, 0, sizeof(teamChat2));
memset(systemChat, 0, sizeof(systemChat));
Expand All @@ -55,7 +55,7 @@ void CG_SetPrintString(int type, const char *p) {
}
}

void CG_CheckOrderPending() {
void CG_CheckOrderPending(void) {
if (cgs.gametype < GT_CTF) {
return;
}
Expand Down Expand Up @@ -952,7 +952,7 @@ float CG_GetValue(int ownerDraw) {
return -1;
}

qboolean CG_OtherTeamHasFlag() {
qboolean CG_OtherTeamHasFlag(void) {
if (cgs.gametype == GT_CTF || cgs.gametype == GT_1FCTF) {
int team = cg.snap->ps.persistant[PERS_TEAM];
if (cgs.gametype == GT_1FCTF) {
Expand All @@ -976,7 +976,7 @@ qboolean CG_OtherTeamHasFlag() {
return qfalse;
}

qboolean CG_YourTeamHasFlag() {
qboolean CG_YourTeamHasFlag(void) {
if (cgs.gametype == GT_CTF || cgs.gametype == GT_1FCTF) {
int team = cg.snap->ps.persistant[PERS_TEAM];
if (cgs.gametype == GT_1FCTF) {
Expand Down Expand Up @@ -1131,7 +1131,7 @@ static void CG_DrawAreaChat(rectDef_t *rect, float scale, vec4_t color, qhandle_
CG_Text_Paint(rect->x, rect->y + rect->h, scale, color, teamChat2, 0, 0, 0);
}

const char *CG_GetKillerText() {
const char *CG_GetKillerText(void) {
const char *s = "";
if ( cg.killerName[0] ) {
s = va("Fragged by %s", cg.killerName );
Expand Down Expand Up @@ -1167,7 +1167,7 @@ static void CG_Draw2ndPlace(rectDef_t *rect, float scale, vec4_t color, qhandle_
}
}

const char *CG_GetGameStatusText() {
const char *CG_GetGameStatusText(void) {
const char *s = "";
if ( cgs.gametype < GT_TEAM) {
if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR ) {
Expand All @@ -1189,7 +1189,7 @@ static void CG_DrawGameStatus(rectDef_t *rect, float scale, vec4_t color, qhandl
CG_Text_Paint(rect->x, rect->y + rect->h, scale, color, CG_GetGameStatusText(), 0, 0, textStyle);
}

const char *CG_GameTypeString() {
const char *CG_GameTypeString(void) {
if ( cgs.gametype == GT_FFA ) {
return "Free For All";
} else if ( cgs.gametype == GT_TEAM ) {
Expand Down Expand Up @@ -1824,7 +1824,7 @@ int CG_ClientNumFromName(const char *p) {
return -1;
}

void CG_ShowResponseHead() {
void CG_ShowResponseHead(void) {
Menus_OpenByName("voiceMenu");
trap_Cvar_Set("cl_conXOffset", "72");
cg.voiceTime = cg.time;
Expand Down
2 changes: 1 addition & 1 deletion code/cgame/cg_players.c
Expand Up @@ -298,7 +298,7 @@ CG_FileExists
static qboolean CG_FileExists(const char *filename) {
int len;

len = trap_FS_FOpenFile( filename, 0, FS_READ );
len = trap_FS_FOpenFile( filename, NULL, FS_READ );
if (len>0) {
return qtrue;
}
Expand Down
10 changes: 5 additions & 5 deletions code/client/cl_ui.c
Expand Up @@ -47,7 +47,7 @@ static void GetClientState( uiClientState_t *state ) {
LAN_LoadCachedServers
====================
*/
void LAN_LoadCachedServers( ) {
void LAN_LoadCachedServers( void ) {
int size;
fileHandle_t fileIn;
cls.numglobalservers = cls.nummplayerservers = cls.numfavoriteservers = 0;
Expand All @@ -74,7 +74,7 @@ void LAN_LoadCachedServers( ) {
LAN_SaveServersToCache
====================
*/
void LAN_SaveServersToCache( ) {
void LAN_SaveServersToCache( void ) {
int size;
fileHandle_t fileOut = FS_SV_FOpenFileWrite("servercache.dat");
FS_Write(&cls.numglobalservers, sizeof(int), fileOut);
Expand Down Expand Up @@ -134,7 +134,7 @@ static int LAN_AddServer(int source, const char *name, const char *address) {
netadr_t adr;
serverInfo_t *servers = NULL;
max = MAX_OTHER_SERVERS;
count = 0;
count = NULL;

switch (source) {
case AS_LOCAL :
Expand Down Expand Up @@ -182,7 +182,7 @@ LAN_RemoveServer
static void LAN_RemoveServer(int source, const char *addr) {
int *count, i;
serverInfo_t *servers = NULL;
count = 0;
count = NULL;
switch (source) {
case AS_LOCAL :
count = &cls.numlocalservers;
Expand Down Expand Up @@ -1173,7 +1173,7 @@ void CL_InitUI( void ) {
}
}

qboolean UI_usesUniqueCDKey() {
qboolean UI_usesUniqueCDKey( void ) {
if (uivm) {
return (VM_Call( uivm, UI_HASUNIQUECDKEY) == qtrue);
} else {
Expand Down
4 changes: 2 additions & 2 deletions code/client/snd_dma.c
Expand Up @@ -938,7 +938,7 @@ void S_ByteSwapRawSamples( int samples, int width, int s_channels, const byte *d
}
}

portable_samplepair_t *S_GetRawSamplePointer() {
portable_samplepair_t *S_GetRawSamplePointer( void ) {
return s_rawsamples;
}

Expand Down Expand Up @@ -1605,7 +1605,7 @@ S_FreeOldestSound
======================
*/

void S_FreeOldestSound() {
void S_FreeOldestSound( void ) {
int i, oldest, used;
sfx_t *sfx;
sndBuffer *buffer, *nbuffer;
Expand Down
6 changes: 3 additions & 3 deletions code/client/snd_mem.c
Expand Up @@ -56,7 +56,7 @@ void SND_free(sndBuffer *v) {
inUse += sizeof(sndBuffer);
}

sndBuffer* SND_malloc() {
sndBuffer* SND_malloc(void) {
sndBuffer *v;
redo:
if (freelist == NULL) {
Expand All @@ -73,7 +73,7 @@ sndBuffer* SND_malloc() {
return v;
}

void SND_setup() {
void SND_setup(void) {
sndBuffer *p, *q;
cvar_t *cv;
int scs;
Expand Down Expand Up @@ -399,6 +399,6 @@ qboolean S_LoadSound( sfx_t *sfx )
return qtrue;
}

void S_DisplayFreeMemory() {
void S_DisplayFreeMemory(void) {
Com_Printf("%d bytes free sound buffer memory, %d total used\n", inUse, totalInUse);
}

0 comments on commit fe14a45

Please sign in to comment.