strip the \n from all(?) of the Sys_Error calls (Sys_Error itself will be

adding \n).
This commit is contained in:
Bill Currie 2002-05-14 06:12:29 +00:00
parent 6240c62cec
commit 44dcf74627
95 changed files with 258 additions and 259 deletions

View file

@ -299,7 +299,7 @@ SND_FindName (const char *name)
sfx_t *sfx;
if (!name)
Sys_Error ("S_FindName: NULL\n");
Sys_Error ("S_FindName: NULL");
if (strlen (name) >= MAX_QPATH)
Sys_Error ("Sound name too long: %s", name);

View file

@ -369,7 +369,7 @@ SNDDMA_Submit (void)
case SND_PCM_STATUS_PREPARED:
if ((rc = snd_pcm_channel_go (pcm_handle,
SND_PCM_CHANNEL_PLAYBACK)) < 0) {
Sys_Error ("unable to start playback. %s\n",
Sys_Error ("unable to start playback. %s",
snd_strerror (rc));
}
break;
@ -378,7 +378,7 @@ SNDDMA_Submit (void)
case SND_PCM_STATUS_UNDERRUN:
if ((rc = snd_pcm_plugin_prepare (pcm_handle,
SND_PCM_CHANNEL_PLAYBACK)) < 0) {
Sys_Error ("underrun: playback channel prepare error. %s\n",
Sys_Error ("underrun: playback channel prepare error. %s",
snd_strerror (rc));
}
break;

View file

@ -174,7 +174,7 @@ SNDDMA_Init (void)
shm->buffer = calloc(shm->samples * (shm->samplebits / 8), 1);
if (!shm->buffer)
{
Sys_Error ("Failed to allocate buffer for sound!\n");
Sys_Error ("Failed to allocate buffer for sound!");
}
snd_inited = 1;

View file

@ -81,7 +81,7 @@ bi_cmd_f (void *pr)
bi_cmd_t *cmd = Hash_Find (bi_cmds, Cmd_Argv (0));
if (!cmd)
Sys_Error ("bi_cmd_f: unexpected call %s\n", Cmd_Argv (0));
Sys_Error ("bi_cmd_f: unexpected call %s", Cmd_Argv (0));
PR_ExecuteProgram (cmd->pr, cmd->func);
}

View file

@ -157,7 +157,7 @@ Mod_LoadSkin (byte * skin, int skinsize, int snum, int gnum, qboolean group,
// save 8 bit texels for the player model to remap
if (strequal (loadmodel->name, "progs/player.mdl")) {
if (skinsize > sizeof (player_8bit_texels))
Sys_Error ("Player skin too large\n");
Sys_Error ("Player skin too large");
memcpy (player_8bit_texels, pskin, skinsize);
}

View file

@ -82,7 +82,7 @@ Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype, int *pskinindex)
float *poutskinintervals;
if (numskins < 1 || numskins > MAX_SKINS)
Sys_Error ("Mod_LoadAliasModel: Invalid # of skins: %d\n", numskins);
Sys_Error ("Mod_LoadAliasModel: Invalid # of skins: %d", numskins);
skinsize = pheader->mdl.skinwidth * pheader->mdl.skinheight;
pskindesc = Hunk_AllocName (numskins * sizeof (maliasskindesc_t),
@ -223,7 +223,7 @@ Mod_LoadAliasModel (model_t *mod, void *buffer, cache_allocator_t allocator)
pmodel->numframes = LittleLong (pinmodel->numframes);
numframes = pmodel->numframes;
if (numframes < 1)
Sys_Error ("Mod_LoadAliasModel: Invalid # of frames: %d\n", numframes);
Sys_Error ("Mod_LoadAliasModel: Invalid # of frames: %d", numframes);
pmodel->size = LittleFloat (pinmodel->size) * ALIAS_BASE_SIZE_RATIO;
mod->synctype = LittleLong (pinmodel->synctype);

View file

@ -73,7 +73,7 @@ Mod_Fullbright (byte * skin, int width, int height, char *name)
// ptexels = Hunk_Alloc(s);
ptexels = malloc (pixels);
if (!ptexels)
Sys_Error ("Mod_Fullbright: Memory Allocation Failure\n");
Sys_Error ("Mod_Fullbright: Memory Allocation Failure");
if (Mod_CalcFullbright (skin, ptexels, pixels)) {
Sys_DPrintf ("FB Model ID: '%s'\n", name);
texnum = GL_LoadTexture (name, width, height, ptexels, true, true, 1);

View file

@ -242,7 +242,7 @@ void
Mod_CallbackLoad (void *object, cache_allocator_t allocator)
{
if (((model_t *)object)->type != mod_alias)
Sys_Error ("Mod_CallbackLoad for non-alias model? FIXME!\n");
Sys_Error ("Mod_CallbackLoad for non-alias model? FIXME!");
// FIXME: do we want crash set to true?
Mod_RealLoadModel (object, true, allocator);
}

View file

@ -166,7 +166,7 @@ Mod_LoadSpriteModel (model_t *mod, void *buffer)
// load the frames
if (numframes < 1)
Sys_Error ("Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
Sys_Error ("Mod_LoadSpriteModel: Invalid # of frames: %d", numframes);
mod->numframes = numframes;

View file

@ -659,7 +659,7 @@ Cmd_StuffCmds_f (void)
// pull out the commands
build = malloc (s + 1);
if (!build)
Sys_Error ("Cmd_StuffCmds_f: Memory Allocation Failure\n");
Sys_Error ("Cmd_StuffCmds_f: Memory Allocation Failure");
build[0] = 0;
for (i = 0; i < s - 1; i++) {
@ -1558,7 +1558,7 @@ Cmd_AddCommand (const char *cmd_name, xcommand_t function,
cmd = calloc (1, sizeof (cmd_function_t));
if (!cmd)
Sys_Error ("Cmd_AddCommand: Memory Allocation Failure\n");
Sys_Error ("Cmd_AddCommand: Memory Allocation Failure");
cmd->name = cmd_name;
cmd->function = function;
cmd->description = description;
@ -1700,7 +1700,7 @@ Cmd_CompleteBuildList (const char *partial)
buf = malloc (sizeofbuf + sizeof (char *));
if (!buf)
Sys_Error ("Cmd_CompleteBuildList: Memory Allocation Failure\n");
Sys_Error ("Cmd_CompleteBuildList: Memory Allocation Failure");
// Loop through the alias list and print all matches
for (cmd = cmd_functions; cmd; cmd = cmd->next)
if (!strncasecmp (partial, cmd->name, len))
@ -1789,7 +1789,7 @@ Cmd_CompleteAliasBuildList (const char *partial)
buf = malloc (sizeofbuf + sizeof (char *));
if (!buf)
Sys_Error ("Cmd_CompleteAliasBuildList: Memory Allocation Failure\n");
Sys_Error ("Cmd_CompleteAliasBuildList: Memory Allocation Failure");
// Loop through the alias list and print all matches
for (alias = cmd_alias; alias; alias = alias->next)
if (!strncasecmp (partial, alias->name, len))
@ -1928,7 +1928,7 @@ Cmd_Alias_f (void)
alias = calloc (1, sizeof (cmdalias_t));
if (!alias)
Sys_Error ("Cmd_Alias_f: Memory Allocation Failure\n");
Sys_Error ("Cmd_Alias_f: Memory Allocation Failure");
alias->name = strdup (s);
Hash_Add (cmd_alias_hash, alias);
for (a = &cmd_alias; *a; a = &(*a)->next)
@ -1940,7 +1940,7 @@ Cmd_Alias_f (void)
// copy the rest of the command line
cmd = malloc (strlen (Cmd_Args (1)) + 2); // can never be longer
if (!cmd)
Sys_Error ("Cmd_Alias_f: Memory Allocation Failure\n");
Sys_Error ("Cmd_Alias_f: Memory Allocation Failure");
cmd[0] = 0; // start out with a null string
c = Cmd_Argc ();
for (i = 2; i < c; i++) {

View file

@ -217,7 +217,7 @@ Cvar_CompleteBuildList (const char *partial)
len = strlen(partial);
buf = malloc(sizeofbuf + sizeof (char *));
if (!buf)
Sys_Error ("Cvar_CompleteBuildList: Memory Allocation Failure\n");
Sys_Error ("Cvar_CompleteBuildList: Memory Allocation Failure");
// Loop through the alias list and print all matches
for (cvar = cvar_vars; cvar; cvar = cvar->next)
if (!strncasecmp(partial, cvar->name, len))

View file

@ -43,7 +43,7 @@ dstring_new (void)
new = calloc (1, sizeof (dstring_t));
if (!new)
Sys_Error ("dstring_new: Failed to allocate memory.\n");
Sys_Error ("dstring_new: Failed to allocate memory.");
return new;
}
@ -61,7 +61,7 @@ dstring_adjust (dstring_t *dstr)
if (dstr->size > dstr->truesize) {
dstr->str = realloc (dstr->str, dstr->size);
if (!dstr->str)
Sys_Error ("dstring_adjust: Failed to reallocate memory.\n");
Sys_Error ("dstring_adjust: Failed to reallocate memory.");
dstr->truesize = dstr->size;
}
}
@ -130,7 +130,7 @@ dstring_newstr (void)
new = calloc (1, sizeof (dstring_t));
if (!new)
Sys_Error ("dstring_newstr: Failed to allocate memory.\n");
Sys_Error ("dstring_newstr: Failed to allocate memory.");
new->size = 1;
dstring_adjust (new);
new->str[0] = 0;

View file

@ -132,14 +132,14 @@ Info_SetValueForStarKey (info_t *info, const char *key, const char *value, int f
free ((char*)k->value);
} else {
if (!(k = malloc (sizeof (info_key_t))))
Sys_Error ("Info_SetValueForStarKey: out of memory\n");
Sys_Error ("Info_SetValueForStarKey: out of memory");
if (!(k->key = strdup (key)))
Sys_Error ("Info_SetValueForStarKey: out of memory\n");
Sys_Error ("Info_SetValueForStarKey: out of memory");
info->cursize += strlen (key) + 1;
Hash_Add (info->tab, k);
}
if (!(str = strdup (value)))
Sys_Error ("Info_SetValueForStarKey: out of memory\n");
Sys_Error ("Info_SetValueForStarKey: out of memory");
if (flags & 1) {
byte *s, *d;
for (d = s = str; *s; s++)

View file

@ -518,10 +518,10 @@ FloorDivMod (double numer, double denom, int *quotient, int *rem)
#ifndef PARANOID
if (denom <= 0.0)
Sys_Error ("FloorDivMod: bad denominator %f\n", denom);
Sys_Error ("FloorDivMod: bad denominator %f", denom);
// if ((floor(numer) != numer) || (floor(denom) != denom))
// Sys_Error ("FloorDivMod: non-integer numer or denom %f %f\n",
// Sys_Error ("FloorDivMod: non-integer numer or denom %f %f",
// numer, denom);
#endif

View file

@ -283,7 +283,7 @@ MSG_ReadString (msg_t *msg)
msg->badread_string_size = len + 1;
}
if (!msg->badread_string)
Sys_Error ("MSG_ReadString: out of memory\n");
Sys_Error ("MSG_ReadString: out of memory");
strncpy (msg->badread_string, string, len);
msg->badread_string[len] = 0;
return msg->badread_string;

View file

@ -488,7 +488,7 @@ PL_GetPropertyList (const char *string)
return newpl;
} else {
if (pl && pl->error && pl->error[0])
Sys_Error ("%d,%d: %s\n", pl->line, pl->pos, pl->error);
Sys_Error ("%d,%d: %s", pl->line, pl->pos, pl->error);
free (pl);
return NULL;
}

View file

@ -727,7 +727,7 @@ COM_LoadGameDirectory (const char *dir)
pakfiles[count] = malloc (FNAME_SIZE);
if (!pakfiles[count])
Sys_Error ("COM_LoadGameDirectory: MemoryAllocationFailure\n");
Sys_Error ("COM_LoadGameDirectory: MemoryAllocationFailure");
snprintf (pakfiles[count], FNAME_SIZE - 1, "%s/%s", dir,
dirent->d_name);
pakfiles[count][FNAME_SIZE - 1] = '\0';

View file

@ -135,12 +135,12 @@ LoadTGA (VFile *fin)
targa->height = LittleShort (targa->height);
if (targa->image_type != 2 && targa->image_type != 10)
Sys_Error ("LoadTGA: Only type 2 and 10 targa RGB images supported\n");
Sys_Error ("LoadTGA: Only type 2 and 10 targa RGB images supported");
if (targa->colormap_type != 0
|| (targa->pixel_size != 32 && targa->pixel_size != 24))
Sys_Error ("Texture_LoadTGA: Only 32 or 24 bit images supported "
"(no colormaps)\n");
"(no colormaps)");
columns = targa->width;
rows = targa->height;
@ -150,14 +150,14 @@ LoadTGA (VFile *fin)
case 24:
tex = Hunk_TempAlloc (field_offset (tex_t, data[numPixels * 3]));
if (!tex)
Sys_Error ("LoadTGA: Memory Allocation Failure\n");
Sys_Error ("LoadTGA: Memory Allocation Failure");
tex->format = tex_rgb;
break;
default:
case 32:
tex = Hunk_TempAlloc (field_offset (tex_t, data[numPixels * 4]));
if (!tex)
Sys_Error ("LoadTGA: Memory Allocation Failure\n");
Sys_Error ("LoadTGA: Memory Allocation Failure");
tex->format = tex_rgba;
break;
}

View file

@ -98,7 +98,7 @@ W_LoadWadFile (const char *filename)
fs_basegame->string);
Sys_Printf (" fs_sharepath is %s\n", fs_sharepath->string);
Sys_Printf (" fs_userpath is %s\n\n", fs_userpath->string);
Sys_Error ("W_LoadWadFile: unable to load %s\n\n", filename);
Sys_Error ("W_LoadWadFile: unable to load %s", filename);
}
header = (wadinfo_t *) wad_base;
@ -107,7 +107,7 @@ W_LoadWadFile (const char *filename)
|| header->identification[1] != 'A'
|| header->identification[2] != 'D'
|| header->identification[3] != '2')
Sys_Error ("Wad file %s doesn't have WAD2 id\n", filename);
Sys_Error ("Wad file %s doesn't have WAD2 id", filename);
wad_numlumps = LittleLong (header->numlumps);
infotableofs = LittleLong (header->infotableofs);

