ref: 453654e80975b11ee9283afa4e6efd9540d0cd42
parent: f931251fabd44ccfa46a8180f0c57230cbb1aa7c
author: qwx <qwx@sciops.net>
date: Thu Jul 22 14:43:11 EDT 2021
qw: always use %d instead of %i in printf functions print(2) and printf(2) usage is mixed together, this should avoid stupid errors, esp. if printf stuff is removed later
--- a/qw/cl_cam.c
+++ b/qw/cl_cam.c
@@ -105,7 +105,7 @@
{
char st[40];
- sprintf(st, "ptrack %i", playernum);
+ sprintf(st, "ptrack %d", playernum);
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
MSG_WriteString (&cls.netchan.message, st);
spec_track = playernum;
--- a/qw/cl_demo.c
+++ b/qw/cl_demo.c
@@ -561,7 +561,7 @@
}
MSG_WriteByte (&buf, svc_stufftext);
- MSG_WriteString (&buf, va("cmd spawn %i 0\n", cl.servercount) );
+ MSG_WriteString (&buf, va("cmd spawn %d 0\n", cl.servercount) );
if (buf.cursize) {
CL_WriteRecordDemoMessage (&buf, seq++);
@@ -752,7 +752,7 @@
time = Sys_DoubleTime() - cls.td_starttime;
if (!time)
time = 1;
- Con_Printf ("%i frames %5.1f seconds %5.1f fps\n", frames, time, frames/time);
+ Con_Printf ("%d frames %5.1f seconds %5.1f fps\n", frames, time, frames/time);
}
/*
--- a/qw/cl_ents.c
+++ b/qw/cl_ents.c
@@ -307,7 +307,7 @@
{
while (oldindex < oldp->num_entities)
{ // copy all the rest of the entities from the old packet
-//Con_Printf ("copy %i\n", oldp->entities[oldindex].number);
+//Con_Printf ("copy %d\n", oldp->entities[oldindex].number);
if (newindex >= MAX_PACKET_ENTITIES)
Host_EndGame ("CL_ParsePacketEntities: newindex == MAX_PACKET_ENTITIES");
newp->entities[newindex] = oldp->entities[oldindex];
@@ -328,7 +328,7 @@
return;
}
-//Con_Printf ("copy %i\n", oldnum);
+//Con_Printf ("copy %d\n", oldnum);
// copy one of the old entities over to the new packet unchanged
if (newindex >= MAX_PACKET_ENTITIES)
Host_EndGame ("CL_ParsePacketEntities: newindex == MAX_PACKET_ENTITIES");
@@ -340,7 +340,7 @@
if (newnum < oldnum)
{ // new from baseline
-//Con_Printf ("baseline %i\n", newnum);
+//Con_Printf ("baseline %d\n", newnum);
if (word & U_REMOVE)
{
if (full)
@@ -371,7 +371,7 @@
oldindex++;
continue;
}
-//Con_Printf ("delta %i\n",newnum);
+//Con_Printf ("delta %d\n",newnum);
CL_ParseDelta (&oldp->entities[oldindex], &newp->entities[newindex], word);
newindex++;
oldindex++;
@@ -852,7 +852,7 @@
if (msec > 255)
msec = 255;
state->command.msec = msec;
-//Con_DPrintf ("predict: %i\n", msec);
+//Con_DPrintf ("predict: %d\n", msec);
oldphysent = pmove.numphysent;
CL_SetSolidPlayers (j);
@@ -974,7 +974,7 @@
if (msec > 255)
msec = 255;
state->command.msec = msec;
- //Con_DPrintf ("predict: %i\n", msec);
+ //Con_DPrintf ("predict: %d\n", msec);
CL_PredictUsercmd (state, &exact, &state->command, false);
VectorCopy (exact.origin, pplayer->origin);
--- a/qw/cl_main.c
+++ b/qw/cl_main.c
@@ -186,7 +186,7 @@
Info_SetValueForStarKey (cls.userinfo, "*ip", adr.addr, MAX_INFO_STRING);
// Con_Printf ("Connecting to %s...\n", cls.servername);
- sprintf (data, "%c%c%c%cconnect %i %i %i \"%s\"\n",
+ sprintf (data, "%c%c%c%cconnect %d %d %d \"%s\"\n",
255, 255, 255, 255, PROTOCOL_VERSION, cls.qport, cls.challenge, cls.userinfo);
NET_SendPacket (strlen(data), data, &adr);
}
@@ -462,12 +462,12 @@
{
if (cl.players[i].name[0])
{
- Con_Printf ("%6i %4i %s\n", cl.players[i].userid, cl.players[i].frags, cl.players[i].name);
+ Con_Printf ("%6d %4d %s\n", cl.players[i].userid, cl.players[i].frags, cl.players[i].name);
c++;
}
}
- Con_Printf ("%i total users\n", c);
+ Con_Printf ("%d total users\n", c);
}
void CL_Color_f (void)
@@ -500,9 +500,9 @@
if (bottom > 13)
bottom = 13;
- sprintf (num, "%i", top);
+ sprintf (num, "%d", top);
Cvar_Set ("topcolor", num);
- sprintf (num, "%i", bottom);
+ sprintf (num, "%d", bottom);
Cvar_Set ("bottomcolor", num);
}
@@ -1278,7 +1278,7 @@
time3 = Sys_DoubleTime ();
pass2 = (time2 - time1)*1000;
pass3 = (time3 - time2)*1000;
- Con_Printf ("%3i tot %3i server %3i gfx %3i snd\n",
+ Con_Printf ("%3d tot %3d server %3d gfx %3d snd\n",
pass1+pass2+pass3, pass1, pass2, pass3);
}
--- a/qw/cl_parse.c
+++ b/qw/cl_parse.c
@@ -233,7 +233,7 @@
// done with modellist, request first of static signon messages
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
-// MSG_WriteString (&cls.netchan.message, va("prespawn %i 0 %i", cl.servercount, cl.worldmodel->checksum2));
+// MSG_WriteString (&cls.netchan.message, va("prespawn %d 0 %d", cl.servercount, cl.worldmodel->checksum2));
MSG_WriteString (&cls.netchan.message, va(prespawn_name, cl.servercount, cl.worldmodel->checksum2));
}
@@ -276,7 +276,7 @@
cl_spikeindex = -1;
cl_flagindex = -1;
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
-// MSG_WriteString (&cls.netchan.message, va("modellist %i 0", cl.servercount));
+// MSG_WriteString (&cls.netchan.message, va("modellist %d 0", cl.servercount));
MSG_WriteString (&cls.netchan.message, va(modellist_name, cl.servercount, 0));
}
@@ -390,7 +390,7 @@
if (10*(percent/10) != cls.downloadpercent)
{
cls.downloadpercent = 10*(percent/10);
- Con_Printf ("%i%%", cls.downloadpercent);
+ Con_Printf ("%d%%", cls.downloadpercent);
}
*/
cls.downloadpercent = percent;
@@ -537,7 +537,7 @@
protover = MSG_ReadLong ();
if (protover != PROTOCOL_VERSION &&
!(cls.demoplayback && (protover == 26 || protover == 27 || protover == 28)))
- Host_EndGame ("Server returned version %i, not %i\nYou probably need to upgrade.\nCheck http://www.quakeworld.net/", protover, PROTOCOL_VERSION);
+ Host_EndGame ("Server returned version %d, not %d\nYou probably need to upgrade.\nCheck http://www.quakeworld.net/", protover, PROTOCOL_VERSION);
cl.servercount = MSG_ReadLong ();
@@ -596,7 +596,7 @@
// ask for the sound list next
memset(cl.sound_name, 0, sizeof(cl.sound_name));
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
-// MSG_WriteString (&cls.netchan.message, va("soundlist %i 0", cl.servercount));
+// MSG_WriteString (&cls.netchan.message, va("soundlist %d 0", cl.servercount));
MSG_WriteString (&cls.netchan.message, va(soundlist_name, cl.servercount, 0));
// now waiting for downloads, etc
@@ -633,7 +633,7 @@
if (n) {
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
-// MSG_WriteString (&cls.netchan.message, va("soundlist %i %i", cl.servercount, n));
+// MSG_WriteString (&cls.netchan.message, va("soundlist %d %d", cl.servercount, n));
MSG_WriteString (&cls.netchan.message, va(soundlist_name, cl.servercount, n));
return;
}
@@ -679,7 +679,7 @@
if (n) {
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
-// MSG_WriteString (&cls.netchan.message, va("modellist %i %i", cl.servercount, n));
+// MSG_WriteString (&cls.netchan.message, va("modellist %d %d", cl.servercount, n));
MSG_WriteString (&cls.netchan.message, va(modellist_name, cl.servercount, n));
return;
}
@@ -810,7 +810,7 @@
channel &= 7;
if (ent > MAX_EDICTS)
- Host_EndGame ("CL_ParseStartSoundPacket: ent = %i", ent);
+ Host_EndGame ("CL_ParseStartSoundPacket: ent = %d", ent);
startsfx (ent, channel, cl.sound_precache[sound_num], pos, volume/255.0, attenuation);
}
@@ -1017,7 +1017,7 @@
{
int j;
if (stat < 0 || stat >= MAX_CL_STATS)
- Sys_Error ("CL_SetStat: %i is invalid", stat);
+ Sys_Error ("CL_SetStat: %d is invalid", stat);
Sbar_Changed ();
@@ -1066,7 +1066,7 @@
}
-#define SHOWNET(x) if(cl_shownet.value==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x);
+#define SHOWNET(x) if(cl_shownet.value==2)Con_Printf ("%3d:%s\n", msg_readcount-1, x);
/*
=====================
CL_ParseServerMessage
@@ -1087,7 +1087,7 @@
// if recording demos, copy the message out
//
if (cl_shownet.value == 1)
- Con_Printf ("%i ",net_message.cursize);
+ Con_Printf ("%d ",net_message.cursize);
else if (cl_shownet.value == 2)
Con_Printf ("------------------\n");
--- a/qw/common.c
+++ b/qw/common.c
@@ -683,7 +683,7 @@
Sys_Error ("SZ_GetSpace: overflow without allowoverflow set (%d)", buf->maxsize);
if (length > buf->maxsize)
- Sys_Error ("SZ_GetSpace: %i is > full buffer size", length);
+ Sys_Error ("SZ_GetSpace: %d is > full buffer size", length);
Sys_Printf ("SZ_GetSpace: overflow\n"); // because Con_Printf may be redirected
SZ_Clear (buf);
@@ -1190,7 +1190,7 @@
if (s == com_base_searchpaths)
Con_Printf ("----------\n");
if (s->pack)
- Con_Printf ("%s (%i files)\n", s->pack->filename, s->pack->numfiles);
+ Con_Printf ("%s (%d files)\n", s->pack->filename, s->pack->numfiles);
else
Con_Printf ("%s\n", s->filename);
}
@@ -1476,7 +1476,7 @@
numpackfiles = header.dirlen / sizeof(dpackfile_t);
if (numpackfiles > MAX_FILES_IN_PACK)
- Sys_Error ("%s has %i files", packfile, numpackfiles);
+ Sys_Error ("%s has %d files", packfile, numpackfiles);
if (numpackfiles != PAK0_COUNT)
com_modified = true; // not the original file
@@ -1509,7 +1509,7 @@
pack->numfiles = numpackfiles;
pack->files = newfiles;
- Con_Printf ("Added packfile %s (%i files)\n", packfile, numpackfiles);
+ Con_Printf ("Added packfile %s (%d files)\n", packfile, numpackfiles);
return pack;
}
@@ -1549,7 +1549,7 @@
//
for (i=0 ; ; i++)
{
- sprintf (pakfile, "%s/pak%i.pak", dir, i);
+ sprintf (pakfile, "%s/pak%d.pak", dir, i);
pak = COM_LoadPackFile (pakfile);
if (!pak)
break;
@@ -1625,7 +1625,7 @@
//
for (i=0 ; ; i++)
{
- sprintf (pakfile, "%s/pak%i.pak", com_gamedir, i);
+ sprintf (pakfile, "%s/pak%d.pak", com_gamedir, i);
pak = COM_LoadPackFile (pakfile);
if (!pak)
break;
--- a/qw/d_surf.c
+++ b/qw/d_surf.c
@@ -65,7 +65,7 @@
void D_InitCaches (void *buffer, int size)
{
// if (!msg_suppress_1)
-// Con_Printf ("%ik surface cache\n", size/1024);
+// Con_Printf ("%dk surface cache\n", size/1024);
sc_size = size - GUARDSIZE;
sc_base = (surfcache_t *)buffer;
@@ -123,7 +123,7 @@
size = (size + 3) & ~3;
if (size > sc_size)
- Sys_Error ("D_SCAlloc: %i > cache size",size);
+ Sys_Error ("D_SCAlloc: %d > cache size",size);
// if there is not size bytes after the rover, reset to the start
wrapped_this_time = false;
@@ -204,7 +204,7 @@
{
if (test == sc_rover)
Sys_Printf ("ROVER:\n");
- printf ("%p : %i bytes %i width\n",test, test->size, test->width);
+ printf ("%p : %d bytes %d width\n",test, test->size, test->width);
}
}
--- a/qw/keys.c
+++ b/qw/keys.c
@@ -622,7 +622,7 @@
char *kb;
char cmd[1024];
-// Con_Printf ("%i : %i\n", key, down); //@@@
+// Con_Printf ("%d : %d\n", key, down); //@@@
keydown[key] = down;
@@ -691,7 +691,7 @@
kb = keybindings[key];
if (kb && kb[0] == '+')
{
- sprintf (cmd, "-%s %i\n", kb+1, key);
+ sprintf (cmd, "-%s %d\n", kb+1, key);
Cbuf_AddText (cmd);
}
if (keyshift[key] != key)
@@ -699,7 +699,7 @@
kb = keybindings[keyshift[key]];
if (kb && kb[0] == '+')
{
- sprintf (cmd, "-%s %i\n", kb+1, key);
+ sprintf (cmd, "-%s %d\n", kb+1, key);
Cbuf_AddText (cmd);
}
}
@@ -727,7 +727,7 @@
{
if (kb[0] == '+')
{ // button commands add keynum as a parm
- sprintf (cmd, "%s %i\n", kb, key);
+ sprintf (cmd, "%s %d\n", kb, key);
Cbuf_AddText (cmd);
}
else
--- a/qw/menu.c
+++ b/qw/menu.c
@@ -283,7 +283,7 @@
f = (int)(realtime * 10)%6;
- M_DrawTransPic (54, 32 + m_main_cursor * 20,Draw_CachePic( va("gfx/menudot%i.lmp", f+1 ) ) );
+ M_DrawTransPic (54, 32 + m_main_cursor * 20,Draw_CachePic( va("gfx/menudot%d.lmp", f+1 ) ) );
}
@@ -796,7 +796,7 @@
void M_Help_Draw (void)
{
- M_DrawPic (0, 0, Draw_CachePic ( va("gfx/help%i.lmp", help_page)) );
+ M_DrawPic (0, 0, Draw_CachePic ( va("gfx/help%d.lmp", help_page)) );
}
--- a/qw/model.c
+++ b/qw/model.c
@@ -435,7 +435,7 @@
{
tx2 = anims[j];
if (!tx2)
- Sys_Error ("Missing frame %i of %s",j, tx->name);
+ Sys_Error ("Missing frame %d of %s",j, tx->name);
tx2->anim_total = max * ANIM_CYCLE;
tx2->anim_min = j * ANIM_CYCLE;
tx2->anim_max = (j+1) * ANIM_CYCLE;
@@ -447,7 +447,7 @@
{
tx2 = altanims[j];
if (!tx2)
- Sys_Error ("Missing frame %i of %s",j, tx->name);
+ Sys_Error ("Missing frame %d of %s",j, tx->name);
tx2->anim_total = altmax * ANIM_CYCLE;
tx2->anim_min = j * ANIM_CYCLE;
tx2->anim_max = (j+1) * ANIM_CYCLE;
@@ -1114,7 +1114,7 @@
i = LittleLong (header->version);
if (i != BSPVERSION)
- Sys_Error ("Mod_LoadBrushModel: %s has wrong version number (%i should be %i)", mod->name, i, BSPVERSION);
+ Sys_Error ("Mod_LoadBrushModel: %s has wrong version number (%d should be %d)", mod->name, i, BSPVERSION);
// swap all the lumps
mod_base = (byte *)header;
@@ -1187,7 +1187,7 @@
{ // duplicate the basic information
char name[10];
- sprintf (name, "*%i", i+1);
+ sprintf (name, "*%d", i+1);
loadmodel = Mod_FindName (name);
*loadmodel = *mod;
strcpy (loadmodel->name, name);
@@ -1443,7 +1443,7 @@
version = LittleLong (pinmodel->version);
if (version != ALIAS_VERSION)
- Sys_Error ("%s has wrong version number (%i should be %i)",
+ Sys_Error ("%s has wrong version number (%d should be %d)",
mod->name, version, ALIAS_VERSION);
//
@@ -1753,7 +1753,7 @@
version = LittleLong (pin->version);
if (version != SPRITE_VERSION)
Sys_Error ("%s has wrong version number "
- "(%i should be %i)", mod->name, version, SPRITE_VERSION);
+ "(%d should be %d)", mod->name, version, SPRITE_VERSION);
numframes = LittleLong (pin->numframes);
--- a/qw/net_chan.c
+++ b/qw/net_chan.c
@@ -269,7 +269,7 @@
chan->cleartime = realtime;
if (showpackets.value)
- Con_Printf ("--> s=%i(%i) a=%i(%i) %i\n"
+ Con_Printf ("--> s=%d(%d) a=%d(%d) %d\n"
, chan->outgoing_sequence
, send_reliable
, chan->incoming_sequence
@@ -313,7 +313,7 @@
sequence_ack &= ~(1<<31);
if (showpackets.value)
- Con_Printf ("<-- s=%i(%i) a=%i(%i) %i\n"
+ Con_Printf ("<-- s=%d(%d) a=%d(%d) %d\n"
, sequence
, reliable_message
, sequence_ack
@@ -326,7 +326,7 @@
if (sequence <= (unsigned)chan->incoming_sequence)
{
if (showdrop.value)
- Con_Printf ("%s:Out of order packet %i at %i\n"
+ Con_Printf ("%s:Out of order packet %d at %d\n"
, chan->remote_address.addr
, sequence
, chan->incoming_sequence);
@@ -342,7 +342,7 @@
chan->drop_count += 1;
if (showdrop.value)
- Con_Printf ("%s:Dropped %i packets at %i\n"
+ Con_Printf ("%s:Dropped %d packets at %d\n"
, chan->remote_address.addr
, sequence-(chan->incoming_sequence+1)
, sequence);
--- a/qw/pmove.c
+++ b/qw/pmove.c
@@ -179,7 +179,7 @@
{ // go along the crease
if (numplanes != 2)
{
-// Con_Printf ("clip velocity, numplanes == %i\n",numplanes);
+// Con_Printf ("clip velocity, numplanes == %d\n",numplanes);
VectorCopy (vec3_origin, pmove.velocity);
break;
}
--- a/qw/pr_edict.c
+++ b/qw/pr_edict.c
@@ -269,7 +269,7 @@
sprintf (line, "%s", PR_GetString(val->string));
break;
case ev_entity:
- sprintf (line, "entity %i", NUM_FOR_EDICT(PROG_TO_EDICT(val->edict)) );
+ sprintf (line, "entity %d", NUM_FOR_EDICT(PROG_TO_EDICT(val->edict)) );
break;
case ev_function:
f = pr_functions + val->function;
@@ -292,7 +292,7 @@
sprintf (line, "pointer");
break;
default:
- sprintf (line, "bad type %i", type);
+ sprintf (line, "bad type %d", type);
break;
}
@@ -321,7 +321,7 @@
sprintf (line, "%s", PR_GetString(val->string));
break;
case ev_entity:
- sprintf (line, "%i", NUM_FOR_EDICT(PROG_TO_EDICT(val->edict)));
+ sprintf (line, "%d", NUM_FOR_EDICT(PROG_TO_EDICT(val->edict)));
break;
case ev_function:
f = pr_functions + val->function;
@@ -341,7 +341,7 @@
sprintf (line, "%f %f %f", val->vector[0], val->vector[1], val->vector[2]);
break;
default:
- sprintf (line, "bad type %i", type);
+ sprintf (line, "bad type %d", type);
break;
}
@@ -367,11 +367,11 @@
val = (void *)&pr_globals[ofs];
def = ED_GlobalAtOfs(ofs);
if (!def)
- sprintf (line,"%i(???)", ofs);
+ sprintf (line,"%d(???)", ofs);
else
{
s = PR_ValueString (def->type, val);
- sprintf (line,"%i(%s)%s", ofs, PR_GetString(def->s_name), s);
+ sprintf (line,"%d(%s)%s", ofs, PR_GetString(def->s_name), s);
}
i = strlen(line);
@@ -390,9 +390,9 @@
def = ED_GlobalAtOfs(ofs);
if (!def)
- sprintf (line,"%i(???)", ofs);
+ sprintf (line,"%d(???)", ofs);
else
- sprintf (line,"%i(%s)", ofs, PR_GetString(def->s_name));
+ sprintf (line,"%d(%s)", ofs, PR_GetString(def->s_name));
i = strlen(line);
for ( ; i<20 ; i++)
@@ -515,10 +515,10 @@
{
int i;
- Con_Printf ("%i entities\n", sv.num_edicts);
+ Con_Printf ("%d entities\n", sv.num_edicts);
for (i=0 ; i<sv.num_edicts ; i++)
{
- Con_Printf ("\nEDICT %i:\n",i);
+ Con_Printf ("\nEDICT %d:\n",i);
ED_PrintNum (i);
}
}
@@ -535,7 +535,7 @@
int i;
i = Q_atoi (Cmd_Argv(1));
- Con_Printf ("\n EDICT %i:\n",i);
+ Con_Printf ("\n EDICT %d:\n",i);
ED_PrintNum (i);
}
@@ -567,11 +567,11 @@
step++;
}
- Con_Printf ("num_edicts:%3i\n", sv.num_edicts);
- Con_Printf ("active :%3i\n", active);
- Con_Printf ("view :%3i\n", models);
- Con_Printf ("touch :%3i\n", solid);
- Con_Printf ("step :%3i\n", step);
+ Con_Printf ("num_edicts:%3d\n", sv.num_edicts);
+ Con_Printf ("active :%3d\n", active);
+ Con_Printf ("view :%3d\n", models);
+ Con_Printf ("touch :%3d\n", solid);
+ Con_Printf ("step :%3d\n", step);
}
@@ -930,7 +930,7 @@
SV_FlushSignon();
}
- Con_DPrintf ("%i entities inhibited\n", inhibit);
+ Con_DPrintf ("%d entities inhibited\n", inhibit);
}
@@ -954,10 +954,10 @@
progs = (dprograms_t *)COM_LoadHunkFile ("progs.dat");
if (!progs)
SV_Error ("PR_LoadProgs: couldn't load progs.dat");
- Con_DPrintf ("Programs occupy %iK.\n", com_filesize/1024);
+ Con_DPrintf ("Programs occupy %dK.\n", com_filesize/1024);
// add prog crc to the serverinfo
- sprintf (num, "%i", CRC_Block ((byte *)progs, com_filesize));
+ sprintf (num, "%d", CRC_Block ((byte *)progs, com_filesize));
Info_SetValueForStarKey (svs.info, "*progs", num, MAX_SERVERINFO_STRING);
// byte swap the header
@@ -965,7 +965,7 @@
((int *)progs)[i] = LittleLong ( ((int *)progs)[i] );
if (progs->version != PROG_VERSION)
- SV_Error ("progs.dat has wrong version number (%i should be %i)", progs->version, PROG_VERSION);
+ SV_Error ("progs.dat has wrong version number (%d should be %d)", progs->version, PROG_VERSION);
if (progs->crc != PROGHEADER_CRC)
SV_Error ("You must have the progs.dat from QuakeWorld installed");
@@ -1050,7 +1050,7 @@
edict_t *EDICT_NUM(int n)
{
if (n < 0 || n >= MAX_EDICTS)
- SV_Error ("EDICT_NUM: bad number %i", n);
+ SV_Error ("EDICT_NUM: bad number %d", n);
return (edict_t *)((byte *)sv.edicts+ (n)*pr_edict_size);
}
--- a/qw/pr_exec.c
+++ b/qw/pr_exec.c
@@ -138,10 +138,10 @@
}
if (s->op == OP_IF || s->op == OP_IFNOT)
- Con_Printf ("%sbranch %i",PR_GlobalString(s->a),s->b);
+ Con_Printf ("%sbranch %d",PR_GlobalString(s->a),s->b);
else if (s->op == OP_GOTO)
{
- Con_Printf ("branch %i",s->a);
+ Con_Printf ("branch %d",s->a);
}
else if ( (unsigned)(s->op - OP_STORE_F) < 6)
{
@@ -224,7 +224,7 @@
if (best)
{
if (num < 10)
- Con_Printf ("%7i %s\n", best->profile, PR_GetString(best->s_name));
+ Con_Printf ("%7d %s\n", best->profile, PR_GetString(best->s_name));
num++;
best->profile = 0;
}
@@ -638,7 +638,7 @@
break;
default:
- PR_RunError ("Bad opcode %i", st->op);
+ PR_RunError ("Bad opcode %d", st->op);
}
}
--- a/qw/r_misc.c
+++ b/qw/r_misc.c
@@ -212,7 +212,7 @@
i = (cls.netchan.outgoing_sequence-a) & NET_TIMINGSMASK;
R_LineGraph (x+w-1-a, y, packet_latency[i]);
}
- sprintf(st, "%3i%% packet loss", lost);
+ sprintf(st, "%3d%% packet loss", lost);
Draw_String(8, y2, st);
}
@@ -255,7 +255,7 @@
ms = 1000* (r_time2 - r_time1);
- Con_Printf ("%5.1f ms %3i/%3i/%3i poly %3i surf\n",
+ Con_Printf ("%5.1f ms %3d/%3d/%3d poly %3d surf\n",
ms, c_faceclip, r_polycount, r_drawnpolycount, c_surf);
c_surf = 0;
}
@@ -280,7 +280,7 @@
dv_time = (dv_time2 - dv_time1) * 1000;
ms = (r_time2 - r_time1) * 1000;
- Con_Printf ("%3i %4.1fp %3iw %4.1fb %3is %4.1fe %4.1fv\n",
+ Con_Printf ("%3d %4.1fp %3dw %4.1fb %3ds %4.1fe %4.1fv\n",
(int)ms, dp_time, (int)rw_time, db_time, (int)se_time, de_time,
dv_time);
}
@@ -293,7 +293,7 @@
*/
void R_PrintAliasStats (void)
{
- Con_Printf ("%3i polygon model drawn\n", r_amodels_drawn);
+ Con_Printf ("%3d polygon model drawn\n", r_amodels_drawn);
}
--- a/qw/r_part.c
+++ b/qw/r_part.c
@@ -110,7 +110,7 @@
}
fclose (f);
- Con_Printf ("%i points read\n", c);
+ Con_Printf ("%d points read\n", c);
}
/*
--- a/qw/sbar.c
+++ b/qw/sbar.c
@@ -117,8 +117,8 @@
for (i=0 ; i<10 ; i++)
{
- sb_nums[0][i] = Draw_PicFromWad (va("num_%i",i));
- sb_nums[1][i] = Draw_PicFromWad (va("anum_%i",i));
+ sb_nums[0][i] = Draw_PicFromWad (va("num_%d",i));
+ sb_nums[1][i] = Draw_PicFromWad (va("anum_%d",i));
}
sb_nums[0][10] = Draw_PicFromWad ("num_minus");
@@ -145,13 +145,13 @@
for (i=0 ; i<5 ; i++)
{
- sb_weapons[2+i][0] = Draw_PicFromWad (va("inva%i_shotgun",i+1));
- sb_weapons[2+i][1] = Draw_PicFromWad (va("inva%i_sshotgun",i+1));
- sb_weapons[2+i][2] = Draw_PicFromWad (va("inva%i_nailgun",i+1));
- sb_weapons[2+i][3] = Draw_PicFromWad (va("inva%i_snailgun",i+1));
- sb_weapons[2+i][4] = Draw_PicFromWad (va("inva%i_rlaunch",i+1));
- sb_weapons[2+i][5] = Draw_PicFromWad (va("inva%i_srlaunch",i+1));
- sb_weapons[2+i][6] = Draw_PicFromWad (va("inva%i_lightng",i+1));
+ sb_weapons[2+i][0] = Draw_PicFromWad (va("inva%d_shotgun",i+1));
+ sb_weapons[2+i][1] = Draw_PicFromWad (va("inva%d_sshotgun",i+1));
+ sb_weapons[2+i][2] = Draw_PicFromWad (va("inva%d_nailgun",i+1));
+ sb_weapons[2+i][3] = Draw_PicFromWad (va("inva%d_snailgun",i+1));
+ sb_weapons[2+i][4] = Draw_PicFromWad (va("inva%d_rlaunch",i+1));
+ sb_weapons[2+i][5] = Draw_PicFromWad (va("inva%d_srlaunch",i+1));
+ sb_weapons[2+i][6] = Draw_PicFromWad (va("inva%d_lightng",i+1));
}
sb_ammo[0] = Draw_PicFromWad ("sb_shells");
@@ -469,7 +469,7 @@
seconds = cl.time - 60*minutes;
tens = seconds / 10;
units = seconds - 10*tens;
- sprintf (str,"Time :%3i:%i%i", minutes, tens, units);
+ sprintf (str,"Time :%3d:%d%d", minutes, tens, units);
Sbar_DrawString (184, 4, str);
}
@@ -529,7 +529,7 @@
// ammo counts
for (i=0 ; i<4 ; i++)
{
- sprintf (num, "%3i",cl.stats[STAT_SHELLS+i] );
+ sprintf (num, "%3d",cl.stats[STAT_SHELLS+i] );
if (headsup) {
// Sbar_DrawSubPic(3, -24, sb_ibar, 3, 0, 42,11);
Sbar_DrawSubPic((hudswap) ? 0 : (vid.width-42), -24 - (4-i)*11, sb_ibar, 3+(i*48), 0, 42, 11);
@@ -630,7 +630,7 @@
// draw number
f = s->frags;
- sprintf (num, "%3i",f);
+ sprintf (num, "%3d",f);
Sbar_DrawCharacter ( (x+1)*8 , -24, num[0]);
Sbar_DrawCharacter ( (x+2)*8 , -24, num[1]);
@@ -916,7 +916,7 @@
if (pavg < 0 || pavg > 999)
pavg = 999;
- sprintf (num, "%3i/%3i/%3i", plow, pavg, phigh);
+ sprintf (num, "%3d/%3d/%3d", plow, pavg, phigh);
Draw_String ( x, y, num);
// draw team
@@ -925,11 +925,11 @@
Draw_String (x + 104, y, team);
// draw total
- sprintf (num, "%5i", tm->frags);
+ sprintf (num, "%5d", tm->frags);
Draw_String (x + 104 + 40, y, num);
// draw players
- sprintf (num, "%5i", tm->players);
+ sprintf (num, "%5d", tm->players);
Draw_String (x + 104 + 88, y, num);
if (!strncmp(Info_ValueForKey(cl.players[cl.playernum].userinfo,
@@ -1029,12 +1029,12 @@
p = s->ping;
if (p < 0 || p > 999)
p = 999;
- sprintf (num, "%4i", p);
+ sprintf (num, "%4d", p);
Draw_String ( x, y, num);
// draw pl
p = s->pl;
- sprintf (num, "%3i", p);
+ sprintf (num, "%3d", p);
if (p > 25)
Draw_Alt_String ( x+32, y, num);
else
@@ -1059,7 +1059,7 @@
else
total = realtime - s->entertime;
minutes = (int)total/60;
- sprintf (num, "%4i", minutes);
+ sprintf (num, "%4d", minutes);
Draw_String ( x+64 , y, num);
// draw background
@@ -1076,7 +1076,7 @@
// draw number
f = s->frags;
- sprintf (num, "%3i",f);
+ sprintf (num, "%3d",f);
Draw_Character ( x+112 , y, num[0]);
Draw_Character ( x+120 , y, num[1]);
@@ -1188,7 +1188,7 @@
// draw number
f = s->frags;
- sprintf (num, "%3i",f);
+ sprintf (num, "%3d",f);
Draw_Character ( x+8 , y, num[0]);
Draw_Character ( x+16, y, num[1]);
@@ -1241,7 +1241,7 @@
Draw_String (x, y, team);
// draw total
- sprintf (num, "%5i", tm->frags);
+ sprintf (num, "%5d", tm->frags);
Draw_String (x + 40, y, num);
if (!strncmp(Info_ValueForKey(cl.players[cl.playernum].userinfo,
--- a/qw/skin.c
+++ b/qw/skin.c
@@ -237,7 +237,7 @@
{ // get next signon phase
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
MSG_WriteString (&cls.netchan.message,
- va("begin %i", cl.servercount));
+ va("begin %d", cl.servercount));
Cache_Report (); // print remaining memory
}
}
--- a/qw/sv_ccmds.c
+++ b/qw/sv_ccmds.c
@@ -113,7 +113,7 @@
// find an unused name
for (i=0 ; i<1000 ; i++)
{
- sprintf (name, "%s/frag_%i.log", com_gamedir, i);
+ sprintf (name, "%s/frag_%d.log", com_gamedir, i);
sv_fraglogfile = fopen (name, "r");
if (!sv_fraglogfile)
{ // can't read it, so create this one
@@ -161,7 +161,7 @@
return true;
}
}
- Con_Printf ("Userid %i is not on the server\n", idnum);
+ Con_Printf ("Userid %d is not on the server\n", idnum);
return false;
}
@@ -349,7 +349,7 @@
}
}
- Con_Printf ("Couldn't find user number %i\n", uid);
+ Con_Printf ("Couldn't find user number %d\n", uid);
}
@@ -372,8 +372,8 @@
avg = 1000*svs.stats.latched_active / STATFRAMES;
pak = (float)svs.stats.latched_packets/ STATFRAMES;
- Con_Printf ("cpu utilization : %3i%%\n",(int)cpu);
- Con_Printf ("avg response time: %i ms\n",(int)avg);
+ Con_Printf ("cpu utilization : %3d%%\n",(int)cpu);
+ Con_Printf ("avg response time: %d ms\n",(int)avg);
Con_Printf ("packets/frame : %5.2f (%d)\n", pak, num_prstr);
// min fps lat drp
@@ -390,7 +390,7 @@
Con_Printf ("%-16.16s ", cl->name);
- Con_Printf ("%6i %5i", cl->userid, (int)cl->edict->v.frags);
+ Con_Printf ("%6d %5d", cl->userid, (int)cl->edict->v.frags);
if (cl->spectator)
Con_Printf(" (s)\n");
else
@@ -408,7 +408,7 @@
Con_Printf ("ZOMBIE\n");
continue;
}
- Con_Printf ("%4i %4i %5.2f\n"
+ Con_Printf ("%4d %4d %5.2f\n"
, (int)(1000*cl->netchan.frame_rate)
, (int)SV_CalcPing (cl)
, 100.0*cl->netchan.drop_count / cl->netchan.incoming_sequence);
@@ -420,7 +420,7 @@
{
if (!cl->state)
continue;
- Con_Printf ("%5i %6i ", (int)cl->edict->v.frags, cl->userid);
+ Con_Printf ("%5d %6d ", (int)cl->edict->v.frags, cl->userid);
s = cl->netchan.remote_address.addr;
Con_Printf ("%s", s);
@@ -442,7 +442,7 @@
Con_Printf ("ZOMBIE\n");
continue;
}
- Con_Printf ("%4i %4i %3.1f %4i"
+ Con_Printf ("%4d %4d %3.1f %4d"
, (int)(1000*cl->netchan.frame_rate)
, (int)SV_CalcPing (cl)
, 100.0*cl->netchan.drop_count / cl->netchan.incoming_sequence
--- a/qw/sv_ents.c
+++ b/qw/sv_ents.c
@@ -259,7 +259,7 @@
newindex = 0;
oldindex = 0;
-//Con_Printf ("---%i to %i ----\n", client->delta_sequence & UPDATE_MASK
+//Con_Printf ("---%d to %d ----\n", client->delta_sequence & UPDATE_MASK
// , client->netchan.outgoing_sequence & UPDATE_MASK);
while (newindex < to->num_entities || oldindex < oldmax)
{
@@ -268,7 +268,7 @@
if (newnum == oldnum)
{ // delta update from old position
-//Con_Printf ("delta %i\n", newnum);
+//Con_Printf ("delta %d\n", newnum);
SV_WriteDelta (&from->entities[oldindex], &to->entities[newindex], msg, false);
oldindex++;
newindex++;
@@ -278,7 +278,7 @@
if (newnum < oldnum)
{ // this is a new entity, send it from the baseline
ent = EDICT_NUM(newnum);
-//Con_Printf ("baseline %i\n", newnum);
+//Con_Printf ("baseline %d\n", newnum);
SV_WriteDelta (&ent->baseline, &to->entities[newindex], msg, true);
newindex++;
continue;
@@ -286,7 +286,7 @@
if (newnum > oldnum)
{ // the old entity isn't present in the new message
-//Con_Printf ("remove %i\n", oldnum);
+//Con_Printf ("remove %d\n", oldnum);
MSG_WriteShort (msg, oldnum | U_REMOVE);
oldindex++;
continue;
--- a/qw/sv_init.c
+++ b/qw/sv_init.c
@@ -232,7 +232,7 @@
count++;
}
- Con_Printf ("Average leafs visible / hearable / total: %i / %i / %i\n"
+ Con_Printf ("Average leafs visible / hearable / total: %d / %d / %d\n"
, vcount/num, count/num, num);
}
--- a/qw/sv_main.c
+++ b/qw/sv_main.c
@@ -339,7 +339,7 @@
top = (top < 0) ? 0 : ((top > 13) ? 13 : top);
bottom = (bottom < 0) ? 0 : ((bottom > 13) ? 13 : bottom);
ping = SV_CalcPing (cl);
- Con_Printf ("%i %i %i %i \"%s\" \"%s\" %i %i\n", cl->userid,
+ Con_Printf ("%d %d %d %d \"%s\" \"%s\" %d %d\n", cl->userid,
cl->old_frags, (int)(realtime - cl->connection_started)/60,
ping, cl->name, Info_ValueForKey (cl->userinfo, "skin"), top, bottom);
}
@@ -371,7 +371,7 @@
svs.logsequence++;
sz = &svs.log[svs.logsequence&1];
sz->cursize = 0;
- Con_Printf ("beginning fraglog sequence %i\n", svs.logsequence);
+ Con_Printf ("beginning fraglog sequence %d\n", svs.logsequence);
}
}
@@ -403,9 +403,9 @@
return;
}
- Con_DPrintf ("sending log %i to %s\n", svs.logsequence-1, net_from->sys);
+ Con_DPrintf ("sending log %d to %s\n", svs.logsequence-1, net_from->sys);
- sprintf (data, "stdlog %i\n", svs.logsequence-1);
+ sprintf (data, "stdlog %d\n", svs.logsequence-1);
strcat (data, (char *)svs.log_buf[((svs.logsequence-1)&1)]);
NET_SendPacket (strlen(data)+1, data, net_from);
@@ -469,7 +469,7 @@
}
// send it back
- Netchan_OutOfBandPrint (net_from, "%c%i", S2C_CHALLENGE,
+ Netchan_OutOfBandPrint (net_from, "%c%d", S2C_CHALLENGE,
svs.challenges[i].challenge);
}
@@ -501,7 +501,7 @@
if (version != PROTOCOL_VERSION)
{
Netchan_OutOfBandPrint (net_from, "%c\nServer is version %4.2f.\n", A2C_PRINT, VERSION);
- Con_Printf ("* rejected connect from version %i\n", version);
+ Con_Printf ("* rejected connect from version %d\n", version);
return;
}
@@ -1119,7 +1119,7 @@
if (!v)
Info_SetValueForKey (svs.info, "needpass", "", MAX_SERVERINFO_STRING);
else
- Info_SetValueForKey (svs.info, "needpass", va("%i",v), MAX_SERVERINFO_STRING);
+ Info_SetValueForKey (svs.info, "needpass", va("%d",v), MAX_SERVERINFO_STRING);
}
/*
@@ -1264,7 +1264,7 @@
Cmd_AddCommand ("writeip", SV_WriteIP_f);
for (i=0 ; i<MAX_MODELS ; i++)
- sprintf (localmodels[i], "*%i", i);
+ sprintf (localmodels[i], "*%d", i);
Info_SetValueForStarKey (svs.info, "*version", va("%4.2f", VERSION), MAX_SERVERINFO_STRING);
@@ -1314,7 +1314,7 @@
active++;
svs.heartbeat_sequence++;
- sprintf (string, "%c\n%i\n%i\n", S2M_HEARTBEAT,
+ sprintf (string, "%c\n%d\n%d\n", S2M_HEARTBEAT,
svs.heartbeat_sequence, active);
@@ -1487,7 +1487,7 @@
if (p && p < com_argc)
{
port = atoi(com_argv[p+1]);
- Con_Printf ("Port: %i\n", port);
+ Con_Printf ("Port: %d\n", port);
}
NET_Init (port);
--- a/qw/sv_phys.c
+++ b/qw/sv_phys.c
@@ -321,7 +321,7 @@
{ // go along the crease
if (numplanes != 2)
{
-// Con_Printf ("clip velocity, numplanes == %i\n",numplanes);
+// Con_Printf ("clip velocity, numplanes == %d\n",numplanes);
VectorCopy (vec3_origin, ent->v.velocity);
return 7;
}
@@ -838,7 +838,7 @@
SV_Physics_Toss (ent);
break;
default:
- SV_Error ("SV_Physics: bad movetype %i", (int)ent->v.movetype);
+ SV_Error ("SV_Physics: bad movetype %d", (int)ent->v.movetype);
}
}
--- a/qw/sv_send.c
+++ b/qw/sv_send.c
@@ -275,7 +275,7 @@
default:
mask = NULL;
- SV_Error ("SV_Multicast: bad to:%i", to);
+ SV_Error ("SV_Multicast: bad to:%d", to);
}
// send the data to all relevent clients
@@ -341,13 +341,13 @@
qboolean reliable = false;
if (volume < 0 || volume > 255)
- SV_Error ("SV_StartSound: volume = %i", volume);
+ SV_Error ("SV_StartSound: volume = %d", volume);
if (attenuation < 0 || attenuation > 4)
SV_Error ("SV_StartSound: attenuation = %f", attenuation);
if (channel < 0 || channel > 15)
- SV_Error ("SV_StartSound: channel = %i", channel);
+ SV_Error ("SV_StartSound: channel = %d", channel);
// find precache number for sound
for (sound_num=1 ; sound_num<MAX_SOUNDS
--- a/qw/sv_user.c
+++ b/qw/sv_user.c
@@ -236,7 +236,7 @@
if (sv_mapcheck.value && check != sv.worldmodel->checksum &&
check != sv.worldmodel->checksum2) {
SV_ClientPrintf (host_client, PRINT_HIGH,
- "Map model file does not match (%s), %i != %i/%i.\n"
+ "Map model file does not match (%s), %d != %d/%d.\n"
"You may need a new version of the map, or the proper install files.\n",
sv.modelname, check, sv.worldmodel->checksum, sv.worldmodel->checksum2);
SV_DropClient (host_client);
@@ -261,13 +261,13 @@
if (buf == sv.num_signon_buffers)
{ // all done prespawning
MSG_WriteByte (&host_client->netchan.message, svc_stufftext);
- MSG_WriteString (&host_client->netchan.message, va("cmd spawn %i 0\n",svs.spawncount) );
+ MSG_WriteString (&host_client->netchan.message, va("cmd spawn %d 0\n",svs.spawncount) );
}
else
{ // need to prespawn more
MSG_WriteByte (&host_client->netchan.message, svc_stufftext);
MSG_WriteString (&host_client->netchan.message,
- va("cmd prespawn %i %i\n", svs.spawncount, buf) );
+ va("cmd prespawn %d %d\n", svs.spawncount, buf) );
}
}
@@ -986,7 +986,7 @@
if (Cmd_Argc() != 2)
{
- SV_ClientPrintf (host_client, PRINT_HIGH, "Current rate is %i\n",
+ SV_ClientPrintf (host_client, PRINT_HIGH, "Current rate is %d\n",
(int)(1.0/host_client->netchan.rate + 0.5));
return;
}
@@ -997,7 +997,7 @@
if (rate > 10000)
rate = 10000;
- SV_ClientPrintf (host_client, PRINT_HIGH, "Net rate set to %i\n", rate);
+ SV_ClientPrintf (host_client, PRINT_HIGH, "Net rate set to %d\n", rate);
host_client->netchan.rate = 1.0/rate;
}
@@ -1013,7 +1013,7 @@
{
if (Cmd_Argc() != 2)
{
- SV_ClientPrintf (host_client, PRINT_HIGH, "Current msg level is %i\n",
+ SV_ClientPrintf (host_client, PRINT_HIGH, "Current msg level is %d\n",
host_client->messagelevel);
return;
}
@@ -1020,7 +1020,7 @@
host_client->messagelevel = atoi(Cmd_Argv(1));
- SV_ClientPrintf (host_client, PRINT_HIGH, "Msg level set to %i\n", host_client->messagelevel);
+ SV_ClientPrintf (host_client, PRINT_HIGH, "Msg level set to %d\n", host_client->messagelevel);
}
/*
--- a/qw/svmodel.c
+++ b/qw/svmodel.c
@@ -376,7 +376,7 @@
{
tx2 = anims[j];
if (!tx2)
- SV_Error ("Missing frame %i of %s",j, tx->name);
+ SV_Error ("Missing frame %d of %s",j, tx->name);
tx2->anim_total = max * ANIM_CYCLE;
tx2->anim_min = j * ANIM_CYCLE;
tx2->anim_max = (j+1) * ANIM_CYCLE;
@@ -388,7 +388,7 @@
{
tx2 = altanims[j];
if (!tx2)
- SV_Error ("Missing frame %i of %s",j, tx->name);
+ SV_Error ("Missing frame %d of %s",j, tx->name);
tx2->anim_total = altmax * ANIM_CYCLE;
tx2->anim_min = j * ANIM_CYCLE;
tx2->anim_max = (j+1) * ANIM_CYCLE;
@@ -1036,7 +1036,7 @@
i = LittleLong (header->version);
if (i != BSPVERSION)
- SV_Error ("Mod_LoadBrushModel: %s has wrong version number (%i should be %i)", mod->name, i, BSPVERSION);
+ SV_Error ("Mod_LoadBrushModel: %s has wrong version number (%d should be %d)", mod->name, i, BSPVERSION);
// swap all the lumps
mod_base = (byte *)header;
@@ -1108,7 +1108,7 @@
{ // duplicate the basic information
char name[10];
- sprintf (name, "*%i", i+1);
+ sprintf (name, "*%d", i+1);
loadmodel = Mod_FindName (name);
*loadmodel = *mod;
strcpy (loadmodel->name, name);
--- a/qw/wad.c
+++ b/qw/wad.c
@@ -118,7 +118,7 @@
lumpinfo_t *lump;
if (num < 0 || num > wad_numlumps)
- Sys_Error ("W_GetLumpNum: bad number: %i", num);
+ Sys_Error ("W_GetLumpNum: bad number: %d", num);
lump = wad_lumps + num;
--- a/qw/zone.c
+++ b/qw/zone.c
@@ -196,11 +196,11 @@
{
memblock_t *block;
- Con_Printf ("zone size: %i location: %p\n",mainzone->size,mainzone);
+ Con_Printf ("zone size: %d location: %p\n",mainzone->size,mainzone);
for (block = zone->blocklist.next ; ; block = block->next)
{
- Con_Printf ("block:%p size:%7i tag:%3i\n",
+ Con_Printf ("block:%p size:%7d tag:%3d\n",
block, block->size, block->tag);
if (block->next == &zone->blocklist)
@@ -305,7 +305,7 @@
starthigh = (hunk_t *)(hunk_base + hunk_size - hunk_high_used);
endhigh = (hunk_t *)(hunk_base + hunk_size);
- Con_Printf (" :%8i total hunk size\n", hunk_size);
+ Con_Printf (" :%8d total hunk size\n", hunk_size);
Con_Printf ("-------------------------\n");
while (1)
@@ -316,7 +316,7 @@
if ( h == endlow )
{
Con_Printf ("-------------------------\n");
- Con_Printf (" :%8i REMAINING\n", hunk_size - hunk_low_used - hunk_high_used);
+ Con_Printf (" :%8d REMAINING\n", hunk_size - hunk_low_used - hunk_high_used);
Con_Printf ("-------------------------\n");
h = starthigh;
}
@@ -345,7 +345,7 @@
//
memcpy (name, h->name, 8);
if (all)
- Con_Printf ("%8p :%8i %8s\n",h, h->size, name);
+ Con_Printf ("%8p :%8d %8s\n",h, h->size, name);
//
// print the total
@@ -354,7 +354,7 @@
strncmp (h->name, next->name, 8) )
{
if (!all)
- Con_Printf (" :%8i %8s (TOTAL)\n",sum, name);
+ Con_Printf (" :%8d %8s (TOTAL)\n",sum, name);
count = 0;
sum = 0;
}
@@ -363,7 +363,7 @@
}
Con_Printf ("-------------------------\n");
- Con_Printf ("%8i total blocks\n", totalblocks);
+ Con_Printf ("%8d total blocks\n", totalblocks);
}
@@ -381,12 +381,12 @@
#endif
if (size < 0)
- Sys_Error ("Hunk_Alloc: bad size: %i", size);
+ Sys_Error ("Hunk_Alloc: bad size: %d", size);
size = sizeof(hunk_t) + ((size+15)&~15);
if (hunk_size - hunk_low_used - hunk_high_used < size)
- Sys_Error ("Hunk_Alloc: failed on %i bytes",size);
+ Sys_Error ("Hunk_Alloc: failed on %d bytes",size);
h = (hunk_t *)(hunk_base + hunk_low_used);
hunk_low_used += size;
@@ -420,7 +420,7 @@
void Hunk_FreeToLowMark (int mark)
{
if (mark < 0 || mark > hunk_low_used)
- Sys_Error ("Hunk_FreeToLowMark: bad mark %i", mark);
+ Sys_Error ("Hunk_FreeToLowMark: bad mark %d", mark);
memset (hunk_base + mark, 0, hunk_low_used - mark);
hunk_low_used = mark;
}
@@ -444,7 +444,7 @@
Hunk_FreeToHighMark (hunk_tempmark);
}
if (mark < 0 || mark > hunk_high_used)
- Sys_Error ("Hunk_FreeToHighMark: bad mark %i", mark);
+ Sys_Error ("Hunk_FreeToHighMark: bad mark %d", mark);
memset (hunk_base + hunk_size - hunk_high_used, 0, hunk_high_used - mark);
hunk_high_used = mark;
}
@@ -460,7 +460,7 @@
hunk_t *h;
if (size < 0)
- Sys_Error ("Hunk_HighAllocName: bad size: %i", size);
+ Sys_Error ("Hunk_HighAllocName: bad size: %d", size);
if (hunk_tempactive)
{
@@ -476,7 +476,7 @@
if (hunk_size - hunk_low_used - hunk_high_used < size)
{
- Con_Printf ("Hunk_HighAlloc: failed on %i bytes\n",size);
+ Con_Printf ("Hunk_HighAlloc: failed on %d bytes\n",size);
return NULL;
}
@@ -662,7 +662,7 @@
if (!nobottom && cache_head.prev == &cache_head)
{
if (hunk_size - hunk_high_used - hunk_low_used < size)
- Sys_Error ("Cache_TryAlloc: %i is greater then free hunk", size);
+ Sys_Error ("Cache_TryAlloc: %d is greater then free hunk", size);
new = (cache_system_t *) (hunk_base + hunk_low_used);
memset (new, 0, sizeof(*new));
@@ -751,7 +751,7 @@
for (cd = cache_head.next ; cd != &cache_head ; cd = cd->next)
{
- Con_Printf ("%8i : %s\n", cd->size, cd->name);
+ Con_Printf ("%8d : %s\n", cd->size, cd->name);
}
}
@@ -852,7 +852,7 @@
Sys_Error ("Cache_Alloc: allready allocated");
if (size <= 0)
- Sys_Error ("Cache_Alloc: size %i", size);
+ Sys_Error ("Cache_Alloc: size %d", size);
size = (size + sizeof(cache_system_t) + 15) & ~15;