* Applied ajax's cleanup patch

This commit is contained in:
Tim Angus 2005-09-23 17:39:14 +00:00
parent 4c6f59c541
commit fe14a45ad1
40 changed files with 166 additions and 166 deletions

View file

@ -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

View file

@ -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

View file

@ -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 =

View file

@ -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++) {

View file

@ -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;

View file

@ -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;
}

View file

@ -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 {

View file

@ -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;

View file

@ -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);
}

View file

@ -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,

View file

@ -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;

View file

@ -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;

View file

@ -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;
}

View file

@ -266,7 +266,7 @@ spawn_t spawns[] = {
#endif
{"item_botroam", SP_item_botroam},
{0, 0}
{NULL, NULL}
};
/*

View file

@ -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;
}

View file

@ -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;

View file

@ -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 ) {

View file

@ -50,7 +50,7 @@ static const char *rate_items[] = {
"56K",
"ISDN",
"LAN/Cable/xDSL",
0
NULL
};
typedef struct {

View file

@ -95,7 +95,7 @@ static const char *handicap_items[] = {
"15",
"10",
"5",
0
NULL
};

View file

@ -86,7 +86,7 @@ static const char *teamoverlay_names[] =
"upper right",
"lower right",
"lower left",
0
NULL
};
static void Preferences_SetMenuItems( void ) {

View file

@ -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];
}

View file

@ -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[] = {

View file

@ -48,7 +48,7 @@ SOUND OPTIONS MENU
static const char *quality_items[] = {
"Low", "High", 0
"Low", "High", NULL
};
typedef struct {

View file

@ -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
};

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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 */

View file

@ -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 );

View file

@ -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.

View file

@ -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;

View file

@ -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;

View file

@ -310,7 +310,7 @@ char *UI_GetBotInfoByName( const char *name ) {
return NULL;
}
int UI_GetNumBots() {
int UI_GetNumBots( void ) {
return ui_numBots;
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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]);

View file

@ -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;
}

View file

@ -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();

View file

@ -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)

View file

@ -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);
}