View file

@ -853,7 +853,7 @@ Cache_RealFree (cache_user_t *c)
#ifdef MMAPPED_CACHE
if (munmap (cs, cs->size))
Sys_Error ("Cache_Free: munmap failed!\n");
Sys_Error ("Cache_Free: munmap failed!");
#endif
}
@ -968,7 +968,7 @@ Cache_Add (cache_user_t *c, void *object, cache_loader_t loader)
CACHE_WRITE_LOCK;
if (c->data || c->object || c->loader)
Sys_Error ("Cache_Add: cache item already exists!\n");
Sys_Error ("Cache_Add: cache item already exists!");
c->object = object;
c->loader = loader;
@ -984,7 +984,7 @@ Cache_Remove (cache_user_t *c)
CACHE_WRITE_LOCK;
if (!c->object || !c->loader)
Sys_Error ("Cache_Remove: already removed!\n");
Sys_Error ("Cache_Remove: already removed!");
if (Cache_RealCheck (c))
Cache_RealFree (c);
@ -1018,7 +1018,7 @@ Cache_Get (cache_user_t *c)
{
void *mem = Cache_TryGet (c);
if (!mem)
Sys_Error ("Cache_Get: couldn't get cache!\n");
Sys_Error ("Cache_Get: couldn't get cache!");
return mem;
}
@ -1030,7 +1030,7 @@ Cache_Release (cache_user_t *c)
readlock = &(((cache_system_t *)c->data) - 1)->readlock;
if (!*readlock)
Sys_Error ("Cache_Release: already released!\n");
Sys_Error ("Cache_Release: already released!");
(*readlock)--;
@ -1057,7 +1057,7 @@ QA_alloc (unsigned flags, ...)
va_list ap;
if (flags & ~(QA_FAILURE | QA_PREVIOUS | QA_SIZE | QA_ZEROED))
Sys_Error ("QA_alloc: bad flags: %u\n", flags);
Sys_Error ("QA_alloc: bad flags: %u", flags);
va_start (ap, flags);
if (flags & QA_PREVIOUS)
@ -1071,13 +1071,13 @@ QA_alloc (unsigned flags, ...)
va_end (ap);
if (failure != QA_NOFAIL && failure != QA_LATEFAIL && failure != QA_EARLYFAIL)
Sys_Error ("QA_alloc: invalid failure type: %u\n", failure);
Sys_Error ("QA_alloc: invalid failure type: %u", failure);
if (size) {
do {
if (ptr) {
if (zeroed)
Sys_Error ("QA_alloc: Zeroing reallocated memory not yet supported\n");
Sys_Error ("QA_alloc: Zeroing reallocated memory not yet supported");
else
mem = realloc (ptr, size);
} else {
@ -1090,12 +1090,12 @@ QA_alloc (unsigned flags, ...)
&& QA_alloc_callback && QA_alloc_callback (size));
if (!mem && failure == QA_NOFAIL)
Sys_Error ("QA_alloc: could not allocate %d bytes!\n", (int)size);
Sys_Error ("QA_alloc: could not allocate %d bytes!", (int)size);
return mem;
} else {
if (!ptr)
Sys_Error ("QA_alloc: can't free a NULL pointers!\n");
Sys_Error ("QA_alloc: can't free a NULL pointers!");
free (ptr);
return 0;
}

View file

@ -78,7 +78,7 @@ particle_new (ptype_t type, int texnum, const vec3_t org, float scale,
/*
if (numparticles >= r_maxparticles) {
Sys_Error ("FAILED PARTICLE ALLOC!\n");
Sys_Error ("FAILED PARTICLE ALLOC!");
return NULL;
}
*/

View file

@ -73,7 +73,7 @@ QFGL_LoadLibrary (void)
void *handle;
if (!(handle = dlopen (gl_driver->string, RTLD_NOW))) {
Sys_Error ("Couldn't load OpenGL library %s: %s\n", gl_driver->string,
Sys_Error ("Couldn't load OpenGL library %s: %s", gl_driver->string,
dlerror ());
}
getProcAddress = dlsym;
@ -92,7 +92,7 @@ QFGL_LoadLibrary (void)
void *handle;
if (!(handle = LoadLibrary (gl_driver->string))) {
Sys_Error ("Couldn't load OpenGL library %s!\n", gl_driver->string);
Sys_Error ("Couldn't load OpenGL library %s!", gl_driver->string);
}
getProcAddress = GetProcAddress;
(FARPROC)glGetProcAddress = GetProcAddress (handle, "wglGetProcAddress");
@ -148,7 +148,7 @@ QFGL_ProcAddress (void *handle, const char *name, qboolean crit)
Con_DPrintf ("not found\n");
if (crit)
Sys_Error ("Couldn't load critical OpenGL function %s, exiting...\n",
Sys_Error ("Couldn't load critical OpenGL function %s, exiting...",
name);
return NULL;

View file

@ -88,7 +88,7 @@ R_LineGraph (int x, int y, int *h_vals, int count)
graph_width[graph_index] = count;
if (!graph_texels[graph_index])
Sys_Error ("R_LineGraph: failed to allocate texture buffer\n");
Sys_Error ("R_LineGraph: failed to allocate texture buffer");
i = 0;
while (count--) {

View file

@ -604,7 +604,7 @@ SCR_ScreenShot_f (void)
}
buffer = malloc (glwidth * glheight * 3);
if (!buffer)
Sys_Error ("SCR_ScreenShot_f: Memory Allocation Failure\n");
Sys_Error ("SCR_ScreenShot_f: Memory Allocation Failure");
qfglReadPixels (glx, gly, glwidth, glheight, GL_BGR_EXT, GL_UNSIGNED_BYTE,
buffer);
WriteTGAfile (pcxname, buffer, glwidth, glheight);

View file

@ -144,7 +144,7 @@ determine_face (vec3_t v)
i = 2;
}
if (!m) {
Sys_Error ("You are speared by a sky poly edge\n");
Sys_Error ("You are speared by a sky poly edge");
}
if (v[i] < 0)
i += 3;

View file

@ -509,7 +509,7 @@ GL_Upload8 (byte * data, int width, int height, qboolean mipmap, qboolean alpha)
s = width * height;
trans = malloc (s * sizeof (unsigned int));
if (!trans)
Sys_Error ("GL_Upload8: Memory Allocation Failure\n");
Sys_Error ("GL_Upload8: Memory Allocation Failure");
// if there are no transparent pixels, make it a 3 component
// texture even if it was specified as otherwise

View file

@ -62,11 +62,11 @@ noise_diamondsquare (unsigned char *noise, unsigned int size,
for (sizepower = 0; (1 << sizepower) < size; sizepower++);
if (size != (1 << sizepower))
Sys_Error("fractalnoise: size must be power of 2\n");
Sys_Error("fractalnoise: size must be power of 2");
for (gridpower = 0; (1 << gridpower) < startgrid; gridpower++);
if (startgrid != (1 << gridpower))
Sys_Error("fractalnoise: grid must be power of 2\n");
Sys_Error("fractalnoise: grid must be power of 2");
startgrid = bound(0, startgrid, size);
amplitude = 0xFFFF; // this gets halved before use

View file

@ -254,7 +254,7 @@ R_StoreEfrags (efrag_t **ppefrag)
break;
default:
Sys_Error ("R_StoreEfrags: Bad entity type %d\n",
Sys_Error ("R_StoreEfrags: Bad entity type %d",
model->type);
}
}

View file

@ -149,10 +149,10 @@ D_SCAlloc (int width, int size)
qboolean wrapped_this_time;
if ((width < 0) || (width > 256))
Sys_Error ("D_SCAlloc: bad cache width %d\n", width);
Sys_Error ("D_SCAlloc: bad cache width %d", width);
if ((size <= 0) || (size > 0x10000))
Sys_Error ("D_SCAlloc: bad cache size %d\n", size);
Sys_Error ("D_SCAlloc: bad cache size %d", size);
/* This adds the offset of data[0] in the surfcache_t struct. */
size += field_offset (surfcache_t, data);

View file

@ -130,7 +130,7 @@ D_DrawSolidSurface (surf_t *surf, int color)
}
break;
default:
Sys_Error("D_DrawSolidSurface: unsupported r_pixbytes %i\n",
Sys_Error("D_DrawSolidSurface: unsupported r_pixbytes %i",
r_pixbytes);
}
}

View file

@ -157,6 +157,6 @@ D_FillRect (vrect_t *rect, int color)
}
break;
default:
Sys_Error("D_FillRect: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("D_FillRect: unsupported r_pixbytes %i", r_pixbytes);
}
}

