From 4bfc084c4974ecff94e273a7608ebc38f1c046ab Mon Sep 17 00:00:00 2001 From: tma Date: Fri, 23 Sep 2005 17:39:14 +0000 Subject: * Applied ajax's cleanup patch git-svn-id: svn://svn.icculus.org/quake3/trunk@101 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/botlib/be_aas_file.c | 2 +- code/botlib/be_aas_sample.c | 2 +- code/botlib/be_ai_goal.c | 2 +- code/cgame/cg_main.c | 2 +- code/cgame/cg_newdraw.c | 16 +++---- code/cgame/cg_players.c | 2 +- code/client/cl_ui.c | 10 ++-- code/client/snd_dma.c | 4 +- code/client/snd_mem.c | 6 +-- code/game/bg_misc.c | 104 ++++++++++++++++++++--------------------- code/game/g_client.c | 4 +- code/game/g_items.c | 2 +- code/game/g_misc.c | 2 +- code/game/g_spawn.c | 2 +- code/game/g_trigger.c | 2 +- code/game/g_utils.c | 2 +- code/q3_ui/ui_addbots.c | 6 +-- code/q3_ui/ui_network.c | 2 +- code/q3_ui/ui_playersettings.c | 2 +- code/q3_ui/ui_preferences.c | 2 +- code/q3_ui/ui_qmenu.c | 2 +- code/q3_ui/ui_servers2.c | 8 ++-- code/q3_ui/ui_sound.c | 2 +- code/q3_ui/ui_startserver.c | 10 ++-- code/q3_ui/ui_video.c | 20 ++++---- code/qcommon/cmd.c | 2 +- code/qcommon/files.c | 4 +- code/qcommon/unzip.c | 2 +- code/renderer/tr_font.c | 4 +- code/renderer/tr_image.c | 2 +- code/renderer/tr_mesh.c | 8 ++-- code/ui/ui_atoms.c | 2 +- code/ui/ui_gameinfo.c | 2 +- code/ui/ui_main.c | 22 ++++----- code/ui/ui_players.c | 2 +- code/ui/ui_shared.c | 26 +++++------ code/unix/linux_qgl.c | 22 ++++----- code/unix/sdl_glimp.c | 4 +- code/unix/sdl_snd.c | 6 +-- code/unix/unix_shared.c | 6 +-- 40 files changed, 166 insertions(+), 166 deletions(-) diff --git a/code/botlib/be_aas_file.c b/code/botlib/be_aas_file.c index 50d644e..f73c962 100644 --- a/code/botlib/be_aas_file.c +++ b/code/botlib/be_aas_file.c @@ -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 diff --git a/code/botlib/be_aas_sample.c b/code/botlib/be_aas_sample.c index 68806eb..f12b5e0 100644 --- a/code/botlib/be_aas_sample.c +++ b/code/botlib/be_aas_sample.c @@ -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 diff --git a/code/botlib/be_ai_goal.c b/code/botlib/be_ai_goal.c index f71bc43..c3f721a 100644 --- a/code/botlib/be_ai_goal.c +++ b/code/botlib/be_ai_goal.c @@ -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 = diff --git a/code/cgame/cg_main.c b/code/cgame/cg_main.c index 03a4994..105e4cc 100644 --- a/code/cgame/cg_main.c +++ b/code/cgame/cg_main.c @@ -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++) { diff --git a/code/cgame/cg_newdraw.c b/code/cgame/cg_newdraw.c index de82465..f36e547 100644 --- a/code/cgame/cg_newdraw.c +++ b/code/cgame/cg_newdraw.c @@ -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)); @@ -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; } @@ -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) { @@ -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) { @@ -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 ); @@ -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 ) { @@ -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 ) { @@ -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; diff --git a/code/cgame/cg_players.c b/code/cgame/cg_players.c index a7858fd..dd29fe2 100644 --- a/code/cgame/cg_players.c +++ b/code/cgame/cg_players.c @@ -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; } diff --git a/code/client/cl_ui.c b/code/client/cl_ui.c index d1fdd37..cda68e2 100644 --- a/code/client/cl_ui.c +++ b/code/client/cl_ui.c @@ -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; @@ -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); @@ -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 : @@ -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; @@ -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 { diff --git a/code/client/snd_dma.c b/code/client/snd_dma.c index 9b271ab..ad027c0 100644 --- a/code/client/snd_dma.c +++ b/code/client/snd_dma.c @@ -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; } @@ -1605,7 +1605,7 @@ S_FreeOldestSound ====================== */ -void S_FreeOldestSound() { +void S_FreeOldestSound( void ) { int i, oldest, used; sfx_t *sfx; sndBuffer *buffer, *nbuffer; diff --git a/code/client/snd_mem.c b/code/client/snd_mem.c index 23c413d..5ac4f1d 100644 --- a/code/client/snd_mem.c +++ b/code/client/snd_mem.c @@ -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) { @@ -73,7 +73,7 @@ redo: return v; } -void SND_setup() { +void SND_setup(void) { sndBuffer *p, *q; cvar_t *cv; int scs; @@ -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); } diff --git a/code/game/bg_misc.c b/code/game/bg_misc.c index 1e5a27e..2ff7770 100644 --- a/code/game/bg_misc.c +++ b/code/game/bg_misc.c @@ -48,7 +48,7 @@ gitem_t bg_itemlist[] = NULL, { NULL, NULL, - 0, 0} , + NULL, NULL} , /* icon */ NULL, /* pickup */ NULL, 0, @@ -69,7 +69,7 @@ gitem_t bg_itemlist[] = "sound/misc/ar1_pkup.wav", { "models/powerups/armor/shard.md3", "models/powerups/armor/shard_sphere.md3", - 0, 0} , + NULL, NULL} , /* icon */ "icons/iconr_shard", /* pickup */ "Armor Shard", 5, @@ -85,7 +85,7 @@ gitem_t bg_itemlist[] = "item_armor_combat", "sound/misc/ar2_pkup.wav", { "models/powerups/armor/armor_yel.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconr_yellow", /* pickup */ "Armor", 50, @@ -101,7 +101,7 @@ gitem_t bg_itemlist[] = "item_armor_body", "sound/misc/ar2_pkup.wav", { "models/powerups/armor/armor_red.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconr_red", /* pickup */ "Heavy Armor", 100, @@ -121,7 +121,7 @@ gitem_t bg_itemlist[] = "sound/items/s_health.wav", { "models/powerups/health/small_cross.md3", "models/powerups/health/small_sphere.md3", - 0, 0 }, + NULL, NULL }, /* icon */ "icons/iconh_green", /* pickup */ "5 Health", 5, @@ -138,7 +138,7 @@ gitem_t bg_itemlist[] = "sound/items/n_health.wav", { "models/powerups/health/medium_cross.md3", "models/powerups/health/medium_sphere.md3", - 0, 0 }, + NULL, NULL }, /* icon */ "icons/iconh_yellow", /* pickup */ "25 Health", 25, @@ -155,7 +155,7 @@ gitem_t bg_itemlist[] = "sound/items/l_health.wav", { "models/powerups/health/large_cross.md3", "models/powerups/health/large_sphere.md3", - 0, 0 }, + NULL, NULL }, /* icon */ "icons/iconh_red", /* pickup */ "50 Health", 50, @@ -172,7 +172,7 @@ gitem_t bg_itemlist[] = "sound/items/m_health.wav", { "models/powerups/health/mega_cross.md3", "models/powerups/health/mega_sphere.md3", - 0, 0 }, + NULL, NULL }, /* icon */ "icons/iconh_mega", /* pickup */ "Mega Health", 100, @@ -193,7 +193,7 @@ gitem_t bg_itemlist[] = "weapon_gauntlet", "sound/misc/w_pkup.wav", { "models/weapons2/gauntlet/gauntlet.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_gauntlet", /* pickup */ "Gauntlet", 0, @@ -209,7 +209,7 @@ gitem_t bg_itemlist[] = "weapon_shotgun", "sound/misc/w_pkup.wav", { "models/weapons2/shotgun/shotgun.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_shotgun", /* pickup */ "Shotgun", 10, @@ -225,7 +225,7 @@ gitem_t bg_itemlist[] = "weapon_machinegun", "sound/misc/w_pkup.wav", { "models/weapons2/machinegun/machinegun.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_machinegun", /* pickup */ "Machinegun", 40, @@ -241,7 +241,7 @@ gitem_t bg_itemlist[] = "weapon_grenadelauncher", "sound/misc/w_pkup.wav", { "models/weapons2/grenadel/grenadel.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_grenade", /* pickup */ "Grenade Launcher", 10, @@ -257,7 +257,7 @@ gitem_t bg_itemlist[] = "weapon_rocketlauncher", "sound/misc/w_pkup.wav", { "models/weapons2/rocketl/rocketl.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_rocket", /* pickup */ "Rocket Launcher", 10, @@ -273,7 +273,7 @@ gitem_t bg_itemlist[] = "weapon_lightning", "sound/misc/w_pkup.wav", { "models/weapons2/lightning/lightning.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_lightning", /* pickup */ "Lightning Gun", 100, @@ -289,7 +289,7 @@ gitem_t bg_itemlist[] = "weapon_railgun", "sound/misc/w_pkup.wav", { "models/weapons2/railgun/railgun.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_railgun", /* pickup */ "Railgun", 10, @@ -305,7 +305,7 @@ gitem_t bg_itemlist[] = "weapon_plasmagun", "sound/misc/w_pkup.wav", { "models/weapons2/plasma/plasma.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_plasma", /* pickup */ "Plasma Gun", 50, @@ -321,7 +321,7 @@ gitem_t bg_itemlist[] = "weapon_bfg", "sound/misc/w_pkup.wav", { "models/weapons2/bfg/bfg.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_bfg", /* pickup */ "BFG10K", 20, @@ -337,7 +337,7 @@ gitem_t bg_itemlist[] = "weapon_grapplinghook", "sound/misc/w_pkup.wav", { "models/weapons2/grapple/grapple.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_grapple", /* pickup */ "Grappling Hook", 0, @@ -357,7 +357,7 @@ gitem_t bg_itemlist[] = "ammo_shells", "sound/misc/am_pkup.wav", { "models/powerups/ammo/shotgunam.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/icona_shotgun", /* pickup */ "Shells", 10, @@ -373,7 +373,7 @@ gitem_t bg_itemlist[] = "ammo_bullets", "sound/misc/am_pkup.wav", { "models/powerups/ammo/machinegunam.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/icona_machinegun", /* pickup */ "Bullets", 50, @@ -389,7 +389,7 @@ gitem_t bg_itemlist[] = "ammo_grenades", "sound/misc/am_pkup.wav", { "models/powerups/ammo/grenadeam.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/icona_grenade", /* pickup */ "Grenades", 5, @@ -405,7 +405,7 @@ gitem_t bg_itemlist[] = "ammo_cells", "sound/misc/am_pkup.wav", { "models/powerups/ammo/plasmaam.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/icona_plasma", /* pickup */ "Cells", 30, @@ -421,7 +421,7 @@ gitem_t bg_itemlist[] = "ammo_lightning", "sound/misc/am_pkup.wav", { "models/powerups/ammo/lightningam.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/icona_lightning", /* pickup */ "Lightning", 60, @@ -437,7 +437,7 @@ gitem_t bg_itemlist[] = "ammo_rockets", "sound/misc/am_pkup.wav", { "models/powerups/ammo/rocketam.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/icona_rocket", /* pickup */ "Rockets", 5, @@ -453,7 +453,7 @@ gitem_t bg_itemlist[] = "ammo_slugs", "sound/misc/am_pkup.wav", { "models/powerups/ammo/railgunam.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/icona_railgun", /* pickup */ "Slugs", 10, @@ -469,7 +469,7 @@ gitem_t bg_itemlist[] = "ammo_bfg", "sound/misc/am_pkup.wav", { "models/powerups/ammo/bfgam.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/icona_bfg", /* pickup */ "Bfg Ammo", 15, @@ -488,7 +488,7 @@ gitem_t bg_itemlist[] = "holdable_teleporter", "sound/items/holdable.wav", { "models/powerups/holdable/teleporter.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/teleporter", /* pickup */ "Personal Teleporter", 60, @@ -505,7 +505,7 @@ gitem_t bg_itemlist[] = { "models/powerups/holdable/medkit.md3", "models/powerups/holdable/medkit_sphere.md3", - 0, 0}, + NULL, NULL}, /* icon */ "icons/medkit", /* pickup */ "Medkit", 60, @@ -525,7 +525,7 @@ gitem_t bg_itemlist[] = "sound/items/quaddamage.wav", { "models/powerups/instant/quad.md3", "models/powerups/instant/quad_ring.md3", - 0, 0 }, + NULL, NULL }, /* icon */ "icons/quad", /* pickup */ "Quad Damage", 30, @@ -542,7 +542,7 @@ gitem_t bg_itemlist[] = "sound/items/protect.wav", { "models/powerups/instant/enviro.md3", "models/powerups/instant/enviro_ring.md3", - 0, 0 }, + NULL, NULL }, /* icon */ "icons/envirosuit", /* pickup */ "Battle Suit", 30, @@ -559,7 +559,7 @@ gitem_t bg_itemlist[] = "sound/items/haste.wav", { "models/powerups/instant/haste.md3", "models/powerups/instant/haste_ring.md3", - 0, 0 }, + NULL, NULL }, /* icon */ "icons/haste", /* pickup */ "Speed", 30, @@ -576,7 +576,7 @@ gitem_t bg_itemlist[] = "sound/items/invisibility.wav", { "models/powerups/instant/invis.md3", "models/powerups/instant/invis_ring.md3", - 0, 0 }, + NULL, NULL }, /* icon */ "icons/invis", /* pickup */ "Invisibility", 30, @@ -593,7 +593,7 @@ gitem_t bg_itemlist[] = "sound/items/regeneration.wav", { "models/powerups/instant/regen.md3", "models/powerups/instant/regen_ring.md3", - 0, 0 }, + NULL, NULL }, /* icon */ "icons/regen", /* pickup */ "Regeneration", 30, @@ -610,7 +610,7 @@ gitem_t bg_itemlist[] = "sound/items/flight.wav", { "models/powerups/instant/flight.md3", "models/powerups/instant/flight_ring.md3", - 0, 0 }, + NULL, NULL }, /* icon */ "icons/flight", /* pickup */ "Flight", 60, @@ -627,7 +627,7 @@ Only in CTF games "team_CTF_redflag", NULL, { "models/flags/r_flag.md3", - 0, 0, 0 }, + NULL, NULL, NULL }, /* icon */ "icons/iconf_red1", /* pickup */ "Red Flag", 0, @@ -644,7 +644,7 @@ Only in CTF games "team_CTF_blueflag", NULL, { "models/flags/b_flag.md3", - 0, 0, 0 }, + NULL, NULL, NULL }, /* icon */ "icons/iconf_blu1", /* pickup */ "Blue Flag", 0, @@ -661,7 +661,7 @@ Only in CTF games "holdable_kamikaze", "sound/items/holdable.wav", { "models/powerups/kamikazi.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/kamikaze", /* pickup */ "Kamikaze", 60, @@ -677,7 +677,7 @@ Only in CTF games "holdable_portal", "sound/items/holdable.wav", { "models/powerups/holdable/porter.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/portal", /* pickup */ "Portal", 60, @@ -693,7 +693,7 @@ Only in CTF games "holdable_invulnerability", "sound/items/holdable.wav", { "models/powerups/holdable/invulnerability.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/invulnerability", /* pickup */ "Invulnerability", 60, @@ -709,7 +709,7 @@ Only in CTF games "ammo_nails", "sound/misc/am_pkup.wav", { "models/powerups/ammo/nailgunam.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/icona_nailgun", /* pickup */ "Nails", 20, @@ -725,7 +725,7 @@ Only in CTF games "ammo_mines", "sound/misc/am_pkup.wav", { "models/powerups/ammo/proxmineam.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/icona_proxlauncher", /* pickup */ "Proximity Mines", 10, @@ -741,7 +741,7 @@ Only in CTF games "ammo_belt", "sound/misc/am_pkup.wav", { "models/powerups/ammo/chaingunam.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/icona_chaingun", /* pickup */ "Chaingun Belt", 100, @@ -760,7 +760,7 @@ Only in CTF games "item_scout", "sound/items/scout.wav", { "models/powerups/scout.md3", - 0, 0, 0 }, + NULL, NULL, NULL }, /* icon */ "icons/scout", /* pickup */ "Scout", 30, @@ -776,7 +776,7 @@ Only in CTF games "item_guard", "sound/items/guard.wav", { "models/powerups/guard.md3", - 0, 0, 0 }, + NULL, NULL, NULL }, /* icon */ "icons/guard", /* pickup */ "Guard", 30, @@ -792,7 +792,7 @@ Only in CTF games "item_doubler", "sound/items/doubler.wav", { "models/powerups/doubler.md3", - 0, 0, 0 }, + NULL, NULL, NULL }, /* icon */ "icons/doubler", /* pickup */ "Doubler", 30, @@ -808,7 +808,7 @@ Only in CTF games "item_ammoregen", "sound/items/ammoregen.wav", { "models/powerups/ammo.md3", - 0, 0, 0 }, + NULL, NULL, NULL }, /* icon */ "icons/ammo_regen", /* pickup */ "Ammo Regen", 30, @@ -825,7 +825,7 @@ Only in One Flag CTF games "team_CTF_neutralflag", NULL, { "models/flags/n_flag.md3", - 0, 0, 0 }, + NULL, NULL, NULL }, /* icon */ "icons/iconf_neutral1", /* pickup */ "Neutral Flag", 0, @@ -839,7 +839,7 @@ Only in One Flag CTF games "item_redcube", "sound/misc/am_pkup.wav", { "models/powerups/orb/r_orb.md3", - 0, 0, 0 }, + NULL, NULL, NULL }, /* icon */ "icons/iconh_rorb", /* pickup */ "Red Cube", 0, @@ -853,7 +853,7 @@ Only in One Flag CTF games "item_bluecube", "sound/misc/am_pkup.wav", { "models/powerups/orb/b_orb.md3", - 0, 0, 0 }, + NULL, NULL, NULL }, /* icon */ "icons/iconh_borb", /* pickup */ "Blue Cube", 0, @@ -868,7 +868,7 @@ Only in One Flag CTF games "weapon_nailgun", "sound/misc/w_pkup.wav", { "models/weapons/nailgun/nailgun.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_nailgun", /* pickup */ "Nailgun", 10, @@ -884,7 +884,7 @@ Only in One Flag CTF games "weapon_prox_launcher", "sound/misc/w_pkup.wav", { "models/weapons/proxmine/proxmine.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_proxlauncher", /* pickup */ "Prox Launcher", 5, @@ -905,7 +905,7 @@ Only in One Flag CTF games "weapon_chaingun", "sound/misc/w_pkup.wav", { "models/weapons/vulcan/vulcan.md3", - 0, 0, 0}, + NULL, NULL, NULL}, /* icon */ "icons/iconw_chaingun", /* pickup */ "Chaingun", 80, diff --git a/code/game/g_client.c b/code/game/g_client.c index 355077b..fe15b11 100644 --- a/code/game/g_client.c +++ b/code/game/g_client.c @@ -1004,8 +1004,8 @@ void ClientBegin( int clientNum ) { trap_UnlinkEntity( ent ); } G_InitGentity( ent ); - ent->touch = 0; - ent->pain = 0; + ent->touch = NULL; + ent->pain = NULL; ent->client = client; client->pers.connected = CON_CONNECTED; diff --git a/code/game/g_items.c b/code/game/g_items.c index 1222fbd..fd75412 100644 --- a/code/game/g_items.c +++ b/code/game/g_items.c @@ -542,7 +542,7 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace) { // events such as ctf flags if ( respawn <= 0 ) { ent->nextthink = 0; - ent->think = 0; + ent->think = NULL; } else { ent->nextthink = level.time + respawn * 1000; ent->think = RespawnItem; diff --git a/code/game/g_misc.c b/code/game/g_misc.c index ee75cde..f631a8d 100644 --- a/code/game/g_misc.c +++ b/code/game/g_misc.c @@ -288,7 +288,7 @@ void Use_Shooter( gentity_t *ent, gentity_t *other, gentity_t *activator ) { static void InitShooter_Finish( gentity_t *ent ) { ent->enemy = G_PickTarget( ent->target ); - ent->think = 0; + ent->think = NULL; ent->nextthink = 0; } diff --git a/code/game/g_spawn.c b/code/game/g_spawn.c index 0739e4e..f21e13b 100644 --- a/code/game/g_spawn.c +++ b/code/game/g_spawn.c @@ -266,7 +266,7 @@ spawn_t spawns[] = { #endif {"item_botroam", SP_item_botroam}, - {0, 0} + {NULL, NULL} }; /* diff --git a/code/game/g_trigger.c b/code/game/g_trigger.c index 9db2304..16c1fc9 100644 --- a/code/game/g_trigger.c +++ b/code/game/g_trigger.c @@ -67,7 +67,7 @@ void multi_trigger( gentity_t *ent, gentity_t *activator ) { } else { // we can't just remove (self) here, because this is a touch function // called while looping through area links... - ent->touch = 0; + ent->touch = NULL; ent->nextthink = level.time + FRAMETIME; ent->think = G_FreeEntity; } diff --git a/code/game/g_utils.c b/code/game/g_utils.c index 8c6f35b..71bcc15 100644 --- a/code/game/g_utils.c +++ b/code/game/g_utils.c @@ -54,7 +54,7 @@ void AddRemap(const char *oldShader, const char *newShader, float timeOffset) { } } -const char *BuildShaderStateConfig() { +const char *BuildShaderStateConfig(void) { static char buff[MAX_STRING_CHARS*4]; char out[(MAX_QPATH * 2) + 5]; int i; diff --git a/code/q3_ui/ui_addbots.c b/code/q3_ui/ui_addbots.c index c01bc58..e80b443 100644 --- a/code/q3_ui/ui_addbots.c +++ b/code/q3_ui/ui_addbots.c @@ -241,18 +241,18 @@ static const char *skillNames[] = { "Hurt Me Plenty", "Hardcore", "Nightmare!", - 0 + NULL }; static const char *teamNames1[] = { "Free", - 0 + NULL }; static const char *teamNames2[] = { "Red", "Blue", - 0 + NULL }; static void UI_AddBotsMenu_Init( void ) { diff --git a/code/q3_ui/ui_network.c b/code/q3_ui/ui_network.c index ef047a3..90b5a1e 100644 --- a/code/q3_ui/ui_network.c +++ b/code/q3_ui/ui_network.c @@ -50,7 +50,7 @@ static const char *rate_items[] = { "56K", "ISDN", "LAN/Cable/xDSL", - 0 + NULL }; typedef struct { diff --git a/code/q3_ui/ui_playersettings.c b/code/q3_ui/ui_playersettings.c index 99fafd0..7a24e08 100644 --- a/code/q3_ui/ui_playersettings.c +++ b/code/q3_ui/ui_playersettings.c @@ -95,7 +95,7 @@ static const char *handicap_items[] = { "15", "10", "5", - 0 + NULL }; diff --git a/code/q3_ui/ui_preferences.c b/code/q3_ui/ui_preferences.c index 4b62f5c..744a1e1 100644 --- a/code/q3_ui/ui_preferences.c +++ b/code/q3_ui/ui_preferences.c @@ -86,7 +86,7 @@ static const char *teamoverlay_names[] = "upper right", "lower right", "lower left", - 0 + NULL }; static void Preferences_SetMenuItems( void ) { diff --git a/code/q3_ui/ui_qmenu.c b/code/q3_ui/ui_qmenu.c index a6ec29e..d26eaeb 100644 --- a/code/q3_ui/ui_qmenu.c +++ b/code/q3_ui/ui_qmenu.c @@ -1554,7 +1554,7 @@ Menu_ItemAtCursor void *Menu_ItemAtCursor( menuframework_s *m ) { if ( m->cursor < 0 || m->cursor >= m->nitems ) - return 0; + return NULL; return m->items[m->cursor]; } diff --git a/code/q3_ui/ui_servers2.c b/code/q3_ui/ui_servers2.c index 0804b5a..2067354 100644 --- a/code/q3_ui/ui_servers2.c +++ b/code/q3_ui/ui_servers2.c @@ -101,7 +101,7 @@ static const char *master_items[] = { "Local", "Internet", "Favorites", - 0 + NULL }; static const char *servertype_items[] = { @@ -110,7 +110,7 @@ static const char *servertype_items[] = { "Team Deathmatch", "Tournament", "Capture the Flag", - 0 + NULL }; static const char *sortkey_items[] = { @@ -119,7 +119,7 @@ static const char *sortkey_items[] = { "Open Player Spots", "Game Type", "Ping Time", - 0 + NULL }; static char* gamenames[] = { @@ -136,7 +136,7 @@ static char* gamenames[] = { "Urban Terror", // Urban Terror "OSP", // Orange Smoothie Productions "???", // unknown - 0 + NULL }; static char* netnames[] = { diff --git a/code/q3_ui/ui_sound.c b/code/q3_ui/ui_sound.c index e09e463..43a057e 100644 --- a/code/q3_ui/ui_sound.c +++ b/code/q3_ui/ui_sound.c @@ -48,7 +48,7 @@ SOUND OPTIONS MENU static const char *quality_items[] = { - "Low", "High", 0 + "Low", "High", NULL }; typedef struct { diff --git a/code/q3_ui/ui_startserver.c b/code/q3_ui/ui_startserver.c index 401f687..9a193ed 100644 --- a/code/q3_ui/ui_startserver.c +++ b/code/q3_ui/ui_startserver.c @@ -98,7 +98,7 @@ static const char *gametype_items[] = { "Team Deathmatch", "Tournament", "Capture the Flag", - 0 + NULL }; static int gametype_remap[] = {GT_FFA, GT_TEAM, GT_TOURNAMENT, GT_CTF}; @@ -665,20 +665,20 @@ static const char *dedicated_list[] = { "No", "LAN", "Internet", - 0 + NULL }; static const char *playerType_list[] = { "Open", "Bot", "----", - 0 + NULL }; static const char *playerTeam_list[] = { "Blue", "Red", - 0 + NULL }; static const char *botSkill_list[] = { @@ -687,7 +687,7 @@ static const char *botSkill_list[] = { "Hurt Me Plenty", "Hardcore", "Nightmare!", - 0 + NULL }; diff --git a/code/q3_ui/ui_video.c b/code/q3_ui/ui_video.c index a7f16f4..f7ecafd 100644 --- a/code/q3_ui/ui_video.c +++ b/code/q3_ui/ui_video.c @@ -242,7 +242,7 @@ static const char *s_drivers[] = { OPENGL_DRIVER_NAME, _3DFX_DRIVER_NAME, - 0 + NULL }; #define ID_BACK2 101 @@ -723,7 +723,7 @@ void GraphicsOptions_MenuInit( void ) { "Default", "Voodoo", - 0 + NULL }; static const char *tq_names[] = @@ -731,7 +731,7 @@ void GraphicsOptions_MenuInit( void ) "Default", "16 bit", "32 bit", - 0 + NULL }; static const char *s_graphics_options_names[] = @@ -741,14 +741,14 @@ void GraphicsOptions_MenuInit( void ) "Fast", "Fastest", "Custom", - 0 + NULL }; static const char *lighting_names[] = { "Lightmap", "Vertex", - 0 + NULL }; static const char *colordepth_names[] = @@ -756,7 +756,7 @@ void GraphicsOptions_MenuInit( void ) "Default", "16 bit", "32 bit", - 0 + NULL }; static const char *resolutions[] = @@ -773,26 +773,26 @@ void GraphicsOptions_MenuInit( void ) "1600x1200", "2048x1536", "856x480 wide screen", - 0 + NULL }; static const char *filter_names[] = { "Bilinear", "Trilinear", - 0 + NULL }; static const char *quality_names[] = { "Low", "Medium", "High", - 0 + NULL }; static const char *enabled_names[] = { "Off", "On", - 0 + NULL }; int y; diff --git a/code/qcommon/cmd.c b/code/qcommon/cmd.c index 0f1178b..92b6e73 100644 --- a/code/qcommon/cmd.c +++ b/code/qcommon/cmd.c @@ -422,7 +422,7 @@ For rcon use when you want to transmit without altering quoting https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=543 ============ */ -char *Cmd_Cmd() +char *Cmd_Cmd(void) { return cmd_cmd; } diff --git a/code/qcommon/files.c b/code/qcommon/files.c index 3537fff..632695f 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -321,7 +321,7 @@ FS_Initialized ============== */ -qboolean FS_Initialized() { +qboolean FS_Initialized( void ) { return (fs_searchpaths != NULL); } @@ -354,7 +354,7 @@ FS_LoadStack return load stack ================= */ -int FS_LoadStack() +int FS_LoadStack( void ) { return fs_loadStack; } diff --git a/code/qcommon/unzip.c b/code/qcommon/unzip.c index 6522ec7..6d45492 100644 --- a/code/qcommon/unzip.c +++ b/code/qcommon/unzip.c @@ -235,7 +235,7 @@ typedef Byte *voidp; #define Z_DEFLATED 8 /* The deflate compression method (the only one supported in this version) */ -#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ +#define Z_NULL (void *)0 /* for initializing zalloc, zfree, opaque */ #define zlib_version zlibVersion() /* for compatibility with versions < 1.0.2 */ diff --git a/code/renderer/tr_font.c b/code/renderer/tr_font.c index 1878025..5901f38 100644 --- a/code/renderer/tr_font.c +++ b/code/renderer/tr_font.c @@ -527,7 +527,7 @@ void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) { -void R_InitFreeType() { +void R_InitFreeType(void) { #ifdef BUILD_FREETYPE if (FT_Init_FreeType( &ftLibrary )) { ri.Printf(PRINT_ALL, "R_InitFreeType: Unable to initialize FreeType.\n"); @@ -537,7 +537,7 @@ void R_InitFreeType() { } -void R_DoneFreeType() { +void R_DoneFreeType(void) { #ifdef BUILD_FREETYPE if (ftLibrary) { FT_Done_FreeType( ftLibrary ); diff --git a/code/renderer/tr_image.c b/code/renderer/tr_image.c index 630b886..22dadbe 100644 --- a/code/renderer/tr_image.c +++ b/code/renderer/tr_image.c @@ -1374,7 +1374,7 @@ static void LoadJPG( const char *filename, unsigned char **pic, int *width, int /* This struct contains the JPEG decompression parameters and pointers to * working space (which is allocated as needed by the JPEG library). */ - struct jpeg_decompress_struct cinfo = {0}; + struct jpeg_decompress_struct cinfo = {NULL}; /* We use our private extension JPEG error handler. * Note that this struct must live as long as the main JPEG parameter * struct, to avoid dangling-pointer problems. diff --git a/code/renderer/tr_mesh.c b/code/renderer/tr_mesh.c index e1e261e..23caef3 100644 --- a/code/renderer/tr_mesh.c +++ b/code/renderer/tr_mesh.c @@ -287,10 +287,10 @@ R_AddMD3Surfaces */ void R_AddMD3Surfaces( trRefEntity_t *ent ) { int i; - md3Header_t *header = 0; - md3Surface_t *surface = 0; - md3Shader_t *md3Shader = 0; - shader_t *shader = 0; + md3Header_t *header = NULL; + md3Surface_t *surface = NULL; + md3Shader_t *md3Shader = NULL; + shader_t *shader = NULL; int cull; int lod; int fogNum; diff --git a/code/ui/ui_atoms.c b/code/ui/ui_atoms.c index 359fb31..f364986 100644 --- a/code/ui/ui_atoms.c +++ b/code/ui/ui_atoms.c @@ -180,7 +180,7 @@ void UI_LoadBestScores(const char *map, int game) { UI_ClearScores =============== */ -void UI_ClearScores() { +void UI_ClearScores(void) { char gameList[4096]; char *gameFile; int i, len, count, size; diff --git a/code/ui/ui_gameinfo.c b/code/ui/ui_gameinfo.c index 47b2a87..65a4ed6 100644 --- a/code/ui/ui_gameinfo.c +++ b/code/ui/ui_gameinfo.c @@ -310,7 +310,7 @@ char *UI_GetBotInfoByName( const char *name ) { return NULL; } -int UI_GetNumBots() { +int UI_GetNumBots( void ) { return ui_numBots; } diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index e1108b4..e707937 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -981,7 +981,7 @@ void UI_LoadMenus(const char *menuFile, qboolean reset) { trap_PC_FreeSource( handle ); } -void UI_Load() { +void UI_Load(void) { char lastName[1024]; menuDef_t *menu = Menu_GetFocused(); char *menuSet = UI_Cvar_VariableString("ui_menuFiles"); @@ -1414,7 +1414,7 @@ static void UI_DrawTierGameType(rectDef_t *rect, float scale, vec4_t color, int #ifndef MISSIONPACK // bk001206 -static const char *UI_OpponentLeaderName() { +static const char *UI_OpponentLeaderName(void) { int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName")); return uiInfo.teamList[i].teamMembers[0]; } @@ -1456,14 +1456,14 @@ static const int UI_AIIndexFromName(const char *name) { #ifndef MISSIONPACK // bk001206 -static const char *UI_OpponentLeaderHead() { +static const char *UI_OpponentLeaderHead(void) { const char *leader = UI_OpponentLeaderName(); return UI_AIFromName(leader); } #endif #ifndef MISSIONPACK // bk001206 -static const char *UI_OpponentLeaderModel() { +static const char *UI_OpponentLeaderModel(void) { int i; const char *head = UI_OpponentLeaderHead(); for (i = 0; i < uiInfo.characterCount; i++) { @@ -2769,7 +2769,7 @@ void UI_ServersSort(int column, qboolean force) { } /* -static void UI_StartSinglePlayer() { +static void UI_StartSinglePlayer(void) { int i,j, k, skill; char buff[1024]; i = trap_Cvar_VariableValue( "ui_currentTier" ); @@ -2955,7 +2955,7 @@ static void UI_StartSkirmish(qboolean next) { UI_SelectedMap(index, &actual); if (UI_SetNextMap(actual, index)) { } else { - UI_GameType_HandleKey(0, 0, K_MOUSE1, qfalse); + UI_GameType_HandleKey(0, NULL, K_MOUSE1, qfalse); UI_MapCountByGameType(qtrue); Menu_SetFeederSelection(NULL, FEEDER_MAPS, 0, "skirmish"); } @@ -3220,8 +3220,8 @@ static void UI_RunMenuScript(char **args) { ui_mapIndex.integer = UI_GetIndexFromSelection(ui_currentMap.integer); trap_Cvar_Set("ui_mapIndex", va("%d", ui_mapIndex.integer)); Menu_SetFeederSelection(NULL, FEEDER_MAPS, ui_mapIndex.integer, "skirmish"); - UI_GameType_HandleKey(0, 0, K_MOUSE1, qfalse); - UI_GameType_HandleKey(0, 0, K_MOUSE2, qfalse); + UI_GameType_HandleKey(0, NULL, K_MOUSE1, qfalse); + UI_GameType_HandleKey(0, NULL, K_MOUSE2, qfalse); } else if (Q_stricmp(name, "resetDefaults") == 0) { trap_Cmd_ExecuteText( EXEC_APPEND, "exec default.cfg\n"); trap_Cmd_ExecuteText( EXEC_APPEND, "cvar_restart\n"); @@ -3576,12 +3576,12 @@ qboolean UI_hasSkinForBase(const char *base, const char *team) { Com_sprintf( test, sizeof( test ), "models/players/%s/%s/lower_default.skin", base, team ); - if (trap_FS_FOpenFile(test, 0, FS_READ)) { + if (trap_FS_FOpenFile(test, NULL, FS_READ)) { return qtrue; } Com_sprintf( test, sizeof( test ), "models/players/characters/%s/%s/lower_default.skin", base, team ); - if (trap_FS_FOpenFile(test, 0, FS_READ)) { + if (trap_FS_FOpenFile(test, NULL, FS_READ)) { return qtrue; } return qfalse; @@ -3592,7 +3592,7 @@ qboolean UI_hasSkinForBase(const char *base, const char *team) { UI_MapCountByTeam ================== */ -static int UI_HeadCountByTeam() { +static int UI_HeadCountByTeam(void) { static int init = 0; int i, j, k, c, tIndex; diff --git a/code/ui/ui_players.c b/code/ui/ui_players.c index a40dcaa..bf636a8 100644 --- a/code/ui/ui_players.c +++ b/code/ui/ui_players.c @@ -907,7 +907,7 @@ UI_FileExists static qboolean UI_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; } diff --git a/code/ui/ui_shared.c b/code/ui/ui_shared.c index 3b1fc92..db643ca 100644 --- a/code/ui/ui_shared.c +++ b/code/ui/ui_shared.c @@ -118,7 +118,7 @@ void UI_InitMemory( void ) { outOfMemory = qfalse; } -qboolean UI_OutOfMemory() { +qboolean UI_OutOfMemory( void ) { return outOfMemory; } @@ -210,7 +210,7 @@ const char *String_Alloc(const char *p) { return NULL; } -void String_Report() { +void String_Report(void) { float f; Com_Printf("Memory/String Pool Info\n"); Com_Printf("----------------\n"); @@ -229,10 +229,10 @@ void String_Report() { String_Init ================= */ -void String_Init() { +void String_Init(void) { int i; for (i = 0; i < HASH_TABLE_SIZE; i++) { - strHandle[i] = 0; + strHandle[i] = NULL; } strHandleCount = 0; strPoolIndex = 0; @@ -1032,7 +1032,7 @@ void Menus_CloseByName(const char *p) { } } -void Menus_CloseAll() { +void Menus_CloseAll(void) { int i; for (i = 0; i < menuCount; i++) { Menu_RunCloseScript(&Menus[i]); @@ -3449,7 +3449,7 @@ void Item_Bind_Paint(itemDef_t *item) { } } -qboolean Display_KeyBindPending() { +qboolean Display_KeyBindPending(void) { return g_waitingForKey; } @@ -4075,7 +4075,7 @@ itemDef_t *Menu_GetFocusedItem(menuDef_t *menu) { return NULL; } -menuDef_t *Menu_GetFocused() { +menuDef_t *Menu_GetFocused(void) { int i; for (i = 0; i < menuCount; i++) { if (Menus[i].window.flags & WINDOW_HASFOCUS && Menus[i].window.flags & WINDOW_VISIBLE) { @@ -4125,7 +4125,7 @@ void Menu_SetFeederSelection(menuDef_t *menu, int feeder, int index, const char } } -qboolean Menus_AnyFullScreenVisible() { +qboolean Menus_AnyFullScreenVisible(void) { int i; for (i = 0; i < menuCount; i++) { if (Menus[i].window.flags & WINDOW_VISIBLE && Menus[i].fullScreen) { @@ -5611,11 +5611,11 @@ void Menu_New(int handle) { } } -int Menu_Count() { +int Menu_Count(void) { return menuCount; } -void Menu_PaintAll() { +void Menu_PaintAll(void) { int i; if (captureFunc) { captureFunc(captureData); @@ -5631,11 +5631,11 @@ void Menu_PaintAll() { } } -void Menu_Reset() { +void Menu_Reset(void) { menuCount = 0; } -displayContextDef_t *Display_GetContext() { +displayContextDef_t *Display_GetContext(void) { return DC; } @@ -5740,7 +5740,7 @@ static void Menu_CacheContents(menuDef_t *menu) { } -void Display_CacheAll() { +void Display_CacheAll(void) { int i; for (i = 0; i < menuCount; i++) { Menu_CacheContents(&Menus[i]); diff --git a/code/unix/linux_qgl.c b/code/unix/linux_qgl.c index b509c0e..b38edbc 100644 --- a/code/unix/linux_qgl.c +++ b/code/unix/linux_qgl.c @@ -3407,17 +3407,17 @@ qboolean QGL_Init( const char *dllname ) qglXCopyContext = GPA("glXCopyContext"); qglXSwapBuffers = GPA("glXSwapBuffers"); - qglLockArraysEXT = 0; - qglUnlockArraysEXT = 0; - qglPointParameterfEXT = 0; - qglPointParameterfvEXT = 0; - qglColorTableEXT = 0; - qgl3DfxSetPaletteEXT = 0; - qglSelectTextureSGIS = 0; - qglMTexCoord2fSGIS = 0; - qglActiveTextureARB = 0; - qglClientActiveTextureARB = 0; - qglMultiTexCoord2fARB = 0; + qglLockArraysEXT = NULL; + qglUnlockArraysEXT = NULL; + qglPointParameterfEXT = NULL; + qglPointParameterfvEXT = NULL; + qglColorTableEXT = NULL; + qgl3DfxSetPaletteEXT = NULL; + qglSelectTextureSGIS = NULL; + qglMTexCoord2fSGIS = NULL; + qglActiveTextureARB = NULL; + qglClientActiveTextureARB = NULL; + qglMultiTexCoord2fARB = NULL; return qtrue; } diff --git a/code/unix/sdl_glimp.c b/code/unix/sdl_glimp.c index c20f394..2724811 100644 --- a/code/unix/sdl_glimp.c +++ b/code/unix/sdl_glimp.c @@ -1316,13 +1316,13 @@ void IN_StartupJoystick( void ) if (!SDL_WasInit(SDL_INIT_JOYSTICK)) { - Com_Printf( PRINT_ALL, "Calling SDL_Init(SDL_INIT_JOYSTICK)...\n"); + Com_Printf("Calling SDL_Init(SDL_INIT_JOYSTICK)...\n"); if (SDL_Init(SDL_INIT_JOYSTICK) == -1) { Com_Printf("SDL_Init(SDL_INIT_JOYSTICK) failed: %s\n", SDL_GetError()); return; } - Com_Printf( PRINT_ALL, "SDL_Init(SDL_INIT_JOYSTICK) passed.\n"); + Com_Printf("SDL_Init(SDL_INIT_JOYSTICK) passed.\n"); } total = SDL_NumJoysticks(); diff --git a/code/unix/sdl_snd.c b/code/unix/sdl_snd.c index 0c28316..39fc933 100644 --- a/code/unix/sdl_snd.c +++ b/code/unix/sdl_snd.c @@ -169,13 +169,13 @@ qboolean SNDDMA_Init(void) if (!SDL_WasInit(SDL_INIT_AUDIO)) { - Com_Printf( PRINT_ALL, "Calling SDL_Init(SDL_INIT_AUDIO)...\n"); + Com_Printf("Calling SDL_Init(SDL_INIT_AUDIO)...\n"); if (SDL_Init(SDL_INIT_AUDIO) == -1) { - Com_Printf( PRINT_ALL, "SDL_Init(SDL_INIT_AUDIO) failed: %s\n", SDL_GetError()); + Com_Printf("SDL_Init(SDL_INIT_AUDIO) failed: %s\n", SDL_GetError()); return qfalse; } - Com_Printf( PRINT_ALL, "SDL_Init(SDL_INIT_AUDIO) passed.\n"); + Com_Printf("SDL_Init(SDL_INIT_AUDIO) passed.\n"); } if (SDL_AudioDriverName(drivername, sizeof (drivername)) == NULL) diff --git a/code/unix/unix_shared.c b/code/unix/unix_shared.c index beb69c4..e3d0dad 100644 --- a/code/unix/unix_shared.c +++ b/code/unix/unix_shared.c @@ -253,7 +253,7 @@ char **Sys_ListFiles( const char *directory, const char *extension, char *filter nfiles = 0; Sys_ListFilteredFiles( directory, "", filter, list, &nfiles ); - list[ nfiles ] = 0; + list[ nfiles ] = NULL; *numfiles = nfiles; if (!nfiles) @@ -309,7 +309,7 @@ char **Sys_ListFiles( const char *directory, const char *extension, char *filter nfiles++; } - list[ nfiles ] = 0; + list[ nfiles ] = NULL; closedir(fdir); @@ -428,7 +428,7 @@ char *Sys_GetCurrentUser( void ) #if defined(__linux__) // TTimo // sysconf() in libc, POSIX.1 compliant -unsigned int Sys_ProcessorCount() +unsigned int Sys_ProcessorCount(void) { return sysconf(_SC_NPROCESSORS_ONLN); } -- cgit v1.2.3