View file

@ -379,6 +379,6 @@ D_DrawParticle (particle_t *pparticle)
}
break;
default:
Sys_Error("D_DrawParticles: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("D_DrawParticles: unsupported r_pixbytes %i", r_pixbytes);
}
}

View file

@ -583,7 +583,7 @@ done32: ;
break;
default:
Sys_Error("D_PolysetDrawSpans: unsupported r_pixbytes %i\n",
Sys_Error("D_PolysetDrawSpans: unsupported r_pixbytes %i",
r_pixbytes);
}
}

View file

@ -198,7 +198,7 @@ D_WarpScreen (void)
}
break;
default:
Sys_Error("D_WarpScreen: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("D_WarpScreen: unsupported r_pixbytes %i", r_pixbytes);
}
}
@ -254,7 +254,7 @@ D_DrawTurbulentSpan (void)
}
break;
default:
Sys_Error("D_DrawTurbulentSpan: unsupported r_pixbytes %i\n",
Sys_Error("D_DrawTurbulentSpan: unsupported r_pixbytes %i",
r_pixbytes);
}
}
@ -817,7 +817,7 @@ D_DrawSpans (espan_t *pspan)
}
break;
default:
Sys_Error("D_DrawSpans: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("D_DrawSpans: unsupported r_pixbytes %i", r_pixbytes);
}
}

View file

@ -272,6 +272,6 @@ D_DrawSkyScans (espan_t *pspan)
break;
default:
Sys_Error("D_DrawSkyScans: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("D_DrawSkyScans: unsupported r_pixbytes %i", r_pixbytes);
}
}

View file

@ -501,7 +501,7 @@ NextSpan4:
break;
default:
Sys_Error("D_SpriteDrawSpans: unsupported r_pixbytes %i\n",
Sys_Error("D_SpriteDrawSpans: unsupported r_pixbytes %i",
r_pixbytes);
}
}

View file

@ -150,10 +150,10 @@ D_SCAlloc (int width, int size)
qboolean wrapped_this_time;
if ((width < 0) || (width > 256))
Sys_Error ("D_SCAlloc: bad cache width %d\n", width);
Sys_Error ("D_SCAlloc: bad cache width %d", width);
if ((size <= 0) || (size > (0x10000 * r_pixbytes)))
Sys_Error ("D_SCAlloc: bad cache size %d\n", size);
Sys_Error ("D_SCAlloc: bad cache size %d", size);
/* This adds the offset of data[0] in the surfcache_t struct. */
size += field_offset (surfcache_t, data);

View file

@ -64,7 +64,7 @@ D_DrawZPoint (void)
d_8to24table[r_zpointdesc.color];
break;
default:
Sys_Error("D_DrawZPoint: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("D_DrawZPoint: unsupported r_pixbytes %i", r_pixbytes);
}
}
}

View file

@ -311,7 +311,7 @@ Draw_Character (int x, int y, unsigned int num)
}
break;
default:
Sys_Error("Draw_Character: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("Draw_Character: unsupported r_pixbytes %i", r_pixbytes);
}
}
@ -361,7 +361,7 @@ Draw_Pixel (int x, int y, byte color)
d_8to24table[color];
break;
default:
Sys_Error("Draw_Pixel: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("Draw_Pixel: unsupported r_pixbytes %i", r_pixbytes);
}
}
@ -477,7 +477,7 @@ Draw_Pic (int x, int y, qpic_t *pic)
}
break;
default:
Sys_Error("Draw_Pic: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("Draw_Pic: unsupported r_pixbytes %i", r_pixbytes);
}
}
@ -529,7 +529,7 @@ Draw_SubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width,
}
break;
default:
Sys_Error("Draw_SubPic: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("Draw_SubPic: unsupported r_pixbytes %i", r_pixbytes);
}
}
@ -618,7 +618,7 @@ Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte * translation)
}
break;
default:
Sys_Error("Draw_TransPicTranslate: unsupported r_pixbytes %i\n",
Sys_Error("Draw_TransPicTranslate: unsupported r_pixbytes %i",
r_pixbytes);
}
}
@ -705,7 +705,7 @@ Draw_ConsoleBackground (int lines)
break;
default:
Sys_Error("Draw_TransPicTranslate: unsupported r_pixbytes %i\n",
Sys_Error("Draw_TransPicTranslate: unsupported r_pixbytes %i",
r_pixbytes);
}
@ -990,7 +990,7 @@ R_DrawRect (vrect_t *prect, int rowbytes, byte * psrc, int transparent)
}
break;
default:
Sys_Error("R_DrawRect: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("R_DrawRect: unsupported r_pixbytes %i", r_pixbytes);
}
}
@ -1103,7 +1103,7 @@ Draw_Fill (int x, int y, int w, int h, int c)
}
break;
default:
Sys_Error("Draw_Fill: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("Draw_Fill: unsupported r_pixbytes %i", r_pixbytes);
}
}
@ -1154,7 +1154,7 @@ Draw_FadeScreen (void)
}
break;
default:
Sys_Error("Draw_FadeScreen: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("Draw_FadeScreen: unsupported r_pixbytes %i", r_pixbytes);
}
VID_UnlockBuffer ();

View file

@ -434,7 +434,7 @@ SCR_ApplyBlend (void) // Used to be V_UpdatePalette
}
break;
default:
Sys_Error("V_UpdatePalette: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("V_UpdatePalette: unsupported r_pixbytes %i", r_pixbytes);
}
}
@ -677,7 +677,7 @@ SCR_ScreenShot_f (void)
Con_Printf("SCR_ScreenShot_f: FIXME - add 32bit support\n");
break;
default:
Sys_Error("SCR_ScreenShot_f: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("SCR_ScreenShot_f: unsupported r_pixbytes %i", r_pixbytes);
}
// for adapters that can't stay mapped in for linear writes all the time

View file

@ -94,7 +94,7 @@ R_LineGraph (int x, int y, int *h_vals, int count)
}
break;
default:
Sys_Error("R_LineGraph: unsupported r_pixbytes %i\n",
Sys_Error("R_LineGraph: unsupported r_pixbytes %i",
r_pixbytes);
}
}

View file

@ -727,7 +727,7 @@ R_AliasDrawModel (alight_t *plighting)
else if (r_pixbytes == 4)
acolormap = vid.colormap32;
else
Sys_Error("R_AliasDrawmodel: unsupported r_pixbytes %i\n",
Sys_Error("R_AliasDrawmodel: unsupported r_pixbytes %i",
r_pixbytes);
}

View file

@ -187,7 +187,7 @@ R_MakeSky (void)
}
break;
default:
Sys_Error("R_MakeSky: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("R_MakeSky: unsupported r_pixbytes %i", r_pixbytes);
}
r_skymade = 1;
}

View file

@ -304,7 +304,7 @@ R_DrawSurface (void)
pblockdrawer = surfmiptable32[r_drawsurf.surfmip];
break;
default:
Sys_Error("R_DrawSurface: unsupported r_pixbytes %i\n", r_pixbytes);
Sys_Error("R_DrawSurface: unsupported r_pixbytes %i", r_pixbytes);
pblockdrawer = NULL;
}

View file

@ -145,7 +145,7 @@ Skin_Set_Translate (int top, int bottom, void *_dest)
}
break;
default:
Sys_Error("Skin_Set_Translate: unsupported r_pixbytes %i\n",
Sys_Error("Skin_Set_Translate: unsupported r_pixbytes %i",
r_pixbytes);
}
/*

View file

@ -243,7 +243,7 @@ X11_OpenDisplay (void)
if (!x_disp) {
x_disp = XOpenDisplay (NULL);
if (!x_disp) {
Sys_Error ("X11_OpenDisplay: Could not open display [%s]\n",
Sys_Error ("X11_OpenDisplay: Could not open display [%s]",
XDisplayName (NULL));
}

View file

@ -408,7 +408,7 @@ AddVideoMode (const struct VideoMode *vmode)
vmode->name);
vmode2 = malloc(sizeof(struct VideoMode));
if (!vmode2)
Sys_Error ("AddVideoMode: Memory Allocation Failure\n");
Sys_Error ("AddVideoMode: Memory Allocation Failure");
*vmode2 = *vmode;
if (!FillScanRates(vmode2))
Die("%s:%d: Bad video mode `%s'\n", Opt_modedb, line, vmode2->name);

View file

@ -26,33 +26,33 @@
#define YY_NO_UNPUT
struct keyword {
const char *name;
int token;
int value;
const char *name;
int token;
int value;
};
static struct keyword keywords[] = {
{ "mode", MODE, 0 },
{ "geometry", GEOMETRY, 0 },
{ "timings", TIMINGS, 0 },
{ "hsync", HSYNC, 0 },
{ "vsync", VSYNC, 0 },
{ "csync", CSYNC, 0 },
{ "gsync", GSYNC, 0 },
{ "extsync", EXTSYNC, 0 },
{ "bcast", BCAST, 0 },
{ "laced", LACED, 0 },
{ "double", DOUBLE, 0 },
{ "rgba", RGBA, 0 },
{ "nonstd", NONSTD, 0 },
{ "accel", ACCEL, 0 },
{ "grayscale", GRAYSCALE, 0 },
{ "endmode", ENDMODE, 0 },
{ "low", POLARITY, LOW },
{ "high", POLARITY, HIGH },
{ "false", BOOLEAN, FALSE },
{ "true", BOOLEAN, TRUE },
{ "", -1, 0 }
{ "mode", MODE, 0 },
{ "geometry", GEOMETRY, 0 },
{ "timings", TIMINGS, 0 },
{ "hsync", HSYNC, 0 },
{ "vsync", VSYNC, 0 },
{ "csync", CSYNC, 0 },
{ "gsync", GSYNC, 0 },
{ "extsync", EXTSYNC, 0 },
{ "bcast", BCAST, 0 },
{ "laced", LACED, 0 },
{ "double", DOUBLE, 0 },
{ "rgba", RGBA, 0 },
{ "nonstd", NONSTD, 0 },
{ "accel", ACCEL, 0 },
{ "grayscale", GRAYSCALE, 0 },
{ "endmode", ENDMODE, 0 },
{ "low", POLARITY, LOW },
{ "high", POLARITY, HIGH },
{ "false", BOOLEAN, FALSE },
{ "true", BOOLEAN, TRUE },
{ "", -1, 0 }
};
int line = 1;
@ -60,40 +60,40 @@ int line = 1;
void yyerror(const char *s)
{
Die("%s:%d: %s\n", Opt_modedb, line, s);
Die("%s:%d: %s", Opt_modedb, line, s);
}
int yywrap(void)
{
return 1;
return 1;
}
static int FindToken(const char *s)
{
int i;
int i;
for (i = 0; keywords[i].token > 0; i++)
for (i = 0; keywords[i].token > 0; i++)
if (!strcasecmp(s, keywords[i].name)) {
yylval.int_val = keywords[i].value;
return keywords[i].token;
return keywords[i].token;
}
Die("%s:%d: Unknown keyword `%s'\n", Opt_modedb, line, s);
Die("%s:%d: Unknown keyword `%s'", Opt_modedb, line, s);
}
static const char *CopyString(const char *s)
{
int len;
char *s2;
int len;
char *s2;
len = strlen(s)-2;
if (!(s2 = malloc(len+1)))
Die("No memory\n");
strncpy(s2, s+1, len);
s2[len] = '\0';
return s2;
len = strlen(s)-2;
if (!(s2 = malloc(len+1)))
Die("No memory");
strncpy(s2, s+1, len);
s2[len] = '\0';
return s2;
}
@ -110,17 +110,17 @@ junk .
{keyword} {
return FindToken(yytext);
}
}
{number} {
yylval.int_val = strtoul(yytext, NULL, 0);
return NUMBER;
}
}
{string} {
yylval.string = CopyString(yytext);
return STRING;
}
}
{comment}$ break;
@ -129,10 +129,10 @@ junk .
\n {
line++;
break;
}
}
{junk} {
Die("%s:%d: Invalid token `%s'\n", Opt_modedb, line, yytext);
}
Die("%s:%d: Invalid token `%s'", Opt_modedb, line, yytext);
}
%%

View file

@ -757,8 +757,8 @@ AppActivate (BOOL fActive, BOOL minimize)
if (ChangeDisplaySettings (&win_gdevmode, CDS_FULLSCREEN) !=
DISP_CHANGE_SUCCESSFUL) {
IN_ShowMouse ();
Sys_Error ("Couldn't set fullscreen DIB mode\n(try "
"upgrading your video drivers)\r\n (%lx)",
Sys_Error ("Couldn't set fullscreen DIB mode\n"
"(try upgrading your video drivers)\n (%lx)",
GetLastError());
}
ShowWindow (mainwindow, SW_SHOWNORMAL);

View file

@ -584,9 +584,9 @@ IN_LL_Init (void)
{
// open the display
if (!x_disp)
Sys_Error ("IN: No display!!\n");
Sys_Error ("IN: No display!!");
if (!x_win)
Sys_Error ("IN: No window!!\n");
Sys_Error ("IN: No window!!");
X11_OpenDisplay (); // call to increment the reference counter

View file

@ -116,13 +116,13 @@ QFGL_ExtensionAddress (const char *name)
if (!handle) {
#if defined(HAVE_DLOPEN)
if (!(handle = dlopen (gl_driver->string, RTLD_NOW))) {
Sys_Error ("Couldn't load OpenGL library %s: %s\n",
Sys_Error ("Couldn't load OpenGL library %s: %s",
gl_driver->string, dlerror ());
return 0;
}
#elif defined(_WIN32)
if (!(handle = LoadLibrary (gl_driver->string))) {
Sys_Error ("Couldn't load OpenGL library %s!\n",
Sys_Error ("Couldn't load OpenGL library %s!",
gl_driver->string);
return 0;
}

View file

@ -69,33 +69,33 @@ VID_GetWindowSize (int def_w, int def_h)
if ((pnum = COM_CheckParm ("-width"))) {
if (pnum >= com_argc - 1)
Sys_Error ("VID: -width <width>\n");
Sys_Error ("VID: -width <width>");
Cvar_Set (vid_width, com_argv[pnum + 1]);
if (!vid_width->int_val)
Sys_Error ("VID: Bad window width\n");
Sys_Error ("VID: Bad window width");
}
if ((pnum = COM_CheckParm ("-height"))) {
if (pnum >= com_argc - 1)
Sys_Error ("VID: -height <height>\n");
Sys_Error ("VID: -height <height>");
Cvar_Set (vid_height, com_argv[pnum + 1]);
if (!vid_height->int_val)
Sys_Error ("VID: Bad window height\n");
Sys_Error ("VID: Bad window height");
}
if ((pnum = COM_CheckParm ("-winsize"))) {
if (pnum >= com_argc - 2)
Sys_Error ("VID: -winsize <width> <height>\n");
Sys_Error ("VID: -winsize <width> <height>");
Cvar_Set (vid_width, com_argv[pnum + 1]);
Cvar_Set (vid_height, com_argv[pnum + 2]);
if (!vid_width->int_val || !vid_height->int_val)
Sys_Error ("VID: Bad window width/height\n");
Sys_Error ("VID: Bad window width/height");
}
Cvar_SetFlags (vid_width, vid_width->flags | CVAR_ROM);

View file

@ -320,7 +320,7 @@ VID_Init (unsigned char *palette)
fc = qf_fxMesaCreateContext (0, findres (&scr_width, &scr_height),
GR_REFRESH_75Hz, attribs);
if (!fc)
Sys_Error ("Unable to create 3DFX context.\n");
Sys_Error ("Unable to create 3DFX context.");
qf_fxMesaMakeCurrent (fc);

View file

@ -244,7 +244,7 @@ void
GL_Pre_Init (void)
{
if (!GLF_Init()) {
Sys_Error("Can't init video.\n");
Sys_Error("Can't init video.");
return;
}
}

View file

@ -73,7 +73,7 @@ VID_InitBuffers (void)
// Allocate the new screen buffer
vid.conbuffer = vid.buffer = calloc (buffersize, 1);
if (!vid.conbuffer) {
Sys_Error ("Not enough memory for video mode\n");
Sys_Error ("Not enough memory for video mode");
}
}
// Allocate the new z-buffer
@ -81,7 +81,7 @@ VID_InitBuffers (void)
if (!vid.zbuffer) {
free (vid.buffer);
vid.conbuffer = vid.buffer = NULL;
Sys_Error ("Not enough memory for video mode\n");
Sys_Error ("Not enough memory for video mode");
}
// Allocate the new surface cache; free the z-buffer if we fail
vid.surfcache = calloc (cachesize, 1);
@ -90,7 +90,7 @@ VID_InitBuffers (void)
free (vid.zbuffer);
vid.conbuffer = vid.buffer = NULL;
vid.zbuffer = NULL;
Sys_Error ("Not enough memory for video mode\n");
Sys_Error ("Not enough memory for video mode");
}
if (vid.init_caches)

View file

@ -198,7 +198,7 @@ VID_MakeColormaps (int fullbrights, byte *pal)
vid.colormap16 = malloc (256*VID_GRADES * sizeof (short));
vid.colormap32 = malloc (256*VID_GRADES * sizeof (int));
if (!vid.colormap8 || !vid.colormap16 || !vid.colormap32)
Sys_Error ("VID_MakeColormaps: Memory Allocation Failure\n");
Sys_Error ("VID_MakeColormaps: Memory Allocation Failure");
VID_MakeColormap8(vid.colormap8, pal);
VID_MakeColormap16(vid.colormap16, pal);
VID_MakeColormap32(vid.colormap32, pal);
@ -238,7 +238,7 @@ VID_InitBuffers (void)
// Allocate the new screen buffer
vid.conbuffer = vid.buffer = calloc (buffersize, 1);
if (!vid.conbuffer) {
Sys_Error ("Not enough memory for video mode\n");
Sys_Error ("Not enough memory for video mode");
}
}
// Allocate the new z-buffer
@ -246,7 +246,7 @@ VID_InitBuffers (void)
if (!vid.zbuffer) {
free (vid.buffer);
vid.conbuffer = vid.buffer = NULL;
Sys_Error ("Not enough memory for video mode\n");
Sys_Error ("Not enough memory for video mode");
}
// Allocate the new surface cache; free the z-buffer if we fail
vid.surfcache = calloc (cachesize, 1);
@ -254,7 +254,7 @@ VID_InitBuffers (void)
free (vid.buffer);
free (vid.zbuffer);
vid.zbuffer = NULL;
Sys_Error ("Not enough memory for video mode\n");
Sys_Error ("Not enough memory for video mode");
}
if (vid.init_caches)

View file

@ -228,7 +228,7 @@ VID_SetVESAPalette (viddef_t *lvid, vmode_t * pcurrentmode, unsigned char *pal)
dos_int86 (0x10);
if (regs.x.ax != 0x4f)
Sys_Error ("Unable to load VESA palette\n");
Sys_Error ("Unable to load VESA palette");
}

View file

@ -306,7 +306,7 @@ loadpalette (unsigned short *red, unsigned short *green, unsigned short *blue)
cmap.transp = NULL;
cmap.start = 0;
if (-1 == ioctl(fb_fd, FBIOPUTCMAP, (void *)&cmap))
Sys_Error("ioctl FBIOPUTCMAP %s\n", strerror(errno));
Sys_Error("ioctl FBIOPUTCMAP %s", strerror(errno));
}
void
@ -377,21 +377,21 @@ VID_SetMode (const char *name, unsigned char *palette)
ConvertFromVideoMode(&current_mode, &var);
err = ioctl(fb_fd, FBIOPUT_VSCREENINFO, &var);
if (err)
Sys_Error ("Video mode failed: %s\n", name);
Sys_Error ("Video mode failed: %s", name);
ConvertToVideoMode(&var, &current_mode);
current_mode.name = current_name;
VID_SetPalette (palette);
err = ioctl(fb_fd, FBIOGET_FSCREENINFO, &fix);
if (err)
Sys_Error ("Video mode failed: %s\n", name);
Sys_Error ("Video mode failed: %s", name);
smem_start = (unsigned long)fix.smem_start & PAGE_MASK;
smem_offset = (unsigned long)fix.smem_start & ~PAGE_MASK;
fb_map_length = (smem_offset+fix.smem_len+~PAGE_MASK) & PAGE_MASK;
fb_map_addr = (char *)mmap(0, fb_map_length, PROT_WRITE, MAP_SHARED,
fb_fd, 0);
if (!fb_map_addr)
Sys_Error ("This mode isn't hapnin'\n");
Sys_Error ("This mode isn't hapnin'");
vid.direct = framebuffer_ptr = fb_map_addr;
// alloc screen buffer, z-buffer, and surface cache
@ -442,14 +442,14 @@ fb_switch_init (void)
sigaction(SIGUSR2, &act, 0);
if (ioctl(tty_fd, VT_GETMODE, &vtmode)) {
Sys_Error("ioctl VT_GETMODE: %s\n", strerror(errno));
Sys_Error("ioctl VT_GETMODE: %s", strerror(errno));
}
vtmode.mode = VT_PROCESS;
vtmode.waitv = 0;
vtmode.relsig = SIGUSR1;
vtmode.acqsig = SIGUSR2;
if (ioctl(tty_fd, VT_SETMODE, &vtmode)) {
Sys_Error("ioctl VT_SETMODE: %s\n", strerror(errno));
Sys_Error("ioctl VT_SETMODE: %s", strerror(errno));
}
}
@ -473,10 +473,10 @@ VID_Init (unsigned char *palette)
fb_fd = open(fbname, O_RDWR);
if (fb_fd < 0)
Sys_Error ("failed to open fb device\n");
Sys_Error ("failed to open fb device");
if (ioctl(fb_fd, FBIOGET_VSCREENINFO, &orig_var))
Sys_Error ("failed to get var screen info\n");
Sys_Error ("failed to get var screen info");
fb_switch_init();
@ -516,7 +516,7 @@ VID_Init (unsigned char *palette)
/* Set vid parameters */
vmode = FindVideoMode(modestr);
if (!vmode)
Sys_Error("no video mode %s\n", modestr);
Sys_Error("no video mode %s", modestr);
current_mode = *vmode;
ioctl(tty_fd, KDSETMODE, KD_GRAPHICS);
VID_SetMode (current_mode.name, palette);

View file

@ -180,8 +180,7 @@ VID_Init (unsigned char *palette)
x_visinfo = qfglXChooseVisual (x_disp, x_screen, attrib);
if (!x_visinfo) {
Sys_Error ("Error couldn't get an RGB, Double-buffered, Depth "
"visual\n");
Sys_Error ("Error couldn't get an RGB, Double-buffered, Depth visual");
}
x_vis = x_visinfo->visual;

View file

@ -250,7 +250,7 @@ VID_AllocBuffers (int width, int height)
// Allocate the new z-buffer
d_pzbuffer = calloc (zbuffersize, 1);
if (!d_pzbuffer) {
Sys_Error ("Not enough memory for video mode\n");
Sys_Error ("Not enough memory for video mode");
return false;
}
// Allocate the new surface cache; free the z-buffer if we fail
@ -258,7 +258,7 @@ VID_AllocBuffers (int width, int height)
if (!vid_surfcache) {
free (d_pzbuffer);
d_pzbuffer = NULL;
Sys_Error ("Not enough memory for video mode\n");
Sys_Error ("Not enough memory for video mode");
return false;
}
vid_surfcachesize = cachesize;

View file

@ -109,7 +109,7 @@ VID_Init (unsigned char *palette)
// Initialize display
if (!(screen = SDL_SetVideoMode (vid.width, vid.height, 8, flags)))
Sys_Error ("VID: Couldn't set video mode: %s\n", SDL_GetError ());
Sys_Error ("VID: Couldn't set video mode: %s", SDL_GetError ());
VID_InitGamma (palette);
VID_SetPalette (palette);

View file

@ -122,7 +122,7 @@ VID_Init (unsigned char *palette)
// Initialize display
if (!(screen = SDL_SetVideoMode (vid.width, vid.height,
vid_bitdepth->int_val, flags)))
Sys_Error ("VID: Couldn't set video mode: %s\n", SDL_GetError ());
Sys_Error ("VID: Couldn't set video mode: %s", SDL_GetError ());
VID_InitGamma (palette);
VID_SetPalette (palette);
@ -149,7 +149,7 @@ VID_Init (unsigned char *palette)
0x0000FF00, 0x00FF0000, 0x00000000);
break;
default:
Sys_Error ("VID_Init: unsupported bit depth\n");
Sys_Error ("VID_Init: unsupported bit depth");
}
// now we know everything we need to know about the buffer

View file

@ -165,7 +165,7 @@ VID_Init (unsigned char *palette)
// Initialize the SDL library
if (SDL_Init (SDL_INIT_VIDEO) < 0)
Sys_Error ("Couldn't initialize SDL: %s\n", SDL_GetError ());
Sys_Error ("Couldn't initialize SDL: %s", SDL_GetError ());
// Check if we want fullscreen
if (vid_fullscreen->value) {
@ -190,7 +190,7 @@ VID_Init (unsigned char *palette)
SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 1);
if (!(screen = SDL_SetVideoMode (scr_width, scr_height, 8, flags))) {
Sys_Error ("Couldn't set video mode: %s\n", SDL_GetError ());
Sys_Error ("Couldn't set video mode: %s", SDL_GetError ());
SDL_Quit ();
}

View file

@ -267,7 +267,7 @@ VID_InitModes (void)
num_modes = vga_lastmodenumber () + 1;
modes = malloc (num_modes * sizeof (vga_modeinfo));
if (!modes)
Sys_Error ("VID_InitModes: Memory Allocation Failure\n");
Sys_Error ("VID_InitModes: Memory Allocation Failure");
for (i = 0; i < num_modes; i++) {
if (vga_hasmode (i)) {
memcpy (&modes[i], vga_getmodeinfo (i), sizeof (vga_modeinfo));
@ -399,7 +399,7 @@ VID_SetMode (int modenum, unsigned char *palette)
/* get goin' */
err = vga_setmode (current_mode);
if (err) {
Sys_Error ("Video mode failed: %d\n", modenum);
Sys_Error ("Video mode failed: %d", modenum);
}
VID_SetPalette (palette);
@ -410,7 +410,7 @@ VID_SetMode (int modenum, unsigned char *palette)
}
#endif
if (!framebuffer_ptr) {
Sys_Error ("This mode isn't hapnin'\n");
Sys_Error ("This mode isn't hapnin'");
}
vga_setpage (0);
@ -449,7 +449,7 @@ VID_Init (unsigned char *palette)
if (UseDisplay) {
err = vga_init ();
if (err)
Sys_Error ("SVGALib failed to allocate a new VC\n");
Sys_Error ("SVGALib failed to allocate a new VC");
if (vga_runinbackground_version () == 1) {
Con_Printf ("SVGALIB background support detected\n");

View file

@ -210,7 +210,7 @@ VID_SetWindowedMode (int modenum)
NULL, NULL, global_hInstance, NULL);
if (!mainwindow)
Sys_Error ("Couldn't create DIB window (%lx)\r\n",GetLastError());
Sys_Error ("Couldn't create DIB window (%lx)",GetLastError());
// Center and show the window
CenterWindow (mainwindow, WindowRect.right - WindowRect.left,
@ -265,7 +265,7 @@ VID_SetFullDIBMode (int modenum)
if (ChangeDisplaySettings (&win_gdevmode, CDS_FULLSCREEN) !=
DISP_CHANGE_SUCCESSFUL)
Sys_Error ("Couldn't set fullscreen DIB mode (%lx)\r\n",
Sys_Error ("Couldn't set fullscreen DIB mode (%lx)",
GetLastError());
}
@ -300,7 +300,7 @@ VID_SetFullDIBMode (int modenum)
global_hInstance, NULL);
if (!mainwindow)
Sys_Error ("Couldn't create DIB window (%lx)\r\n",GetLastError());
Sys_Error ("Couldn't create DIB window (%lx)",GetLastError());
ShowWindow (mainwindow, SW_SHOWDEFAULT);
UpdateWindow (mainwindow);
@ -343,7 +343,7 @@ VID_SetMode (int modenum, unsigned char *palette)
if ((windowed && (modenum != 0)) ||
(!windowed && (modenum < 1)) || (!windowed && (modenum >= nummodes))) {
Sys_Error ("Bad video mode\n");
Sys_Error ("Bad video mode");
}
// so Con_Printfs don't mess us up by forcing vid and snd updates
@ -690,7 +690,7 @@ VID_InitDIB (HINSTANCE hInstance)
wc.lpszClassName = "QuakeForge";
if (!RegisterClass (&wc))
Sys_Error ("Couldn't register window class (%lx)\r\n", GetLastError());
Sys_Error ("Couldn't register window class (%lx)", GetLastError());
modelist[0].type = MS_WINDOWED;
@ -1069,7 +1069,7 @@ VID_Init (unsigned char *palette)
ReleaseDC (mainwindow, maindc);
Sys_Error("Could not initialize GL (wglCreateContext failed).\n\nMake "
"sure you in are 65535 color mode, and try running -window. "
"\nError code: (%lx)\r\n", lasterror);
"\nError code: (%lx)", lasterror);
}
if (!qf_wglMakeCurrent (maindc, baseRC)) {
@ -1078,7 +1078,7 @@ VID_Init (unsigned char *palette)
qf_wglDeleteContext (baseRC);
if (maindc && mainwindow)
ReleaseDC (mainwindow, maindc);
Sys_Error ("wglMakeCurrent failed (%lx)\r\n", lasterror);
Sys_Error ("wglMakeCurrent failed (%lx)", lasterror);
}
GL_Init ();

View file

@ -302,7 +302,7 @@ ResetFrameBuffer (void)
mem = ((vid.width * pwidth + 7) & ~7) * vid.height;
buf = malloc (mem);
if (!buf)
Sys_Error ("ResetFrameBuffer: Memory Allocation Failure\n");
Sys_Error ("ResetFrameBuffer: Memory Allocation Failure");
// allocate new screen buffer
x_framebuffer[0] = XCreateImage (x_disp, x_vis, x_visinfo->depth,
@ -310,7 +310,7 @@ ResetFrameBuffer (void)
vid.height, 32, 0);
if (!x_framebuffer[0]) {
Sys_Error ("VID: XCreateImage failed\n");
Sys_Error ("VID: XCreateImage failed");
}
}
@ -339,12 +339,12 @@ ResetSharedFrameBuffers (void)
size = x_framebuffer[frm]->bytes_per_line * x_framebuffer[frm]->height;
if (size < minsize)
Sys_Error ("VID: Window must use at least %d bytes\n", minsize);
Sys_Error ("VID: Window must use at least %d bytes", minsize);
key = random ();
x_shminfo[frm].shmid = shmget ((key_t) key, size, IPC_CREAT | 0777);
if (x_shminfo[frm].shmid == -1)
Sys_Error ("VID: Could not get any shared memory (%s)\n",
Sys_Error ("VID: Could not get any shared memory (%s)",
strerror (errno));
// attach to the shared memory segment
@ -357,7 +357,7 @@ ResetSharedFrameBuffers (void)
// get the X server to attach to it
if (!XShmAttach (x_disp, &x_shminfo[frm]))
Sys_Error ("VID: XShmAttach() failed\n");
Sys_Error ("VID: XShmAttach() failed");
XSync (x_disp, 0);
shmctl (x_shminfo[frm].shmid, IPC_RMID, 0);
@ -435,7 +435,7 @@ VID_Init (unsigned char *palette)
// specify a visual id
if ((pnum = COM_CheckParm ("-visualid"))) {
if (pnum >= com_argc - 1)
Sys_Error ("VID: -visualid <id#>\n");
Sys_Error ("VID: -visualid <id#>");
template.visualid = atoi (com_argv[pnum + 1]);
template_mask = VisualIDMask;
} else { // If not specified, use default
@ -458,9 +458,9 @@ VID_Init (unsigned char *palette)
} else {
if (num_visuals == 0) {
if (template_mask == VisualIDMask) {
Sys_Error ("VID: Bad visual ID %ld\n", template.visualid);
Sys_Error ("VID: Bad visual ID %ld", template.visualid);
} else {
Sys_Error ("VID: No visuals at depth %d\n", template.depth);
Sys_Error ("VID: No visuals at depth %d", template.depth);
}
}
}
@ -639,7 +639,7 @@ VID_Update (vrect_t *rects)
x_framebuffer[current_framebuffer],
rects->x, rects->y, rects->x, rects->y,
rects->width, rects->height, True)) {
Sys_Error ("VID_Update: XShmPutImage failed\n");
Sys_Error ("VID_Update: XShmPutImage failed");
}
oktodraw = false;
while (!oktodraw)
@ -653,7 +653,7 @@ VID_Update (vrect_t *rects)
if (XPutImage (x_disp, x_win, x_gc, x_framebuffer[0],
rects->x, rects->y, rects->x, rects->y,
rects->width, rects->height)) {
Sys_Error ("VID_Update: XPutImage failed\n");
Sys_Error ("VID_Update: XPutImage failed");
}
rects = rects->pnext;
}

View file

@ -139,7 +139,7 @@ Host_EndGame (const char *message, ...)
Host_ShutdownServer (false);
if (cls.state == ca_dedicated)
Sys_Error ("Host_EndGame: %s\n", string); // dedicated servers exit
Sys_Error ("Host_EndGame: %s", string); // dedicated servers exit
if (cls.demonum != -1)
CL_NextDemo ();
@ -175,7 +175,7 @@ Host_Error (const char *error, ...)
Host_ShutdownServer (false);
if (cls.state == ca_dedicated)
Sys_Error ("Host_Error: %s\n", string); // dedicated servers exit
Sys_Error ("Host_Error: %s", string); // dedicated servers exit
Con_Printf ("Host_Error: %s\n", string);
@ -730,21 +730,21 @@ Host_InitVCR (quakeparms_t *parms)
if (COM_CheckParm ("-playback")) {
if (com_argc != 2)
Sys_Error ("No other parameters allowed with -playback\n");
Sys_Error ("No other parameters allowed with -playback");
vcrFile = Qopen ("quake.vcr", "rbz");
if (!vcrFile)
Sys_Error ("playback file not found\n");
Sys_Error ("playback file not found");
Qread (vcrFile, &i, sizeof (int));
if (i != VCR_SIGNATURE)
Sys_Error ("Invalid signature in vcr file\n");
Sys_Error ("Invalid signature in vcr file");
Qread (vcrFile, &com_argc, sizeof (int));
com_argv = malloc (com_argc * sizeof (char *));
if (!com_argv)
Sys_Error ("Host_InitVCR: Memory Allocation Failure\n");
Sys_Error ("Host_InitVCR: Memory Allocation Failure");
com_argv[0] = parms->argv[0];
for (i = 0; i < com_argc; i++) {
@ -752,7 +752,7 @@ Host_InitVCR (quakeparms_t *parms)
p = malloc (len);
if (!p)
Sys_Error ("Host_InitVCR: Memory Allocation Failure\n");
Sys_Error ("Host_InitVCR: Memory Allocation Failure");
Qread (vcrFile, p, len);
com_argv[i + 1] = p;
}
@ -841,7 +841,7 @@ CL_Init_Memory (void)
mem_base = malloc (mem_size);
if (!mem_base)
Sys_Error ("Can't allocate %d\n", mem_size);
Sys_Error ("Can't allocate %d", mem_size);
Sys_PageIn (mem_base, mem_size);
Memory_Init (mem_base, mem_size);

View file

@ -98,7 +98,7 @@ locs_add (const vec3_t location, const char *name)
locations[num] = malloc (sizeof (location_t));
if (!locations[num])
Sys_Error ("locs_add: Memory Allocation Failure\n");
Sys_Error ("locs_add: Memory Allocation Failure");
locations[num]->loc[0] = location[0];
locations[num]->loc[1] = location[1];

View file

@ -347,7 +347,7 @@ BW_Init (void)
lowmem_buffer = dos_getmemory (LOWMEM_SIZE);
if (!lowmem_buffer)
Sys_Error ("not enough low memory\n");
Sys_Error ("not enough low memory");
lowmem_bufoff = ptr2real (lowmem_buffer) & 0xf;
lowmem_bufseg = ptr2real (lowmem_buffer) >> 4;
@ -397,7 +397,7 @@ BW_Listen (qboolean state)
if (net_acceptsocket != -1)
return;
if ((net_acceptsocket = BW_OpenSocket (net_hostport)) == -1)
Sys_Error ("BW_Listen: Unable to open accept socket\n");
Sys_Error ("BW_Listen: Unable to open accept socket");
return;
}
// disable listening
@ -583,7 +583,7 @@ BW_Broadcast (int s, byte * msg, int len)
writeInfo->remotePort = net_hostport;
writeInfo->dataLen = len;
if (len > NET_DATAGRAMSIZE)
Sys_Error ("BW UDP write packet too large: %u\n", len);
Sys_Error ("BW UDP write packet too large: %u", len);
Q_memcpy (writeInfo->data, msg, len);
writeInfo->data[len] = 0;
regs.h.ah = 0x40;
@ -619,7 +619,7 @@ BW_Write (int s, byte * msg, int len, struct qsockaddr *to)
writeInfo->remotePort = ntohs (((struct sockaddr_in *) to)->sin_port);
writeInfo->dataLen = len;
if (len > NET_DATAGRAMSIZE)
Sys_Error ("BW UDP write packet too large: %u\n", len);
Sys_Error ("BW UDP write packet too large: %u", len);
Q_memcpy (writeInfo->data, msg, len);
writeInfo->data[len] = 0;
regs.h.ah = 0x40;

View file

@ -198,13 +198,13 @@ Datagram_SendMessage (qsocket_t * sock, sizebuf_t *data)
#ifdef DEBUG
if (data->cursize == 0)
Sys_Error ("Datagram_SendMessage: zero length message\n");
Sys_Error ("Datagram_SendMessage: zero length message");
if (data->cursize > NET_MAXMESSAGE)
Sys_Error ("Datagram_SendMessage: message too big %u\n", data->cursize);
Sys_Error ("Datagram_SendMessage: message too big %u", data->cursize);
if (sock->canSend == false)
Sys_Error ("SendMessage: called with canSend == false\n");
Sys_Error ("SendMessage: called with canSend == false");
#endif
memcpy (sock->sendMessage, data->data, data->cursize);
@ -323,10 +323,10 @@ Datagram_SendUnreliableMessage (qsocket_t * sock, sizebuf_t *data)
#ifdef DEBUG
if (data->cursize == 0)
Sys_Error ("Datagram_SendUnreliableMessage: zero length message\n");
Sys_Error ("Datagram_SendUnreliableMessage: zero length message");
if (data->cursize > MAX_DATAGRAM)
Sys_Error ("Datagram_SendUnreliableMessage: message too big %u\n",
Sys_Error ("Datagram_SendUnreliableMessage: message too big %u",
data->cursize);
#endif
@ -576,7 +576,7 @@ Test_Poll (void)
break;
if (MSG_ReadByte (net_message) != CCREP_PLAYER_INFO)
Sys_Error ("Unexpected repsonse to Player Info request\n");
Sys_Error ("Unexpected repsonse to Player Info request");
playerNumber = MSG_ReadByte (net_message);
strcpy (name, MSG_ReadString (net_message));

View file

@ -330,7 +330,7 @@ IPX_Listen (qboolean state)
if (net_acceptsocket != -1)
return;
if ((net_acceptsocket = IPX_OpenSocket (net_hostport)) == -1)
Sys_Error ("IPX_Listen: Unable to open accept socket\n");
Sys_Error ("IPX_Listen: Unable to open accept socket");
return;
}
// disable listening
@ -391,7 +391,7 @@ IPX_OpenSocket (int port)
}
// "this will NEVER happen"
Sys_Error ("IPX_OpenSocket: handle allocation failed\n");
Sys_Error ("IPX_OpenSocket: handle allocation failed");
return -1;
}
@ -482,7 +482,7 @@ IPX_Read (int handle, byte * buf, int len, struct qsockaddr *addr)
ntohs (rcvbuf->header.length) - (sizeof (int) + sizeof (IPXheader));
if (len < copylen)
Sys_Error ("IPX_Read: buffer too small (%d vs %d)\n", len, copylen);
Sys_Error ("IPX_Read: buffer too small (%d vs %d)", len, copylen);
Q_memcpy (buf, rcvbuf->data, copylen);
// fill in the addr if they want it

View file

@ -187,7 +187,7 @@ Loop_SendMessage (qsocket_t * sock, sizebuf_t *data)
bufferLength = &((qsocket_t *) sock->driverdata)->receiveMessageLength;
if ((*bufferLength + data->cursize + 4) > NET_MAXMESSAGE)
Sys_Error ("Loop_SendMessage: overflow\n");
Sys_Error ("Loop_SendMessage: overflow");
buffer = ((qsocket_t *) sock->driverdata)->receiveMessage + *bufferLength;

View file

@ -192,7 +192,7 @@ NET_FreeQSocket (qsocket_t * sock)
break;
}
if (!s)
Sys_Error ("NET_FreeQSocket: not active\n");
Sys_Error ("NET_FreeQSocket: not active");
}
// add it to free list

View file

@ -108,7 +108,7 @@ MPATH_Init (void)
}
if ((net_controlsocket = MPATH_OpenSocket (0)) == -1)
Sys_Error ("MPATH_Init: Unable to open control socket\n");
Sys_Error ("MPATH_Init: Unable to open control socket");
((struct sockaddr_in *) &broadcastaddr)->sin_family = AF_INET;
((struct sockaddr_in *) &broadcastaddr)->sin_addr.s_addr = INADDR_BROADCAST;
@ -145,7 +145,7 @@ MPATH_Listen (qboolean state)
if (net_acceptsocket != -1)
return;
if ((net_acceptsocket = MPATH_OpenSocket (net_hostport)) == -1)
Sys_Error ("MPATH_Listen: Unable to open accept socket\n");
Sys_Error ("MPATH_Listen: Unable to open accept socket");
return;
}
// disable listening
@ -318,7 +318,7 @@ MPATH_Broadcast (int socket, byte * buf, int len)
if (socket != net_broadcastsocket) {
if (net_broadcastsocket != 0)
Sys_Error ("Attempted to use multiple broadcasts sockets\n");
Sys_Error ("Attempted to use multiple broadcasts sockets");
ret = MPATH_MakeSocketBroadcastCapable (socket);
if (ret == -1) {
Con_Printf ("Unable to make socket broadcast capable\n");

View file

@ -146,7 +146,7 @@ UDP_Init (void)
}
if ((net_controlsocket = UDP_OpenSocket (0)) == -1)
Sys_Error ("UDP_Init: Unable to open control socket\n");
Sys_Error ("UDP_Init: Unable to open control socket");
((struct sockaddr_in *) &broadcastaddr)->sin_family = AF_INET;
((struct sockaddr_in *) &broadcastaddr)->sin_addr.s_addr =
@ -181,7 +181,7 @@ UDP_Listen (qboolean state)
if (net_acceptsocket != -1)
return;
if ((net_acceptsocket = UDP_OpenSocket (net_hostport)) == -1)
Sys_Error ("UDP_Listen: Unable to open accept socket\n");
Sys_Error ("UDP_Listen: Unable to open accept socket");
return;
}
// disable listening
@ -306,7 +306,7 @@ UDP_CheckNewConnections (void)
return -1;
if (ioctl (net_acceptsocket, FIONREAD, &available) == -1)
Sys_Error ("UDP: ioctlsocket (FIONREAD) failed\n");
Sys_Error ("UDP: ioctlsocket (FIONREAD) failed");
if (available)
return net_acceptsocket;
recvfrom (net_acceptsocket, buff, 0, 0, (struct sockaddr *) &from,
@ -347,7 +347,7 @@ UDP_Broadcast (int socket, byte * buf, int len)
if (socket != net_broadcastsocket) {
if (net_broadcastsocket != 0)
Sys_Error ("Attempted to use multiple broadcasts sockets\n");
Sys_Error ("Attempted to use multiple broadcasts sockets");
ret = UDP_MakeSocketBroadcastCapable (socket);
if (ret == -1) {
Con_Printf ("Unable to make socket broadcast capable\n");

View file

@ -73,7 +73,7 @@ VCR_ReadNext (void)
{
if (Qread (vcrFile, &next, sizeof (next)) == 0) {
next.op = 255;
Sys_Error ("=== END OF PLAYBACK===\n");
Sys_Error ("=== END OF PLAYBACK===");
}
if (next.op < 1 || next.op > VCR_MAX_MESSAGE)
Sys_Error ("VCR_ReadNext: bad op");

View file

@ -279,7 +279,7 @@ WINS_Listen (qboolean state)
return;
WINS_GetLocalAddress ();
if ((net_acceptsocket = WINS_OpenSocket (net_hostport)) == -1)
Sys_Error ("WINS_Listen: Unable to open accept socket\n");
Sys_Error ("WINS_Listen: Unable to open accept socket");
return;
}
// disable listening
@ -455,7 +455,7 @@ WINS_Broadcast (int socket, byte * buf, int len)
if (socket != net_broadcastsocket) {
if (net_broadcastsocket != 0)
Sys_Error ("Attempted to use multiple broadcasts sockets\n");
Sys_Error ("Attempted to use multiple broadcasts sockets");
WINS_GetLocalAddress ();
ret = WINS_MakeSocketBroadcastCapable (socket);
if (ret == -1) {

View file

@ -156,7 +156,7 @@ WIPX_Listen (qboolean state)
if (net_acceptsocket != -1)
return;
if ((net_acceptsocket = WIPX_OpenSocket (net_hostport)) == -1)
Sys_Error ("WIPX_Listen: Unable to open accept socket\n");
Sys_Error ("WIPX_Listen: Unable to open accept socket");
return;
}
// disable listening
@ -202,7 +202,7 @@ WIPX_OpenSocket (int port)
return handle;
}
Sys_Error ("Winsock IPX bind failed\n");
Sys_Error ("Winsock IPX bind failed");
ErrorReturn:
pclosesocket (newsocket);
return -1;
@ -241,7 +241,7 @@ WIPX_CheckNewConnections (void)
return -1;
if (pioctlsocket (ipxsocket[net_acceptsocket], FIONREAD, &available) == -1)
Sys_Error ("WIPX: ioctlsocket (FIONREAD) failed\n");
Sys_Error ("WIPX: ioctlsocket (FIONREAD) failed");
if (available)
return net_acceptsocket;
return -1;

View file

@ -947,7 +947,7 @@ CL_TimeFrames_AddTimestamp (void)
((cl_timeframes_index / CL_TIMEFRAMES_ARRAYBLOCK) + 1) *
CL_TIMEFRAMES_ARRAYBLOCK);
if (cl_timeframes_array == NULL)
Sys_Error ("Unable to allocate timeframes buffer\n");
Sys_Error ("Unable to allocate timeframes buffer");
cl_timeframes_array[cl_timeframes_index] = Sys_DoubleTime ();
cl_timeframes_index++;
}

View file

@ -1412,7 +1412,7 @@ Host_Error (const char *error, ...)
if (host_initialized) {
longjmp (host_abort, 1);
} else {
Sys_Error ("Host_Error: %s\n", string);
Sys_Error ("Host_Error: %s", string);
}
}
@ -1638,7 +1638,7 @@ CL_Init_Memory (void)
mem_base = malloc (mem_size);
if (!mem_base)
Sys_Error ("Can't allocate %d\n", mem_size);
Sys_Error ("Can't allocate %d", mem_size);
Sys_PageIn (mem_base, mem_size);
Memory_Init (mem_base, mem_size);

View file

@ -129,7 +129,7 @@ SL_Add (server_entry_t *start, char *ip, char *desc)
start->server = malloc (strlen (ip) + 1);
start->desc = malloc (strlen (desc ? desc : ip) + 1);
if (!start->server || !start->desc)
Sys_Error ("SL_Add: Memory Allocation Failure\n");
Sys_Error ("SL_Add: Memory Allocation Failure");
strcpy (start->server, ip);
strcpy (start->desc, desc ? desc : ip);
start->status = NULL;
@ -146,7 +146,7 @@ SL_Add (server_entry_t *start, char *ip, char *desc)
p->next->server = malloc (strlen (ip) + 1);
p->next->desc = malloc (strlen (desc ? desc : ip) + 1);
if (!p->next->server || !p->next->desc)
Sys_Error ("SL_Add: Memory Allocation Failure\n");
Sys_Error ("SL_Add: Memory Allocation Failure");
strcpy (p->next->server, ip);
strcpy (p->next->desc, desc ? desc : ip);
@ -191,7 +191,7 @@ SL_InsB (server_entry_t *start, server_entry_t *place, char *ip, char *desc)
new->server = malloc (strlen (ip) + 1);
new->desc = malloc (strlen (desc) + 1);
if (!new->server || !new->desc)
Sys_Error ("SL_InsB: Memory Allocation Failure\n");
Sys_Error ("SL_InsB: Memory Allocation Failure");
strcpy (new->server, ip);
strcpy (new->desc, desc);
other = place->prev;
@ -637,7 +637,7 @@ SL_LoadF (VFile *f, server_entry_t *start)
len = gettoklen (line, 1, ' ');
addr = malloc (len + 1);
if (!addr)
Sys_Error ("SL_LoadF: Memory Allocation Failure\n");
Sys_Error ("SL_LoadF: Memory Allocation Failure");
strncpy (addr, &line[0], len);
addr[len] = '\0';
if ((st = gettokstart (line, 2, ' '))) {

View file

@ -99,7 +99,7 @@ locs_add (const vec3_t location, const char *name)
locations[num] = malloc (sizeof (location_t));
if (!locations[num])
Sys_Error ("locs_add: Memory Allocation Failure\n");
Sys_Error ("locs_add: Memory Allocation Failure");
locations[num]->loc[0] = location[0];
locations[num]->loc[1] = location[1];

View file

@ -394,7 +394,7 @@ SV_Map_f (void)
SV_Printf ("Can't find %s\n", expanded);
// If curlevel == level, something is SCREWED! --KB
if (strcaseequal (level, curlevel))
Sys_Error ("map: cannot restart level\n");
Sys_Error ("map: cannot restart level");
else
Cbuf_AddText (va ("map %s", curlevel));
return;

View file

@ -1155,7 +1155,7 @@ SV_PrintIP (byte *ip)
if (!inet_ntop (AF_INET, ip, buf, INET_ADDRSTRLEN))
# endif
#endif
Sys_Error ("SV_CleanIPList: inet_ntop_failed. wtf?\n");
Sys_Error ("SV_CleanIPList: inet_ntop_failed. wtf?");
return buf;
}
@ -1244,7 +1244,7 @@ SV_StringToFilter (const char *address, ipfilter_t *f)
s = strdup (address);
if (!s)
Sys_Error ("SV_StringToFilter: memory allocation failure\n");
Sys_Error ("SV_StringToFilter: memory allocation failure");
// Parse out the mask (the /8 part)
if ((slash = strchr (s, '/'))) {
@ -2384,7 +2384,7 @@ SV_Init_Memory (void)
mem_base = malloc (mem_size);
if (!mem_base)
Sys_Error ("Can't allocate %d\n", mem_size);
Sys_Error ("Can't allocate %d", mem_size);
Memory_Init (mem_base, mem_size);
}

View file

@ -179,7 +179,7 @@ SV_LoadProgs (void)
PR_LoadProgs (&sv_pr_state, sv_progs->string, MAX_EDICTS, 0);
if (!sv_pr_state.progs)
Sys_Error ("SV_LoadProgs: couldn't load %s\n", sv_progs->string);
Sys_Error ("SV_LoadProgs: couldn't load %s", sv_progs->string);
// progs engine needs these globals anyway
sv_globals.self = sv_pr_state.globals.self;
sv_globals.time = sv_pr_state.globals.time;

View file

@ -228,7 +228,7 @@ SV_PrintToClient (client_t *cl, int level, const char *string)
free (buffer);
buffer = malloc (buffer_size);
if (!buffer)
Sys_Error ("SV_PrintToClient: could not allocate %d bytes\n",
Sys_Error ("SV_PrintToClient: could not allocate %d bytes",
buffer_size);
}

View file

@ -225,7 +225,7 @@ LoadFile (char *filename, void **bufferptr)
length = FileLength (f);
buffer = malloc (length + 1);
if (!buffer)
Sys_Error ("LoadFile: Memory Allocation Failure\n");
Sys_Error ("LoadFile: Memory Allocation Failure");
((char *) buffer)[length] = 0;
SafeRead (f, buffer, length);
fclose (f);

View file

@ -349,7 +349,7 @@ new_label_name (void)
char *lname = malloc (len);
if (!lname)
Sys_Error ("new_label_expr: Memory Allocation Failure\n");
Sys_Error ("new_label_expr: Memory Allocation Failure");
snprintf (lname, len, "$%s_%d", fname, lnum);
return lname;
}
@ -602,7 +602,7 @@ do_op_string (int op, expr_t *e1, expr_t *e2)
len = strlen (s1) + strlen (s2) + 1;
buf = malloc (len);
if (!buf)
Sys_Error ("do_op_string: Memory Allocation Failure\n");
Sys_Error ("do_op_string: Memory Allocation Failure");
strcpy (buf, s1);
strcat (buf, s2);
e1->e.string_val = buf;
@ -1571,7 +1571,7 @@ function_expr (expr_t *e1, expr_t *e2)
ret->e.def = memcpy (malloc (sizeof (def_t)), &def_ret, sizeof (def_t));
if (!ret->e.def)
Sys_Error ("function_expr: Memory Allocation Failure\n");
Sys_Error ("function_expr: Memory Allocation Failure");
ret->e.def->type = ftype->aux_type;
call->e.block.result = ret;
}

View file

@ -269,7 +269,7 @@ PR_FreeLocation (def_t *def)
free_free_locs = malloc (256 * sizeof (locref_t));
if (!free_free_locs)
Sys_Error ("PR_FreeLocation: Memory Allocation Failure\n");
Sys_Error ("PR_FreeLocation: Memory Allocation Failure");
for (loc = free_free_locs; loc - free_free_locs < 255; loc++)
loc->next = loc + 1;
loc->next = 0;

View file

@ -377,7 +377,7 @@ add_frame_macro (char *token)
{
frame_t *frame = malloc (sizeof (frame_t));
if (!frame)
Sys_Error ("add_frame_macro: Memory Allocation Failure\n");
Sys_Error ("add_frame_macro: Memory Allocation Failure");
frame->name = strdup (token);
frame->num = frame_number++;
@ -404,7 +404,7 @@ make_string (char *token)
s = str = malloc (strlen (token) + 1);
if (!str)
Sys_Error ("make_string: Memory Allocation Failure\n");
Sys_Error ("make_string: Memory Allocation Failure");
mask = 0x00;
boldnext = 0;

View file

@ -1275,7 +1275,7 @@ scan_scope (hashtab_t *tab, def_t *scope)
if (def->name && !def->removed) {
def_state_t *ds = malloc (sizeof (def_state_t));
if (!ds)
Sys_Error ("scan_scope: Memory Allocation Failure\n");
Sys_Error ("scan_scope: Memory Allocation Failure");
ds->def = def;
ds->state = def->initialized;
Hash_Add (tab, ds);
@ -1306,7 +1306,7 @@ merge_local_inits (hashtab_t *dl_1, hashtab_t *dl_2)
nds = malloc (sizeof (def_state_t));
if (!nds)
Sys_Error ("merge_local_inits: Memory Allocation Failure\n");
Sys_Error ("merge_local_inits: Memory Allocation Failure");
nds->def = (*ds)->def;
nds->state = (*ds)->state && d->state;
Hash_Add (tab, nds);

View file

@ -75,7 +75,7 @@ case_label_expr (switch_block_t *switch_block, expr_t *value)
case_label_t *cl = malloc (sizeof (case_label_t));
if (!cl)
Sys_Error ("case_label_expr: Memory Allocation Failure\n");
Sys_Error ("case_label_expr: Memory Allocation Failure");
if (value)
convert_name (value);
@ -106,7 +106,7 @@ new_switch_block (void)
switch_block_t *switch_block = malloc (sizeof (switch_block_t));
if (!switch_block)
Sys_Error ("new_switch_block: Memory Allocation Failure\n");
Sys_Error ("new_switch_block: Memory Allocation Failure");
switch_block->labels = Hash_NewTable (127, 0, 0, 0);
Hash_SetHashCompare (switch_block->labels, get_hash, compare);
switch_block->test = 0;

View file

@ -122,7 +122,7 @@ find_type (type_t *type)
// allocate a new one
check = malloc (sizeof (*check));
if (!check)
Sys_Error ("find_type: Memory Allocation Failure\n");
Sys_Error ("find_type: Memory Allocation Failure");
*check = *type;
chain_type (check);

View file

@ -106,7 +106,7 @@ fix_missing_globals (progs_t *pr, def_t *globals)
progs = malloc (pr->progs_size + strings_size);
if (!progs)
Sys_Error ("fix_missing_globals: Memory Allocation Failure\n");
Sys_Error ("fix_missing_globals: Memory Allocation Failure");
memcpy (progs, pr->progs, pr->progs_size);
offs = progs->ofs_strings + progs->numstrings;

View file

@ -65,7 +65,7 @@ main ()
Cmd_Init_Hash ();
membase = malloc (memsize);
if (!membase)
Sys_Error ("Memory Allocation Failure\n");
Sys_Error ("Memory Allocation Failure");
Memory_Init (membase, memsize);
Cvar_Init ();
Cbuf_Init ();
@ -100,7 +100,7 @@ main ()
Qclose (f);
}
if (!progs.progs)
Sys_Error ("couldn't load %s\n", "qwaq.dat");
Sys_Error ("couldn't load %s", "qwaq.dat");
if (!PR_ResolveGlobals (&progs))
PR_Error (&progs, "unable to load %s", progs.progs_name);