From: havoc Date: Mon, 7 Nov 2005 12:37:15 +0000 (+0000) Subject: removed \n from all Host_Error, Sys_Error, PRVM_ERROR, PF_ERROR calls, since Host_Err... X-Git-Tag: xonotic-v0.1.0preview~4483 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fab6eb344365652bd53d03faa1ea43e14fbe1d7f;p=xonotic%2Fdarkplaces.git removed \n from all Host_Error, Sys_Error, PRVM_ERROR, PF_ERROR calls, since Host_Error/Sys_Error add their own \n as needed git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5801 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_main.c b/cl_main.c index 241b278c..fa535661 100644 --- a/cl_main.c +++ b/cl_main.c @@ -202,9 +202,9 @@ void CL_ExpandEntities(int num) if (num >= cl_max_entities) { if (!cl_entities) - Sys_Error("CL_ExpandEntities: cl_entities not initialized\n"); + Sys_Error("CL_ExpandEntities: cl_entities not initialized"); if (num >= MAX_EDICTS) - Host_Error("CL_ExpandEntities: num %i >= %i\n", num, MAX_EDICTS); + Host_Error("CL_ExpandEntities: num %i >= %i", num, MAX_EDICTS); oldmaxentities = cl_max_entities; oldentities = cl_entities; cl_max_entities = (num & ~255) + 256; diff --git a/cl_parse.c b/cl_parse.c index e2769baa..f32d9b48 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -350,7 +350,7 @@ void CL_ParseServerInfo (void) protocol = Protocol_EnumForNumber(i); if (protocol == PROTOCOL_UNKNOWN) { - Host_Error("CL_ParseServerInfo: Server is unrecognized protocol number (%i)\n", i); + Host_Error("CL_ParseServerInfo: Server is unrecognized protocol number (%i)", i); return; } // hack for unmarked Nehahra movie demos which had a custom protocol @@ -363,7 +363,7 @@ void CL_ParseServerInfo (void) cl.maxclients = MSG_ReadByte (); if (cl.maxclients < 1 || cl.maxclients > MAX_SCOREBOARD) { - Host_Error("Bad maxclients (%u) from server\n", cl.maxclients); + Host_Error("Bad maxclients (%u) from server", cl.maxclients); return; } cl.scores = (scoreboard_t *)Mem_Alloc(cl_mempool, cl.maxclients*sizeof(*cl.scores)); @@ -400,7 +400,7 @@ void CL_ParseServerInfo (void) if (!str[0]) break; if (nummodels==MAX_MODELS) - Host_Error ("Server sent too many model precaches\n"); + Host_Error ("Server sent too many model precaches"); if (strlen(str) >= MAX_QPATH) Host_Error ("Server sent a precache name of %i characters (max %i)", strlen(str), MAX_QPATH - 1); strlcpy (parse_model_precache[nummodels], str, sizeof (parse_model_precache[nummodels])); @@ -412,7 +412,7 @@ void CL_ParseServerInfo (void) if (!str[0]) break; if (numsounds==MAX_SOUNDS) - Host_Error("Server sent too many sound precaches\n"); + Host_Error("Server sent too many sound precaches"); if (strlen(str) >= MAX_QPATH) Host_Error("Server sent a precache name of %i characters (max %i)", strlen(str), MAX_QPATH - 1); strlcpy (parse_sound_precache[numsounds], str, sizeof (parse_sound_precache[numsounds])); @@ -501,7 +501,7 @@ void CL_ValidateState(entity_state_t *s) return; if (s->modelindex >= MAX_MODELS) - Host_Error("CL_ValidateState: modelindex (%i) >= MAX_MODELS (%i)\n", s->modelindex, MAX_MODELS); + Host_Error("CL_ValidateState: modelindex (%i) >= MAX_MODELS (%i)", s->modelindex, MAX_MODELS); // colormap is client index + 1 if ((!s->flags & RENDER_COLORMAPPED) && s->colormap > cl.maxclients) @@ -1409,7 +1409,7 @@ void CL_ParseServerMessage(void) } description[strlen(description)-1] = '\n'; // replace the last space with a newline Con_Print(description); - Host_Error ("CL_ParseServerMessage: Illegible server message\n"); + Host_Error ("CL_ParseServerMessage: Illegible server message"); } break; @@ -1432,7 +1432,7 @@ void CL_ParseServerMessage(void) i = MSG_ReadLong (); protocol = Protocol_EnumForNumber(i); if (protocol == PROTOCOL_UNKNOWN) - Host_Error("CL_ParseServerMessage: Server is unrecognized protocol number (%i)\n", i); + Host_Error("CL_ParseServerMessage: Server is unrecognized protocol number (%i)", i); // hack for unmarked Nehahra movie demos which had a custom protocol if (protocol == PROTOCOL_QUAKEDP && cls.demoplayback && demo_nehahra.integer) protocol = PROTOCOL_NEHAHRAMOVIE; @@ -1475,7 +1475,7 @@ void CL_ParseServerMessage(void) case svc_setview: cl.viewentity = (unsigned short)MSG_ReadShort (); if (cl.viewentity >= MAX_EDICTS) - Host_Error("svc_setview >= MAX_EDICTS\n"); + Host_Error("svc_setview >= MAX_EDICTS"); if (cl.viewentity >= cl_max_entities) CL_ExpandEntities(cl.viewentity); // LordHavoc: assume first setview recieved is the real player entity diff --git a/cl_particles.c b/cl_particles.c index 55f9ac68..b772d9ff 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -1216,7 +1216,7 @@ void CL_RocketTrail (vec3_t start, vec3_t end, int type, int color, entity_t *en break; #endif default: - Sys_Error("CL_RocketTrail: unknown trail type %i\n", type); + Sys_Error("CL_RocketTrail: unknown trail type %i", type); } // advance to next time and position diff --git a/collision.c b/collision.c index be5fd1ba..6800f05f 100644 --- a/collision.c +++ b/collision.c @@ -511,7 +511,7 @@ colbrushf_t *Collision_AllocBrushFromPermanentPolygonFloat(mempool_t *mempool, i brush->numplanes = numpoints + 2; brush->planes = (colplanef_t *)(brush + 1); brush->points = (colpointf_t *)points; - Sys_Error("Collision_AllocBrushFromPermanentPolygonFloat: FIXME: this code needs to be updated to generate a mesh...\n"); + Sys_Error("Collision_AllocBrushFromPermanentPolygonFloat: FIXME: this code needs to be updated to generate a mesh..."); return brush; } diff --git a/common.c b/common.c index 391d840f..00794c98 100644 --- a/common.c +++ b/common.c @@ -509,10 +509,10 @@ unsigned char *SZ_GetSpace (sizebuf_t *buf, int length) if (buf->cursize + length > buf->maxsize) { if (!buf->allowoverflow) - Host_Error ("SZ_GetSpace: overflow without allowoverflow set\n"); + Host_Error ("SZ_GetSpace: overflow without allowoverflow set"); if (length > buf->maxsize) - Host_Error ("SZ_GetSpace: %i is > full buffer size\n", length); + Host_Error ("SZ_GetSpace: %i is > full buffer size", length); buf->overflowed = true; Con_Print("SZ_GetSpace: overflow\n"); diff --git a/gl_backend.c b/gl_backend.c index 677da0e4..320e7e73 100644 --- a/gl_backend.c +++ b/gl_backend.c @@ -73,7 +73,7 @@ void GL_PrintError(int errornumber, char *filename, int linenumber) } #endif -#define BACKENDACTIVECHECK if (!backendactive) Sys_Error("GL backend function called when backend is not active\n"); +#define BACKENDACTIVECHECK if (!backendactive) Sys_Error("GL backend function called when backend is not active"); void SCR_ScreenShot_f (void); diff --git a/gl_textures.c b/gl_textures.c index 1a2889e7..537438fa 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -140,6 +140,11 @@ static int realmaxsize = 0; static textypeinfo_t *R_GetTexTypeInfo(int textype, int flags) { + if ((flags & (TEXF_PICMIP | TEXF_FRAGMENT)) == (TEXF_PICMIP | TEXF_FRAGMENT)) + { + Host_Error("R_GetTexTypeInfo: TEXF_PICMIP can not be used with TEXF_FRAGMENT"); + return NULL; + } if (flags & TEXF_ALPHA) { switch(textype) @@ -147,12 +152,12 @@ static textypeinfo_t *R_GetTexTypeInfo(int textype, int flags) case TEXTYPE_PALETTE: return &textype_palette_alpha; case TEXTYPE_RGB: - Host_Error("R_GetTexTypeInfo: RGB format has no alpha, TEXF_ALPHA not allowed\n"); + Host_Error("R_GetTexTypeInfo: RGB format has no alpha, TEXF_ALPHA not allowed"); return NULL; case TEXTYPE_RGBA: return &textype_rgba_alpha; default: - Host_Error("R_GetTexTypeInfo: unknown texture format\n"); + Host_Error("R_GetTexTypeInfo: unknown texture format"); return NULL; } } @@ -169,7 +174,7 @@ static textypeinfo_t *R_GetTexTypeInfo(int textype, int flags) case TEXTYPE_DSDT: return &textype_dsdt; default: - Host_Error("R_GetTexTypeInfo: unknown texture format\n"); + Host_Error("R_GetTexTypeInfo: unknown texture format"); return NULL; } } @@ -215,13 +220,13 @@ void R_FreeTexture(rtexture_t *rt) glt = (gltexture_t *)rt; if (glt == NULL) - Host_Error("R_FreeTexture: texture == NULL\n"); + Host_Error("R_FreeTexture: texture == NULL"); for (gltpointer = &glt->pool->gltchain;*gltpointer && *gltpointer != glt;gltpointer = &(*gltpointer)->chain); if (*gltpointer == glt) *gltpointer = glt->chain; else - Host_Error("R_FreeTexture: texture \"%s\" not linked in pool\n", glt->identifier); + Host_Error("R_FreeTexture: texture \"%s\" not linked in pool", glt->identifier); // note: if freeing a fragment texture, this will not make the claimed // space available for new textures unless all other fragments in the @@ -236,7 +241,7 @@ void R_FreeTexture(rtexture_t *rt) if (*gltimagepointer == image) *gltimagepointer = image->imagechain; else - Host_Error("R_FreeTexture: image not linked in pool\n"); + Host_Error("R_FreeTexture: image not linked in pool"); if (image->texnum) qglDeleteTextures(1, (GLuint *)&image->texnum); if (image->blockallocation) @@ -274,12 +279,12 @@ void R_FreeTexturePool(rtexturepool_t **rtexturepool) pool = (gltexturepool_t *)(*rtexturepool); *rtexturepool = NULL; if (pool->sentinel != TEXTUREPOOL_SENTINEL) - Host_Error("R_FreeTexturePool: pool already freed\n"); + Host_Error("R_FreeTexturePool: pool already freed"); for (poolpointer = &gltexturepoolchain;*poolpointer && *poolpointer != pool;poolpointer = &(*poolpointer)->next); if (*poolpointer == pool) *poolpointer = pool->next; else - Host_Error("R_FreeTexturePool: pool not linked\n"); + Host_Error("R_FreeTexturePool: pool not linked"); while (pool->gltchain) R_FreeTexture((rtexture_t *)pool->gltchain); if (pool->imagechain) @@ -576,7 +581,7 @@ void R_MakeResizeBufferBigger(int size) resizebuffer = (unsigned char *)Mem_Alloc(texturemempool, resizebuffersize); colorconvertbuffer = (unsigned char *)Mem_Alloc(texturemempool, resizebuffersize); if (!resizebuffer || !colorconvertbuffer) - Host_Error("R_Upload: out of memory\n"); + Host_Error("R_Upload: out of memory"); } } @@ -688,7 +693,7 @@ static void R_Upload(gltexture_t *glt, unsigned char *data) CHECKGLERROR break; default: - Host_Error("R_Upload: fragment texture of type other than 1D, 2D, or 3D\n"); + Host_Error("R_Upload: fragment texture of type other than 1D, 2D, or 3D"); break; } GL_SetupTextureParameters(glt->image->flags, glt->image->texturetype); @@ -724,7 +729,7 @@ static void R_Upload(gltexture_t *glt, unsigned char *data) CHECKGLERROR break; default: - Host_Error("R_Upload: fragment texture of type other than 1D, 2D, or 3D\n"); + Host_Error("R_Upload: fragment texture of type other than 1D, 2D, or 3D"); break; } } @@ -1067,7 +1072,7 @@ static rtexture_t *R_SetupTexture(rtexturepool_t *rtexturepool, const char *iden break; case TEXTYPE_RGB: if (flags & TEXF_ALPHA) - Host_Error("R_LoadTexture: RGB has no alpha, don't specify TEXF_ALPHA\n"); + Host_Error("R_LoadTexture: RGB has no alpha, don't specify TEXF_ALPHA"); break; case TEXTYPE_RGBA: if (flags & TEXF_ALPHA) @@ -1089,7 +1094,7 @@ static rtexture_t *R_SetupTexture(rtexturepool_t *rtexturepool, const char *iden case TEXTYPE_DSDT: break; default: - Host_Error("R_LoadTexture: unknown texture type\n"); + Host_Error("R_LoadTexture: unknown texture type"); } glt = (gltexture_t *)Mem_Alloc(texturemempool, sizeof(gltexture_t)); @@ -1189,7 +1194,7 @@ void R_FragmentLocation3D(rtexture_t *rt, int *x, int *y, int *z, float *fx1, fl return; } if (!rt) - Host_Error("R_FragmentLocation: no texture supplied\n"); + Host_Error("R_FragmentLocation: no texture supplied"); glt = (gltexture_t *)rt; if (glt->flags & TEXF_FRAGMENT) { @@ -1256,9 +1261,9 @@ void R_UpdateTexture(rtexture_t *rt, unsigned char *data) { gltexture_t *glt; if (rt == NULL) - Host_Error("R_UpdateTexture: no texture supplied\n"); + Host_Error("R_UpdateTexture: no texture supplied"); if (data == NULL) - Host_Error("R_UpdateTexture: no data supplied\n"); + Host_Error("R_UpdateTexture: no data supplied"); glt = (gltexture_t *)rt; // if it has not been uploaded yet, update the data that will be used when it is diff --git a/host.c b/host.c index 403a5fb4..eaa32155 100644 --- a/host.c +++ b/host.c @@ -148,7 +148,7 @@ void Host_Error (const char *error, ...) Host_ShutdownServer (false); if (cls.state == ca_dedicated) - Sys_Error ("Host_Error: %s\n",hosterrorstring2); // dedicated servers exit + Sys_Error ("Host_Error: %s",hosterrorstring2); // dedicated servers exit CL_Disconnect (); cls.demonum = -1; diff --git a/host_cmd.c b/host_cmd.c index 38678a0e..b3fd8db6 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -680,7 +680,7 @@ void Host_Loadgame_f (void) if (entnum >= MAX_EDICTS) { Mem_Free(text); - Host_Error("Host_PerformLoadGame: too many edicts in save file (reached MAX_EDICTS %i)\n", MAX_EDICTS); + Host_Error("Host_PerformLoadGame: too many edicts in save file (reached MAX_EDICTS %i)", MAX_EDICTS); } while (entnum >= prog->max_edicts) //SV_IncreaseEdicts(); diff --git a/model_alias.c b/model_alias.c index 5d24ba6b..64258007 100644 --- a/model_alias.c +++ b/model_alias.c @@ -89,7 +89,7 @@ void Mod_Alias_GetMesh_Vertex3f(const model_t *model, const frameblend_t *frameb const float *vertsbase, *verts1, *verts2, *verts3, *verts4; // vertex morph if (!mesh->data_morphvertex3f) - Host_Error("model %s has no skeletal or vertex morph animation data\n", model->name); + Host_Error("model %s has no skeletal or vertex morph animation data", model->name); vertsbase = mesh->data_morphvertex3f; vertcount = mesh->num_vertices; verts1 = vertsbase + frameblend[0].frame * vertcount * 3; @@ -432,8 +432,8 @@ static void Mod_BuildAliasSkinsFromSkinFiles(texture_t *skin, skinfile_t *skinfi } } -#define BOUNDI(VALUE,MIN,MAX) if (VALUE < MIN || VALUE >= MAX) Host_Error("model %s has an invalid ##VALUE (%d exceeds %d - %d)\n", loadmodel->name, VALUE, MIN, MAX); -#define BOUNDF(VALUE,MIN,MAX) if (VALUE < MIN || VALUE >= MAX) Host_Error("model %s has an invalid ##VALUE (%f exceeds %f - %f)\n", loadmodel->name, VALUE, MIN, MAX); +#define BOUNDI(VALUE,MIN,MAX) if (VALUE < MIN || VALUE >= MAX) Host_Error("model %s has an invalid ##VALUE (%d exceeds %d - %d)", loadmodel->name, VALUE, MIN, MAX); +#define BOUNDF(VALUE,MIN,MAX) if (VALUE < MIN || VALUE >= MAX) Host_Error("model %s has an invalid ##VALUE (%f exceeds %f - %f)", loadmodel->name, VALUE, MIN, MAX); void Mod_IDP0_Load(model_t *mod, void *buffer, void *bufferend) { int i, j, version, totalskins, skinwidth, skinheight, groupframes, groupskins, numverts; @@ -1017,7 +1017,7 @@ void Mod_IDP3_Load(model_t *mod, void *buffer, void *bufferend) pinmodel = (md3modelheader_t *)buffer; if (memcmp(pinmodel->identifier, "IDP3", 4)) - Host_Error ("%s is not a MD3 (IDP3) file\n", loadmodel->name); + Host_Error ("%s is not a MD3 (IDP3) file", loadmodel->name); version = LittleLong (pinmodel->version); if (version != MD3VERSION) Host_Error ("%s has wrong version number (%i should be %i)", @@ -1096,7 +1096,7 @@ void Mod_IDP3_Load(model_t *mod, void *buffer, void *bufferend) for (i = 0, pinmesh = (md3mesh_t *)((unsigned char *)pinmodel + LittleLong(pinmodel->lump_meshes));i < loadmodel->num_surfaces;i++, pinmesh = (md3mesh_t *)((unsigned char *)pinmesh + LittleLong(pinmesh->lump_end))) { if (memcmp(pinmesh->identifier, "IDP3", 4)) - Host_Error("Mod_IDP3_Load: invalid mesh identifier (not IDP3)\n"); + Host_Error("Mod_IDP3_Load: invalid mesh identifier (not IDP3)"); mesh = loadmodel->meshlist[i]; mesh->num_morphframes = LittleLong(pinmesh->num_frames); mesh->num_vertices = LittleLong(pinmesh->num_vertices); @@ -1159,9 +1159,9 @@ void Mod_ZYMOTICMODEL_Load(model_t *mod, void *buffer, void *bufferend) pinmodel = (zymtype1header_t *)buffer; pbase = (unsigned char *)buffer; if (memcmp(pinmodel->id, "ZYMOTICMODEL", 12)) - Host_Error ("Mod_ZYMOTICMODEL_Load: %s is not a zymotic model\n"); + Host_Error ("Mod_ZYMOTICMODEL_Load: %s is not a zymotic model"); if (BigLong(pinmodel->type) != 1) - Host_Error ("Mod_ZYMOTICMODEL_Load: only type 1 (skeletal pose) models are currently supported (name = %s)\n", loadmodel->name); + Host_Error ("Mod_ZYMOTICMODEL_Load: only type 1 (skeletal pose) models are currently supported (name = %s)", loadmodel->name); loadmodel->type = mod_alias; loadmodel->DrawSky = NULL; @@ -1259,11 +1259,11 @@ void Mod_ZYMOTICMODEL_Load(model_t *mod, void *buffer, void *bufferend) loadmodel->animscenes[i].framerate = BigFloat(scene->framerate); loadmodel->animscenes[i].loop = (BigLong(scene->flags) & ZYMSCENEFLAG_NOLOOP) == 0; if ((unsigned int) loadmodel->animscenes[i].firstframe >= (unsigned int) numposes) - Host_Error("%s scene->firstframe (%i) >= numposes (%i)\n", loadmodel->name, loadmodel->animscenes[i].firstframe, numposes); + Host_Error("%s scene->firstframe (%i) >= numposes (%i)", loadmodel->name, loadmodel->animscenes[i].firstframe, numposes); if ((unsigned int) loadmodel->animscenes[i].firstframe + (unsigned int) loadmodel->animscenes[i].framecount > (unsigned int) numposes) - Host_Error("%s scene->firstframe (%i) + framecount (%i) >= numposes (%i)\n", loadmodel->name, loadmodel->animscenes[i].firstframe, loadmodel->animscenes[i].framecount, numposes); + Host_Error("%s scene->firstframe (%i) + framecount (%i) >= numposes (%i)", loadmodel->name, loadmodel->animscenes[i].firstframe, loadmodel->animscenes[i].framecount, numposes); if (loadmodel->animscenes[i].framerate < 0) - Host_Error("%s scene->framerate (%f) < 0\n", loadmodel->name, loadmodel->animscenes[i].framerate); + Host_Error("%s scene->framerate (%f) < 0", loadmodel->name, loadmodel->animscenes[i].framerate); scene++; } @@ -1284,7 +1284,7 @@ void Mod_ZYMOTICMODEL_Load(model_t *mod, void *buffer, void *bufferend) loadmodel->data_bones[i].flags = BigLong(bone[i].flags); loadmodel->data_bones[i].parent = BigLong(bone[i].parent); if (loadmodel->data_bones[i].parent >= i) - Host_Error("%s bone[%i].parent >= %i\n", loadmodel->name, i, i); + Host_Error("%s bone[%i].parent >= %i", loadmodel->name, i, i); } //zymlump_t lump_vertbonecounts; // int vertbonecounts[numvertices]; // how many bones influence each vertex (separate mainly to make this compress better) @@ -1294,7 +1294,7 @@ void Mod_ZYMOTICMODEL_Load(model_t *mod, void *buffer, void *bufferend) { vertbonecounts[i] = BigLong(bonecount[i]); if (vertbonecounts[i] < 1) - Host_Error("%s bonecount[%i] < 1\n", loadmodel->name, i); + Host_Error("%s bonecount[%i] < 1", loadmodel->name, i); } //zymlump_t lump_verts; // zymvertex_t vert[numvertices]; // see vertex struct @@ -1341,16 +1341,16 @@ void Mod_ZYMOTICMODEL_Load(model_t *mod, void *buffer, void *bufferend) // byteswap, validate, and swap winding order of tris count = pheader->numshaders * sizeof(int) + pheader->numtris * sizeof(int[3]); if (pheader->lump_render.length != count) - Host_Error("%s renderlist is wrong size (%i bytes, should be %i bytes)\n", loadmodel->name, pheader->lump_render.length, count); + Host_Error("%s renderlist is wrong size (%i bytes, should be %i bytes)", loadmodel->name, pheader->lump_render.length, count); renderlist = (int *) (pheader->lump_render.start + pbase); renderlistend = (int *) ((unsigned char *) renderlist + pheader->lump_render.length); for (i = 0;i < loadmodel->num_surfaces;i++) { if (renderlist >= renderlistend) - Host_Error("%s corrupt renderlist (wrong size)\n", loadmodel->name); + Host_Error("%s corrupt renderlist (wrong size)", loadmodel->name); count = BigLong(*renderlist);renderlist++; if (renderlist + count * 3 > renderlistend || (i == pheader->numshaders - 1 && renderlist + count * 3 != renderlistend)) - Host_Error("%s corrupt renderlist (wrong size)\n", loadmodel->name); + Host_Error("%s corrupt renderlist (wrong size)", loadmodel->name); mesh = loadmodel->meshlist[i]; mesh->num_triangles = count; mesh->data_element3i = (int *)Mem_Alloc(loadmodel->mempool, mesh->num_triangles * sizeof(int[3])); @@ -1364,9 +1364,9 @@ void Mod_ZYMOTICMODEL_Load(model_t *mod, void *buffer, void *bufferend) if ((unsigned int)outelements[0] >= (unsigned int)pheader->numverts || (unsigned int)outelements[1] >= (unsigned int)pheader->numverts || (unsigned int)outelements[2] >= (unsigned int)pheader->numverts) - Host_Error("%s corrupt renderlist (out of bounds index)\n", loadmodel->name); + Host_Error("%s corrupt renderlist (out of bounds index)", loadmodel->name); if (vertbonecounts[outelements[0]] == 0 || vertbonecounts[outelements[1]] == 0 || vertbonecounts[outelements[2]] == 0) - Host_Error("%s corrupt renderlist (references vertex with no bone weights\n", loadmodel->name); + Host_Error("%s corrupt renderlist (references vertex with no bone weights", loadmodel->name); renderlist += 3; outelements += 3; } @@ -1452,9 +1452,9 @@ void Mod_DARKPLACESMODEL_Load(model_t *mod, void *buffer, void *bufferend) pheader = (dpmheader_t *)buffer; pbase = (unsigned char *)buffer; if (memcmp(pheader->id, "DARKPLACESMODEL\0", 16)) - Host_Error ("Mod_DARKPLACESMODEL_Load: %s is not a darkplaces model\n"); + Host_Error ("Mod_DARKPLACESMODEL_Load: %s is not a darkplaces model"); if (BigLong(pheader->type) != 2) - Host_Error ("Mod_DARKPLACESMODEL_Load: only type 2 (hierarchical skeletal pose) models are currently supported (name = %s)\n", loadmodel->name); + Host_Error ("Mod_DARKPLACESMODEL_Load: only type 2 (hierarchical skeletal pose) models are currently supported (name = %s)", loadmodel->name); loadmodel->type = mod_alias; loadmodel->DrawSky = NULL; @@ -1538,7 +1538,7 @@ void Mod_DARKPLACESMODEL_Load(model_t *mod, void *buffer, void *bufferend) loadmodel->data_bones[i].flags = BigLong(bone[i].flags); loadmodel->data_bones[i].parent = BigLong(bone[i].parent); if (loadmodel->data_bones[i].parent >= i) - Host_Error("%s bone[%i].parent >= %i\n", loadmodel->name, i, i); + Host_Error("%s bone[%i].parent >= %i", loadmodel->name, i, i); } // load the frames @@ -1684,7 +1684,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) pchunk = (pskchunk_t *)buffer; if (strcmp(pchunk->id, "ACTRHEAD")) - Host_Error ("Mod_PSKMODEL_Load: %s is not a ActorX model\n"); + Host_Error ("Mod_PSKMODEL_Load: %s is not an Unreal Engine ActorX (.psk + .psa) model"); loadmodel->type = mod_alias; loadmodel->DrawSky = NULL; @@ -1714,7 +1714,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) animbuffer = animfilebuffer = FS_LoadFile(animname, loadmodel->mempool, false, &filesize); animbufferend = (void *)((unsigned char*)animbuffer + (int)filesize); if (animbuffer == NULL) - Host_Error("%s: can't find .psa file (%s)\n", loadmodel->name, animname); + Host_Error("%s: can't find .psa file (%s)", loadmodel->name, animname); numpnts = 0; pnts = NULL; @@ -1752,7 +1752,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) { pskpnts_t *p; if (recordsize != sizeof(*p)) - Host_Error("%s: %s has unsupported recordsize\n", loadmodel->name, pchunk->id); + Host_Error("%s: %s has unsupported recordsize", loadmodel->name, pchunk->id); // byteswap in place and keep the pointer numpnts = numrecords; pnts = (pskpnts_t *)buffer; @@ -1768,7 +1768,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) { pskvtxw_t *p; if (recordsize != sizeof(*p)) - Host_Error("%s: %s has unsupported recordsize\n", loadmodel->name, pchunk->id); + Host_Error("%s: %s has unsupported recordsize", loadmodel->name, pchunk->id); // byteswap in place and keep the pointer numvtxw = numrecords; vtxw = (pskvtxw_t *)buffer; @@ -1789,7 +1789,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) { pskface_t *p; if (recordsize != sizeof(*p)) - Host_Error("%s: %s has unsupported recordsize\n", loadmodel->name, pchunk->id); + Host_Error("%s: %s has unsupported recordsize", loadmodel->name, pchunk->id); // byteswap in place and keep the pointer numfaces = numrecords; faces = (pskface_t *)buffer; @@ -1821,7 +1821,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) { pskmatt_t *p; if (recordsize != sizeof(*p)) - Host_Error("%s: %s has unsupported recordsize\n", loadmodel->name, pchunk->id); + Host_Error("%s: %s has unsupported recordsize", loadmodel->name, pchunk->id); // byteswap in place and keep the pointer nummatts = numrecords; matts = (pskmatt_t *)buffer; @@ -1834,7 +1834,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) { pskboneinfo_t *p; if (recordsize != sizeof(*p)) - Host_Error("%s: %s has unsupported recordsize\n", loadmodel->name, pchunk->id); + Host_Error("%s: %s has unsupported recordsize", loadmodel->name, pchunk->id); // byteswap in place and keep the pointer numbones = numrecords; bones = (pskboneinfo_t *)buffer; @@ -1879,7 +1879,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) { pskrawweights_t *p; if (recordsize != sizeof(*p)) - Host_Error("%s: %s has unsupported recordsize\n", loadmodel->name, pchunk->id); + Host_Error("%s: %s has unsupported recordsize", loadmodel->name, pchunk->id); // byteswap in place and keep the pointer numrawweights = numrecords; rawweights = (pskrawweights_t *)buffer; @@ -1922,7 +1922,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) { pskboneinfo_t *p; if (recordsize != sizeof(*p)) - Host_Error("%s: %s has unsupported recordsize\n", animname, pchunk->id); + Host_Error("%s: %s has unsupported recordsize", animname, pchunk->id); // byteswap in place and keep the pointer numanimbones = numrecords; animbones = (pskboneinfo_t *)animbuffer; @@ -1931,7 +1931,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) // positions from the psk, but this is hard for me to implement // and people can easily make animations that match. if (numanimbones != numbones) - Host_Error("%s: this loader only supports animations with the same bones as the mesh\n"); + Host_Error("%s: this loader only supports animations with the same bones as the mesh"); for (index = 0, p = (pskboneinfo_t *)animbuffer;index < numrecords;index++, p++) { p->numchildren = LittleLong(p->numchildren); @@ -1968,7 +1968,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) } // check that bones are the same as in the base if (strcmp(p->name, bones[index].name) || p->parent != bones[index].parent) - Host_Error("%s: this loader only supports animations with the same bones as the mesh\n", animname); + Host_Error("%s: this loader only supports animations with the same bones as the mesh", animname); } animbuffer = p; } @@ -1976,7 +1976,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) { pskaniminfo_t *p; if (recordsize != sizeof(*p)) - Host_Error("%s: %s has unsupported recordsize\n", animname, pchunk->id); + Host_Error("%s: %s has unsupported recordsize", animname, pchunk->id); // byteswap in place and keep the pointer numanims = numrecords; anims = (pskaniminfo_t *)animbuffer; @@ -1998,7 +1998,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) { pskanimkeys_t *p; if (recordsize != sizeof(*p)) - Host_Error("%s: %s has unsupported recordsize\n", animname, pchunk->id); + Host_Error("%s: %s has unsupported recordsize", animname, pchunk->id); numanimkeys = numrecords; animkeys = (pskanimkeys_t *)animbuffer; for (index = 0, p = (pskanimkeys_t *)animbuffer;index < numrecords;index++, p++) @@ -2034,7 +2034,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) } if (!numpnts || !pnts || !numvtxw || !vtxw || !numfaces || !faces || !nummatts || !matts || !numbones || !bones || !numrawweights || !rawweights || !numanims || !anims || !numanimkeys || !animkeys) - Host_Error("%s: missing required chunks\n", loadmodel->name); + Host_Error("%s: missing required chunks", loadmodel->name); // FIXME: model bbox // model bbox @@ -2059,7 +2059,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) loadmodel->num_textures = loadmodel->nummeshes = loadmodel->nummodelsurfaces = loadmodel->num_surfaces = nummatts; if (numanimkeys != loadmodel->num_bones * loadmodel->numframes) - Host_Error("%s: %s has incorrect number of animation keys\n", animname, pchunk->id); + Host_Error("%s: %s has incorrect number of animation keys", animname, pchunk->id); loadmodel->data_poses = (float *)Mem_Alloc(loadmodel->mempool, loadmodel->num_poses * sizeof(float[12])); loadmodel->animscenes = (animscene_t *)Mem_Alloc(loadmodel->mempool, loadmodel->numframes * sizeof(animscene_t)); @@ -2122,7 +2122,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) strlcpy(loadmodel->data_bones[index].name, bones[index].name, sizeof(loadmodel->data_bones[index].name)); loadmodel->data_bones[index].parent = (index || bones[index].parent > 0) ? bones[index].parent : -1; if (loadmodel->data_bones[index].parent >= index) - Host_Error("%s bone[%i].parent >= %i\n", loadmodel->name, index, index); + Host_Error("%s bone[%i].parent >= %i", loadmodel->name, index, index); } // build bone-relative vertex weights from the psk point weights diff --git a/model_brush.c b/model_brush.c index 26f6098d..26e731a5 100644 --- a/model_brush.c +++ b/model_brush.c @@ -1949,7 +1949,7 @@ static void Mod_Q1BSP_GenerateWarpMesh(msurface_t *surface) subdivpolyverts = 0; SubdividePolygon(surface->num_vertices, (surface->groupmesh->data_vertex3f + 3 * surface->num_firstvertex)); if (subdivpolytriangles < 1) - Host_Error("Mod_Q1BSP_GenerateWarpMesh: no triangles?\n"); + Host_Error("Mod_Q1BSP_GenerateWarpMesh: no triangles?"); surface->mesh = mesh = Mem_Alloc(loadmodel->mempool, sizeof(surfmesh_t) + subdivpolytriangles * sizeof(int[3]) + subdivpolyverts * sizeof(surfvertex_t)); mesh->num_vertices = subdivpolyverts; @@ -2012,16 +2012,16 @@ static void Mod_Q1BSP_LoadFaces(lump_t *l) firstedge = LittleLong(in->firstedge); numedges = LittleShort(in->numedges); if ((unsigned int) firstedge > (unsigned int) loadmodel->brushq1.numsurfedges || (unsigned int) numedges > (unsigned int) loadmodel->brushq1.numsurfedges || (unsigned int) firstedge + (unsigned int) numedges > (unsigned int) loadmodel->brushq1.numsurfedges) - Host_Error("Mod_Q1BSP_LoadFaces: invalid edge range (firstedge %i, numedges %i, model edges %i)\n", firstedge, numedges, loadmodel->brushq1.numsurfedges); + Host_Error("Mod_Q1BSP_LoadFaces: invalid edge range (firstedge %i, numedges %i, model edges %i)", firstedge, numedges, loadmodel->brushq1.numsurfedges); i = LittleShort(in->texinfo); if ((unsigned int) i >= (unsigned int) loadmodel->brushq1.numtexinfo) - Host_Error("Mod_Q1BSP_LoadFaces: invalid texinfo index %i(model has %i texinfos)\n", i, loadmodel->brushq1.numtexinfo); + Host_Error("Mod_Q1BSP_LoadFaces: invalid texinfo index %i(model has %i texinfos)", i, loadmodel->brushq1.numtexinfo); surface->lightmapinfo->texinfo = loadmodel->brushq1.texinfo + i; surface->texture = surface->lightmapinfo->texinfo->texture; planenum = LittleShort(in->planenum); if ((unsigned int) planenum >= (unsigned int) loadmodel->brush.num_planes) - Host_Error("Mod_Q1BSP_LoadFaces: invalid plane index %i (model has %i planes)\n", planenum, loadmodel->brush.num_planes); + Host_Error("Mod_Q1BSP_LoadFaces: invalid plane index %i (model has %i planes)", planenum, loadmodel->brush.num_planes); //surface->flags = surface->texture->flags; //if (LittleShort(in->side)) @@ -2156,7 +2156,7 @@ static void Mod_Q1BSP_LoadFaces(lump_t *l) static void Mod_Q1BSP_LoadNodes_RecursiveSetParent(mnode_t *node, mnode_t *parent) { //if (node->parent) - // Host_Error("Mod_Q1BSP_LoadNodes_RecursiveSetParent: runaway recursion\n"); + // Host_Error("Mod_Q1BSP_LoadNodes_RecursiveSetParent: runaway recursion"); node->parent = parent; if (node->plane) { @@ -2306,7 +2306,7 @@ static void Mod_Q1BSP_LoadClipnodes(lump_t *l, hullinfo_t *hullinfo) out->children[0] = LittleShort(in->children[0]); out->children[1] = LittleShort(in->children[1]); if (out->children[0] >= count || out->children[1] >= count) - Host_Error("Corrupt clipping hull(out of range child)\n"); + Host_Error("Corrupt clipping hull(out of range child)"); } } @@ -3729,7 +3729,7 @@ void static Mod_Q2BSP_Load(model_t *mod, void *buffer, void *bufferend) int i; q2dheader_t *header; - Host_Error("Mod_Q2BSP_Load: not yet implemented\n"); + Host_Error("Mod_Q2BSP_Load: not yet implemented"); mod->type = mod_brushq2; @@ -4161,11 +4161,11 @@ static void Mod_Q3BSP_LoadBrushSides(lump_t *l) { n = LittleLong(in->planeindex); if (n < 0 || n >= loadmodel->brush.num_planes) - Host_Error("Mod_Q3BSP_LoadBrushSides: invalid planeindex %i (%i planes)\n", n, loadmodel->brush.num_planes); + Host_Error("Mod_Q3BSP_LoadBrushSides: invalid planeindex %i (%i planes)", n, loadmodel->brush.num_planes); out->plane = loadmodel->brush.data_planes + n; n = LittleLong(in->textureindex); if (n < 0 || n >= loadmodel->num_textures) - Host_Error("Mod_Q3BSP_LoadBrushSides: invalid textureindex %i (%i textures)\n", n, loadmodel->num_textures); + Host_Error("Mod_Q3BSP_LoadBrushSides: invalid textureindex %i (%i textures)", n, loadmodel->num_textures); out->texture = loadmodel->data_textures + n; } } @@ -4194,12 +4194,12 @@ static void Mod_Q3BSP_LoadBrushes(lump_t *l) n = LittleLong(in->firstbrushside); c = LittleLong(in->numbrushsides); if (n < 0 || n + c > loadmodel->brush.num_brushsides) - Host_Error("Mod_Q3BSP_LoadBrushes: invalid brushside range %i : %i (%i brushsides)\n", n, n + c, loadmodel->brush.num_brushsides); + Host_Error("Mod_Q3BSP_LoadBrushes: invalid brushside range %i : %i (%i brushsides)", n, n + c, loadmodel->brush.num_brushsides); out->firstbrushside = loadmodel->brush.data_brushsides + n; out->numbrushsides = c; n = LittleLong(in->textureindex); if (n < 0 || n >= loadmodel->num_textures) - Host_Error("Mod_Q3BSP_LoadBrushes: invalid textureindex %i (%i textures)\n", n, loadmodel->num_textures); + Host_Error("Mod_Q3BSP_LoadBrushes: invalid textureindex %i (%i textures)", n, loadmodel->num_textures); out->texture = loadmodel->data_textures + n; // make a list of mplane_t structs to construct a colbrush from @@ -4697,13 +4697,13 @@ static void Mod_Q3BSP_LoadModels(lump_t *l) n = LittleLong(in->firstface); c = LittleLong(in->numfaces); if (n < 0 || n + c > loadmodel->num_surfaces) - Host_Error("Mod_Q3BSP_LoadModels: invalid face range %i : %i (%i faces)\n", n, n + c, loadmodel->num_surfaces); + Host_Error("Mod_Q3BSP_LoadModels: invalid face range %i : %i (%i faces)", n, n + c, loadmodel->num_surfaces); out->firstface = n; out->numfaces = c; n = LittleLong(in->firstbrush); c = LittleLong(in->numbrushes); if (n < 0 || n + c > loadmodel->brush.num_brushes) - Host_Error("Mod_Q3BSP_LoadModels: invalid brush range %i : %i (%i brushes)\n", n, n + c, loadmodel->brush.num_brushes); + Host_Error("Mod_Q3BSP_LoadModels: invalid brush range %i : %i (%i brushes)", n, n + c, loadmodel->brush.num_brushes); out->firstbrush = n; out->numbrushes = c; } @@ -4728,7 +4728,7 @@ static void Mod_Q3BSP_LoadLeafBrushes(lump_t *l) { n = LittleLong(*in); if (n < 0 || n >= loadmodel->brush.num_brushes) - Host_Error("Mod_Q3BSP_LoadLeafBrushes: invalid brush index %i (%i brushes)\n", n, loadmodel->brush.num_brushes); + Host_Error("Mod_Q3BSP_LoadLeafBrushes: invalid brush index %i (%i brushes)", n, loadmodel->brush.num_brushes); *out = n; } } @@ -4752,7 +4752,7 @@ static void Mod_Q3BSP_LoadLeafFaces(lump_t *l) { n = LittleLong(*in); if (n < 0 || n >= loadmodel->num_surfaces) - Host_Error("Mod_Q3BSP_LoadLeafFaces: invalid face index %i (%i faces)\n", n, loadmodel->num_surfaces); + Host_Error("Mod_Q3BSP_LoadLeafFaces: invalid face index %i (%i faces)", n, loadmodel->num_surfaces); *out = n; } } @@ -4787,13 +4787,13 @@ static void Mod_Q3BSP_LoadLeafs(lump_t *l) n = LittleLong(in->firstleafface); c = LittleLong(in->numleaffaces); if (n < 0 || n + c > loadmodel->brush.num_leafsurfaces) - Host_Error("Mod_Q3BSP_LoadLeafs: invalid leafsurface range %i : %i (%i leafsurfaces)\n", n, n + c, loadmodel->brush.num_leafsurfaces); + Host_Error("Mod_Q3BSP_LoadLeafs: invalid leafsurface range %i : %i (%i leafsurfaces)", n, n + c, loadmodel->brush.num_leafsurfaces); out->firstleafsurface = loadmodel->brush.data_leafsurfaces + n; out->numleafsurfaces = c; n = LittleLong(in->firstleafbrush); c = LittleLong(in->numleafbrushes); if (n < 0 || n + c > loadmodel->brush.num_leafbrushes) - Host_Error("Mod_Q3BSP_LoadLeafs: invalid leafbrush range %i : %i (%i leafbrushes)\n", n, n + c, loadmodel->brush.num_leafbrushes); + Host_Error("Mod_Q3BSP_LoadLeafs: invalid leafbrush range %i : %i (%i leafbrushes)", n, n + c, loadmodel->brush.num_leafbrushes); out->firstleafbrush = loadmodel->brush.data_leafbrushes + n; out->numleafbrushes = c; } @@ -4819,7 +4819,7 @@ static void Mod_Q3BSP_LoadNodes(lump_t *l) out->parent = NULL; n = LittleLong(in->planeindex); if (n < 0 || n >= loadmodel->brush.num_planes) - Host_Error("Mod_Q3BSP_LoadNodes: invalid planeindex %i (%i planes)\n", n, loadmodel->brush.num_planes); + Host_Error("Mod_Q3BSP_LoadNodes: invalid planeindex %i (%i planes)", n, loadmodel->brush.num_planes); out->plane = loadmodel->brush.data_planes + n; for (j = 0;j < 2;j++) { @@ -4827,14 +4827,14 @@ static void Mod_Q3BSP_LoadNodes(lump_t *l) if (n >= 0) { if (n >= loadmodel->brush.num_nodes) - Host_Error("Mod_Q3BSP_LoadNodes: invalid child node index %i (%i nodes)\n", n, loadmodel->brush.num_nodes); + Host_Error("Mod_Q3BSP_LoadNodes: invalid child node index %i (%i nodes)", n, loadmodel->brush.num_nodes); out->children[j] = loadmodel->brush.data_nodes + n; } else { n = -1 - n; if (n >= loadmodel->brush.num_leafs) - Host_Error("Mod_Q3BSP_LoadNodes: invalid child leaf index %i (%i leafs)\n", n, loadmodel->brush.num_leafs); + Host_Error("Mod_Q3BSP_LoadNodes: invalid child leaf index %i (%i leafs)", n, loadmodel->brush.num_leafs); out->children[j] = (mnode_t *)(loadmodel->brush.data_leafs + n); } } @@ -4879,9 +4879,9 @@ static void Mod_Q3BSP_LoadLightGrid(lump_t *l) if (l->filelen) { if (l->filelen < count * (int)sizeof(*in)) - Host_Error("Mod_Q3BSP_LoadLightGrid: invalid lightgrid lump size %i bytes, should be %i bytes (%ix%ix%i)\n", l->filelen, count * sizeof(*in), loadmodel->brushq3.num_lightgrid_dimensions[0], loadmodel->brushq3.num_lightgrid_dimensions[1], loadmodel->brushq3.num_lightgrid_dimensions[2]); + Host_Error("Mod_Q3BSP_LoadLightGrid: invalid lightgrid lump size %i bytes, should be %i bytes (%ix%ix%i)", l->filelen, count * sizeof(*in), loadmodel->brushq3.num_lightgrid_dimensions[0], loadmodel->brushq3.num_lightgrid_dimensions[1], loadmodel->brushq3.num_lightgrid_dimensions[2]); if (l->filelen != count * (int)sizeof(*in)) - Con_Printf("Mod_Q3BSP_LoadLightGrid: Warning: calculated lightgrid size %i bytes does not match lump size %i\n", count * sizeof(*in), l->filelen); + Con_Printf("Mod_Q3BSP_LoadLightGrid: Warning: calculated lightgrid size %i bytes does not match lump size %i", count * sizeof(*in), l->filelen); out = (q3dlightgrid_t *)Mem_Alloc(loadmodel->mempool, count * sizeof(*out)); loadmodel->brushq3.data_lightgrid = out; loadmodel->brushq3.num_lightgrid = count; @@ -4919,10 +4919,10 @@ static void Mod_Q3BSP_LoadPVS(lump_t *l) loadmodel->brush.num_pvsclusters = LittleLong(in->numclusters); loadmodel->brush.num_pvsclusterbytes = LittleLong(in->chainlength); if (loadmodel->brush.num_pvsclusterbytes < ((loadmodel->brush.num_pvsclusters + 7) / 8)) - Host_Error("Mod_Q3BSP_LoadPVS: (chainlength = %i) < ((numclusters = %i) + 7) / 8\n", loadmodel->brush.num_pvsclusterbytes, loadmodel->brush.num_pvsclusters); + Host_Error("Mod_Q3BSP_LoadPVS: (chainlength = %i) < ((numclusters = %i) + 7) / 8", loadmodel->brush.num_pvsclusterbytes, loadmodel->brush.num_pvsclusters); totalchains = loadmodel->brush.num_pvsclusterbytes * loadmodel->brush.num_pvsclusters; if (l->filelen < totalchains + (int)sizeof(*in)) - Host_Error("Mod_Q3BSP_LoadPVS: lump too small ((numclusters = %i) * (chainlength = %i) + sizeof(q3dpvs_t) == %i bytes, lump is %i bytes)\n", loadmodel->brush.num_pvsclusters, loadmodel->brush.num_pvsclusterbytes, totalchains + sizeof(*in), l->filelen); + Host_Error("Mod_Q3BSP_LoadPVS: lump too small ((numclusters = %i) * (chainlength = %i) + sizeof(q3dpvs_t) == %i bytes, lump is %i bytes)", loadmodel->brush.num_pvsclusters, loadmodel->brush.num_pvsclusterbytes, totalchains + sizeof(*in), l->filelen); loadmodel->brush.data_pvsclusters = (unsigned char *)Mem_Alloc(loadmodel->mempool, totalchains); memcpy(loadmodel->brush.data_pvsclusters, (unsigned char *)(in + 1), totalchains); @@ -5827,11 +5827,11 @@ void Mod_IBSP_Load(model_t *mod, void *buffer, void *bufferend) else if (i == Q2BSPVERSION) Mod_Q2BSP_Load(mod,buffer, bufferend); else - Host_Error("Mod_IBSP_Load: unknown/unsupported version %i\n", i); + Host_Error("Mod_IBSP_Load: unknown/unsupported version %i", i); } void Mod_MAP_Load(model_t *mod, void *buffer, void *bufferend) { - Host_Error("Mod_MAP_Load: not yet implemented\n"); + Host_Error("Mod_MAP_Load: not yet implemented"); } diff --git a/model_shared.c b/model_shared.c index 7e34223c..bbed73d4 100644 --- a/model_shared.c +++ b/model_shared.c @@ -309,7 +309,7 @@ model_t *Mod_FindName(const char *name) return mod; } - Host_Error ("Mod_FindName: ran out of models\n"); + Host_Error ("Mod_FindName: ran out of models"); return NULL; } diff --git a/model_sprite.c b/model_sprite.c index acab785a..c25c36fa 100644 --- a/model_sprite.c +++ b/model_sprite.c @@ -52,7 +52,7 @@ static void Mod_Sprite_SharedSetup(const unsigned char *datapointer, int version modelradius = 0; if (loadmodel->numframes < 1) - Host_Error ("Mod_Sprite_SharedSetup: Invalid # of frames: %d\n", loadmodel->numframes); + Host_Error ("Mod_Sprite_SharedSetup: Invalid # of frames: %d", loadmodel->numframes); // LordHavoc: hack to allow sprites to be non-fullbright for (i = 0;i < MAX_QPATH && loadmodel->name[i];i++) @@ -298,7 +298,7 @@ void Mod_IDSP_Load(model_t *mod, void *buffer, void *bufferend) palette[255][0] = palette[255][1] = palette[255][2] = palette[255][3] = 0; break; default: - Host_Error("Mod_IDSP_Load: unknown texFormat (%i, should be 0, 1, 2, or 3)\n", i); + Host_Error("Mod_IDSP_Load: unknown texFormat (%i, should be 0, 1, 2, or 3)", i); return; } @@ -341,7 +341,7 @@ void Mod_IDS2_Load(model_t *mod, void *buffer, void *bufferend) loadmodel->numframes = LittleLong (pinqsprite->numframes); if (loadmodel->numframes < 1) - Host_Error ("Mod_IDS2_Load: Invalid # of frames: %d\n", loadmodel->numframes); + Host_Error ("Mod_IDS2_Load: Invalid # of frames: %d", loadmodel->numframes); loadmodel->sprite.sprnum_type = SPR_VP_PARALLEL; loadmodel->synctype = ST_SYNC; diff --git a/mvm_cmds.c b/mvm_cmds.c index 512c9e61..47976cfb 100644 --- a/mvm_cmds.c +++ b/mvm_cmds.c @@ -74,7 +74,7 @@ void VM_M_setmousetarget(void) in_client_mouse = true; break; default: - PRVM_ERROR("VM_M_setmousetarget: wrong destination %f !\n",PRVM_G_FLOAT(OFS_PARM0)); + PRVM_ERROR("VM_M_setmousetarget: wrong destination %f !",PRVM_G_FLOAT(OFS_PARM0)); } } @@ -123,7 +123,7 @@ void VM_M_setkeydest(void) // key_dest = key_message // break; default: - PRVM_ERROR("VM_M_setkeydest: wrong destination %f !\n", PRVM_G_FLOAT(OFS_PARM0)); + PRVM_ERROR("VM_M_setkeydest: wrong destination %f !", PRVM_G_FLOAT(OFS_PARM0)); } } @@ -171,19 +171,19 @@ void VM_M_callfunction(void) const char *s; if(prog->argc == 0) - PRVM_ERROR("VM_M_callfunction: 1 parameter is required !\n"); + PRVM_ERROR("VM_M_callfunction: 1 parameter is required !"); s = PRVM_G_STRING(OFS_PARM0 + (prog->argc - 1)); if(!s) - PRVM_ERROR("VM_M_callfunction: null string !\n"); + PRVM_ERROR("VM_M_callfunction: null string !"); VM_CheckEmptyString(s); func = PRVM_ED_FindFunction(s); if(!func) - PRVM_ERROR("VM_M_callfunciton: function %s not found !\n", s); + PRVM_ERROR("VM_M_callfunciton: function %s not found !", s); else if (func->first_statement < 0) { // negative statements are built in functions @@ -220,7 +220,7 @@ void VM_M_isfunction(void) s = PRVM_G_STRING(OFS_PARM0); if(!s) - PRVM_ERROR("VM_M_isfunction: null string !\n"); + PRVM_ERROR("VM_M_isfunction: null string !"); VM_CheckEmptyString(s); @@ -743,7 +743,7 @@ sizebuf_t *VM_WriteDest (void) int destclient; if(!sv.active) - PRVM_ERROR("VM_WriteDest: game is not server (%s)\n", PRVM_NAME); + PRVM_ERROR("VM_WriteDest: game is not server (%s)", PRVM_NAME); dest = PRVM_G_FLOAT(OFS_PARM1); switch (dest) @@ -754,7 +754,7 @@ sizebuf_t *VM_WriteDest (void) case MSG_ONE: destclient = (int) PRVM_G_FLOAT(OFS_PARM2); if (destclient < 0 || destclient >= svs.maxclients || !svs.clients[destclient].active) - PRVM_ERROR("VM_clientcommand: %s: invalid client !\n", PRVM_NAME); + PRVM_ERROR("VM_clientcommand: %s: invalid client !", PRVM_NAME); return &svs.clients[destclient].message; diff --git a/netconn.c b/netconn.c index 1ce0b0c8..56a1a090 100755 --- a/netconn.c +++ b/netconn.c @@ -710,7 +710,7 @@ void NetConn_OpenServerPorts(int opennetports) //NetConn_OpenServerPort(net_address_ipv6.string, port); } if (sv_numsockets == 0) - Host_Error("NetConn_OpenServerPorts: unable to open any ports!\n"); + Host_Error("NetConn_OpenServerPorts: unable to open any ports!"); } lhnetsocket_t *NetConn_ChooseClientSocketForAddress(lhnetaddress_t *address) diff --git a/pr_cmds.c b/pr_cmds.c index cbc06add..7d994956 100644 --- a/pr_cmds.c +++ b/pr_cmds.c @@ -316,7 +316,7 @@ void SetMinMaxSize (prvm_edict_t *e, float *min, float *max, qboolean rotate) for (i=0 ; i<3 ; i++) if (min[i] > max[i]) - PF_ERROR("SetMinMaxSize: backwards mins/maxs\n"); + PF_ERROR("SetMinMaxSize: backwards mins/maxs"); // set derived values VectorCopy (min, e->fields.server->mins); @@ -717,7 +717,7 @@ break() */ void PF_break (void) { - PF_ERROR("break: break statement\n"); + PF_ERROR("break: break statement"); } /* @@ -1808,7 +1808,7 @@ sizebuf_t *WriteDest (void) ent = PRVM_PROG_TO_EDICT(prog->globals.server->msg_entity); entnum = PRVM_NUM_FOR_EDICT(ent); if (entnum < 1 || entnum > svs.maxclients || !svs.clients[entnum-1].active) - Host_Error("WriteDest: tried to write to non-client\n"); + Host_Error("WriteDest: tried to write to non-client"); return &svs.clients[entnum-1].message; case MSG_ALL: diff --git a/pr_edict.c b/pr_edict.c index c29ec8d4..d921f760 100644 --- a/pr_edict.c +++ b/pr_edict.c @@ -1309,7 +1309,7 @@ void PR_LoadProgs (const char *progsname) for (i = 0;i < progs->numstrings;i++) { if (progs->ofs_strings + pr_stringssize >= filesize) - Host_Error ("progs.dat strings go past end of file\n"); + Host_Error ("progs.dat strings go past end of file"); pr_stringssize += strlen (pr_strings + pr_stringssize) + 1; } pr_numknownstrings = 0; @@ -1397,11 +1397,11 @@ void PR_LoadProgs (const char *progsname) case OP_IF: case OP_IFNOT: if ((unsigned short) st->a >= progs->numglobals || st->b + i < 0 || st->b + i >= progs->numstatements) - Host_Error("PR_LoadProgs: out of bounds IF/IFNOT (statement %d)\n", i); + Host_Error("PR_LoadProgs: out of bounds IF/IFNOT (statement %d)", i); break; case OP_GOTO: if (st->a + i < 0 || st->a + i >= progs->numstatements) - Host_Error("PR_LoadProgs: out of bounds GOTO (statement %d)\n", i); + Host_Error("PR_LoadProgs: out of bounds GOTO (statement %d)", i); break; // global global global case OP_ADD_F: @@ -1439,7 +1439,7 @@ void PR_LoadProgs (const char *progsname) case OP_LOAD_FNC: case OP_LOAD_V: if ((unsigned short) st->a >= progs->numglobals || (unsigned short) st->b >= progs->numglobals || (unsigned short) st->c >= progs->numglobals) - Host_Error("PR_LoadProgs: out of bounds global index (statement %d)\n", i); + Host_Error("PR_LoadProgs: out of bounds global index (statement %d)", i); break; // global none global case OP_NOT_F: @@ -1448,7 +1448,7 @@ void PR_LoadProgs (const char *progsname) case OP_NOT_FNC: case OP_NOT_ENT: if ((unsigned short) st->a >= progs->numglobals || (unsigned short) st->c >= progs->numglobals) - Host_Error("PR_LoadProgs: out of bounds global index (statement %d)\n", i); + Host_Error("PR_LoadProgs: out of bounds global index (statement %d)", i); break; // 2 globals case OP_STOREP_F: @@ -1465,7 +1465,7 @@ void PR_LoadProgs (const char *progsname) case OP_STOREP_V: case OP_STORE_V: if ((unsigned short) st->a >= progs->numglobals || (unsigned short) st->b >= progs->numglobals) - Host_Error("PR_LoadProgs: out of bounds global index (statement %d)\n", i); + Host_Error("PR_LoadProgs: out of bounds global index (statement %d)", i); break; // 1 global case OP_CALL0: @@ -1480,10 +1480,10 @@ void PR_LoadProgs (const char *progsname) case OP_DONE: case OP_RETURN: if ((unsigned short) st->a >= progs->numglobals) - Host_Error("PR_LoadProgs: out of bounds global index (statement %d)\n", i); + Host_Error("PR_LoadProgs: out of bounds global index (statement %d)", i); break; default: - Host_Error("PR_LoadProgs: unknown opcode %d at statement %d\n", st->op, i); + Host_Error("PR_LoadProgs: unknown opcode %d at statement %d", st->op, i); break; } } @@ -1732,14 +1732,14 @@ int PRVM_EDICT_TO_PROG(prvm_edict_t *e) int n; n = e - prog->edicts; if ((unsigned int)n >= (unsigned int)prog->max_edicts) - Host_Error("PRVM_EDICT_TO_PROG: invalid edict %8p (number %i compared to world at %8p)\n", e, n, prog->edicts); + Host_Error("PRVM_EDICT_TO_PROG: invalid edict %8p (number %i compared to world at %8p)", e, n, prog->edicts); return n;// EXPERIMENTAL //return (unsigned char *)e->v - (unsigned char *)prog->edictsfields; } prvm_edict_t *PRVM_PROG_TO_EDICT(int n) { if ((unsigned int)n >= (unsigned int)prog->max_edicts) - Host_Error("PRVM_PROG_TO_EDICT: invalid edict number %i\n", n); + Host_Error("PRVM_PROG_TO_EDICT: invalid edict number %i", n); return prog->edicts + n; // EXPERIMENTAL //return prog->edicts + ((n) / (progs->entityfields * 4)); } @@ -1753,12 +1753,12 @@ const char *PRVM_GetString(int num) { num = -1 - num; if (!pr_knownstrings[num]) - Host_Error("PRVM_GetString: attempt to get string that is already freed\n"); + Host_Error("PRVM_GetString: attempt to get string that is already freed"); return pr_knownstrings[num]; } else { - Host_Error("PRVM_GetString: invalid string offset %i\n", num); + Host_Error("PRVM_GetString: invalid string offset %i", num); return ""; } } @@ -1773,7 +1773,7 @@ int PR_SetQCString(const char *s) for (i = 0;i < pr_numknownstrings;i++) if (pr_knownstrings[i] == s) return -1 - i; - Host_Error("PR_SetQCString: unknown string\n"); + Host_Error("PR_SetQCString: unknown string"); return -1 - i; } @@ -1783,7 +1783,7 @@ int PRVM_SetEngineString(const char *s) if (!s) return 0; if (s >= pr_strings && s <= pr_strings + pr_stringssize) - Host_Error("PRVM_SetEngineString: s in pr_strings area\n"); + Host_Error("PRVM_SetEngineString: s in pr_strings area"); for (i = 0;i < pr_numknownstrings;i++) if (pr_knownstrings[i] == s) return -1 - i; @@ -1836,14 +1836,14 @@ void PR_FreeString(char *s) { int i; if (!s) - Host_Error("PR_FreeString: attempt to free a NULL string\n"); + Host_Error("PR_FreeString: attempt to free a NULL string"); if (s >= pr_strings && s <= pr_strings + pr_stringssize) - Host_Error("PR_FreeString: attempt to free a constant string\n"); + Host_Error("PR_FreeString: attempt to free a constant string"); for (i = 0;i < pr_numknownstrings;i++) if (pr_knownstrings[i] == s) break; if (i == pr_numknownstrings) - Host_Error("PR_FreeString: attempt to free a non-existent or already freed string\n"); + Host_Error("PR_FreeString: attempt to free a non-existent or already freed string"); PR_Free((char *)pr_knownstrings[i]); pr_knownstrings[i] = NULL; } diff --git a/pr_exec.c b/pr_exec.c index e44d9545..49e19a26 100644 --- a/pr_exec.c +++ b/pr_exec.c @@ -298,7 +298,7 @@ int PR_EnterFunction (mfunction_t *f) int i, j, c, o; if (!f) - Host_Error ("PR_EnterFunction: NULL function\n"); + Host_Error ("PR_EnterFunction: NULL function"); pr_stack[pr_depth].s = pr_xstatement; pr_stack[pr_depth].f = pr_xfunction; @@ -309,7 +309,7 @@ int PR_EnterFunction (mfunction_t *f) // save off any locals that the new function steps on c = f->locals; if (localstack_used + c > LOCALSTACK_SIZE) - Host_Error ("PRVM_ExecuteProgram: locals stack overflow\n"); + Host_Error ("PRVM_ExecuteProgram: locals stack overflow"); for (i=0 ; i < c ; i++) localstack[localstack_used+i] = ((int *)pr_globals)[f->parm_start + i]; @@ -343,12 +343,12 @@ int PR_LeaveFunction (void) Host_Error ("prog stack underflow"); if (!pr_xfunction) - Host_Error ("PR_LeaveFunction: NULL function\n"); + Host_Error ("PR_LeaveFunction: NULL function"); // restore locals from the stack c = pr_xfunction->locals; localstack_used -= c; if (localstack_used < 0) - Host_Error ("PRVM_ExecuteProgram: locals stack underflow\n"); + Host_Error ("PRVM_ExecuteProgram: locals stack underflow"); for (i=0 ; i < c ; i++) ((int *)pr_globals)[pr_xfunction->parm_start + i] = localstack[localstack_used+i]; diff --git a/pr_execprogram.h b/pr_execprogram.h index 0be877c2..e8886c53 100644 --- a/pr_execprogram.h +++ b/pr_execprogram.h @@ -154,7 +154,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an out of bounds edict (%i)\n", OPB->_int); + Host_Error("Progs attempted to write to an out of bounds edict (%i)", OPB->_int); return; } #endif @@ -168,7 +168,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an out of bounds edict (%i)\n", OPB->_int); + Host_Error("Progs attempted to write to an out of bounds edict (%i)", OPB->_int); return; } #endif @@ -185,7 +185,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to address an invalid field (%i) in an edict\n", OPB->_int); + Host_Error("Progs attempted to address an invalid field (%i) in an edict", OPB->_int); return; } #endif @@ -212,7 +212,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid field in an edict (%i)\n", OPB->_int); + Host_Error("Progs attempted to read an invalid field in an edict (%i)", OPB->_int); return; } #endif @@ -227,7 +227,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid field in an edict (%i)\n", OPB->_int); + Host_Error("Progs attempted to read an invalid field in an edict (%i)", OPB->_int); return; } #endif @@ -477,7 +477,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an out of bounds edict\n"); + Host_Error("Progs attempted to write to an out of bounds edict"); return; } #endif @@ -491,7 +491,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an out of bounds edict number\n"); + Host_Error("Progs attempted to read an out of bounds edict number"); return; } if (OPB->_int < 0 || OPB->_int >= progs->entityfields) @@ -499,7 +499,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid field in an edict\n"); + Host_Error("Progs attempted to read an invalid field in an edict"); return; } #endif @@ -519,7 +519,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an invalid indexed global\n"); + Host_Error("Progs attempted to write to an invalid indexed global"); return; } #endif @@ -532,7 +532,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an invalid indexed global\n"); + Host_Error("Progs attempted to write to an invalid indexed global"); return; } #endif @@ -549,7 +549,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to address an out of bounds global\n"); + Host_Error("Progs attempted to address an out of bounds global"); return; } #endif @@ -568,7 +568,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid indexed global\n"); + Host_Error("Progs attempted to read an invalid indexed global"); return; } #endif @@ -582,7 +582,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid indexed global\n"); + Host_Error("Progs attempted to read an invalid indexed global"); return; } #endif @@ -597,7 +597,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs boundcheck failed at line number %d, value is < 0 or >= %d\n", st->b, st->c); + Host_Error("Progs boundcheck failed at line number %d, value is < 0 or >= %d", st->b, st->c); return; } break; diff --git a/protocol.c b/protocol.c index 611c0f7e..d3f14fe5 100644 --- a/protocol.c +++ b/protocol.c @@ -125,9 +125,9 @@ void EntityFrameQuake_ReadEntity(int bits) num = MSG_ReadByte (); if (num >= MAX_EDICTS) - Host_Error("EntityFrameQuake_ReadEntity: entity number (%i) >= MAX_EDICTS (%i)\n", num, MAX_EDICTS); + Host_Error("EntityFrameQuake_ReadEntity: entity number (%i) >= MAX_EDICTS (%i)", num, MAX_EDICTS); if (num < 1) - Host_Error("EntityFrameQuake_ReadEntity: invalid entity number (%i)\n", num); + Host_Error("EntityFrameQuake_ReadEntity: invalid entity number (%i)", num); if (cl_num_entities <= num) { @@ -208,7 +208,7 @@ void EntityFrameQuake_ReadEntity(int bits) } if (msg_badread) - Host_Error("EntityFrameQuake_ReadEntity: read error\n"); + Host_Error("EntityFrameQuake_ReadEntity: read error"); } void EntityFrameQuake_ISeeDeadEntities(void) @@ -964,17 +964,17 @@ void EntityFrame_CL_ReadFrame(void) while ((number = (unsigned short) MSG_ReadShort()) != 0xFFFF && !msg_badread) { if (msg_badread) - Host_Error("EntityFrame_Read: read error\n"); + Host_Error("EntityFrame_Read: read error"); removed = number & 0x8000; number &= 0x7FFF; if (number >= MAX_EDICTS) - Host_Error("EntityFrame_Read: number (%i) >= MAX_EDICTS (%i)\n", number, MAX_EDICTS); + Host_Error("EntityFrame_Read: number (%i) >= MAX_EDICTS (%i)", number, MAX_EDICTS); // seek to entity, while copying any skipped entities (assume unchanged) while (old < oldend && old->number < number) { if (f->numentities >= MAX_ENTITY_DATABASE) - Host_Error("EntityFrame_Read: entity list too big\n"); + Host_Error("EntityFrame_Read: entity list too big"); f->entitydata[f->numentities] = *old++; f->entitydata[f->numentities++].time = cl.mtime[0]; } @@ -988,7 +988,7 @@ void EntityFrame_CL_ReadFrame(void) else { if (f->numentities >= MAX_ENTITY_DATABASE) - Host_Error("EntityFrame_Read: entity list too big\n"); + Host_Error("EntityFrame_Read: entity list too big"); // reserve this slot e = f->entitydata + f->numentities++; @@ -1020,7 +1020,7 @@ void EntityFrame_CL_ReadFrame(void) while (old < oldend) { if (f->numentities >= MAX_ENTITY_DATABASE) - Host_Error("EntityFrame_Read: entity list too big\n"); + Host_Error("EntityFrame_Read: entity list too big"); f->entitydata[f->numentities] = *old++; f->entitydata[f->numentities++].time = cl.mtime[0]; } diff --git a/prvm_cmds.c b/prvm_cmds.c index b1bdc5fc..cf7caeef 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -152,7 +152,7 @@ void VM_objerror (void) } else // objerror has to display the object fields -> else call - PRVM_ERROR ("VM_objecterror: self not defined !\n"); + PRVM_ERROR ("VM_objecterror: self not defined !"); } /* @@ -508,7 +508,7 @@ void VM_cvar_string(void) name = PRVM_G_STRING(OFS_PARM0); if(!name) - PRVM_ERROR("VM_cvar_string: %s: null string\n", PRVM_NAME); + PRVM_ERROR("VM_cvar_string: %s: null string", PRVM_NAME); VM_CheckEmptyString(name); @@ -539,7 +539,7 @@ void VM_cvar_defstring (void) name = PRVM_G_STRING(OFS_PARM0); if(!name) - PRVM_ERROR("VM_cvar_defstring: %s: null string\n", PRVM_NAME); + PRVM_ERROR("VM_cvar_defstring: %s: null string", PRVM_NAME); VM_CheckEmptyString(name); @@ -708,7 +708,7 @@ void VM_ftoi(void) ent = PRVM_G_FLOAT(OFS_PARM0); if(PRVM_PROG_TO_EDICT(ent)->priv.required->free) - PRVM_ERROR ("VM_ftoe: %s tried to access a freed entity (entity %i)!\n", PRVM_NAME, ent); + PRVM_ERROR ("VM_ftoe: %s tried to access a freed entity (entity %i)!", PRVM_NAME, ent); PRVM_G_INT(OFS_RETURN) = ent; } @@ -753,9 +753,9 @@ void VM_remove (void) PRVM_ED_Free (ed); } // if (ed == prog->edicts) -// PRVM_ERROR ("remove: tried to remove world\n"); +// PRVM_ERROR ("remove: tried to remove world"); // if (PRVM_NUM_FOR_EDICT(ed) <= sv.maxclients) -// Host_Error("remove: tried to remove a client\n"); +// Host_Error("remove: tried to remove a client"); } /* @@ -864,7 +864,7 @@ void VM_findchain (void) // is the same like !(prog->flag & PRVM_FE_CHAIN) - even if the operator precedence is another if(!prog->flag & PRVM_FE_CHAIN) - PRVM_ERROR("VM_findchain: %s doesnt have a chain field !\n", PRVM_NAME); + PRVM_ERROR("VM_findchain: %s doesnt have a chain field !", PRVM_NAME); chain_of = PRVM_ED_FindField("chain")->ofs; @@ -918,7 +918,7 @@ void VM_findchainfloat (void) VM_SAFEPARMCOUNT(2, VM_findchainfloat); if(!prog->flag & PRVM_FE_CHAIN) - PRVM_ERROR("VM_findchainfloat: %s doesnt have a chain field !\n", PRVM_NAME); + PRVM_ERROR("VM_findchainfloat: %s doesnt have a chain field !", PRVM_NAME); chain_of = PRVM_ED_FindField("chain")->ofs; @@ -1000,7 +1000,7 @@ void VM_findchainflags (void) VM_SAFEPARMCOUNT(2, VM_findchainflags); if(!prog->flag & PRVM_FE_CHAIN) - PRVM_ERROR("VM_findchainflags: %s doesnt have a chain field !\n", PRVM_NAME); + PRVM_ERROR("VM_findchainflags: %s doesnt have a chain field !", PRVM_NAME); chain_of = PRVM_ED_FindField("chain")->ofs; @@ -1068,7 +1068,7 @@ void VM_crash(void) { VM_SAFEPARMCOUNT(0, VM_crash); - PRVM_ERROR("Crash called by %s\n",PRVM_NAME); + PRVM_ERROR("Crash called by %s",PRVM_NAME); } /* @@ -1362,7 +1362,7 @@ void VM_min (void) PRVM_G_FLOAT(OFS_RETURN) = f; } else - PRVM_ERROR("VM_min: %s must supply at least 2 floats\n", PRVM_NAME); + PRVM_ERROR("VM_min: %s must supply at least 2 floats", PRVM_NAME); } /* @@ -1389,7 +1389,7 @@ void VM_max (void) PRVM_G_FLOAT(OFS_RETURN) = f; } else - PRVM_ERROR("VM_max: %s must supply at least 2 floats\n", PRVM_NAME); + PRVM_ERROR("VM_max: %s must supply at least 2 floats", PRVM_NAME); } /* @@ -1724,7 +1724,7 @@ void VM_strcat(void) char *s; if(prog->argc < 1) - PRVM_ERROR("VM_strcat wrong parameter count (min. 1 expected ) !\n"); + PRVM_ERROR("VM_strcat wrong parameter count (min. 1 expected ) !"); s = VM_GetTempString(); VM_VarString(0, s, VM_STRINGTEMP_LENGTH); @@ -2070,13 +2070,13 @@ void VM_parseentitydata(void) // get edict and test it ent = PRVM_G_EDICT(OFS_PARM0); if (ent->priv.required->free) - PRVM_ERROR ("VM_parseentitydata: %s: Can only set already spawned entities (entity %i is free)!\n", PRVM_NAME, PRVM_NUM_FOR_EDICT(ent)); + PRVM_ERROR ("VM_parseentitydata: %s: Can only set already spawned entities (entity %i is free)!", PRVM_NAME, PRVM_NUM_FOR_EDICT(ent)); data = PRVM_G_STRING(OFS_PARM1); // parse the opening brace if (!COM_ParseToken(&data, false) || com_token[0] != '{' ) - PRVM_ERROR ("VM_parseentitydata: %s: Couldn't parse entity data:\n%s\n", PRVM_NAME, data ); + PRVM_ERROR ("VM_parseentitydata: %s: Couldn't parse entity data:\n%s", PRVM_NAME, data ); PRVM_ED_ParseEdict (data, ent); } @@ -2340,7 +2340,7 @@ void VM_precache_pic(void) PRVM_G_INT(OFS_RETURN) = PRVM_G_INT(OFS_PARM0); if(!s) - PRVM_ERROR ("VM_precache_pic: %s: NULL\n", PRVM_NAME); + PRVM_ERROR ("VM_precache_pic: %s: NULL", PRVM_NAME); VM_CheckEmptyString (s); @@ -2365,7 +2365,7 @@ void VM_freepic(void) s = PRVM_G_STRING(OFS_PARM0); if(!s) - PRVM_ERROR ("VM_freepic: %s: NULL\n"); + PRVM_ERROR ("VM_freepic: %s: NULL"); VM_CheckEmptyString (s); @@ -2607,7 +2607,7 @@ void VM_getimagesize(void) p = PRVM_G_STRING(OFS_PARM0); if(!p) - PRVM_ERROR("VM_getimagepos: %s passed null picture name !\n", PRVM_NAME); + PRVM_ERROR("VM_getimagepos: %s passed null picture name !", PRVM_NAME); VM_CheckEmptyString (p); diff --git a/prvm_cmds.h b/prvm_cmds.h index c7832647..b77b39d6 100644 --- a/prvm_cmds.h +++ b/prvm_cmds.h @@ -189,7 +189,7 @@ float getserverlistindexforkey(string key) // nice helper macros #ifndef VM_NOPARMCHECK -#define VM_SAFEPARMCOUNT(p,f) if(prog->argc != p) PRVM_ERROR(#f " wrong parameter count (" #p " expected ) !\n") +#define VM_SAFEPARMCOUNT(p,f) if(prog->argc != p) PRVM_ERROR(#f " wrong parameter count (" #p " expected ) !") #else #define VM_SAFEPARMCOUNT(p,f) #endif diff --git a/prvm_edict.c b/prvm_edict.c index f520342b..b4ab6735 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -172,10 +172,10 @@ void PRVM_SetProg(int prognr) if(prog_list[prognr].loaded) prog = &prog_list[prognr]; else - PRVM_ERROR("%i not loaded !\n", prognr); + PRVM_ERROR("%i not loaded !", prognr); return; } - PRVM_ERROR("Invalid program number %i\n", prognr); + PRVM_ERROR("Invalid program number %i", prognr); } /* @@ -1285,7 +1285,7 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, char **required fs_offset_t filesize; if( prog->loaded ) { - PRVM_ERROR ("PRVM_LoadProgs: there is already a %s program loaded!\n", PRVM_NAME ); + PRVM_ERROR ("PRVM_LoadProgs: there is already a %s program loaded!", PRVM_NAME ); } prog->progs = (dprograms_t *)FS_LoadFile (filename, prog->progs_mempool, false, &filesize); @@ -1313,7 +1313,7 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, char **required for (i = 0;i < prog->progs->numstrings;i++) { if (prog->progs->ofs_strings + prog->stringssize >= (int)filesize) - PRVM_ERROR ("%s: %s strings go past end of file\n", PRVM_NAME, filename); + PRVM_ERROR ("%s: %s strings go past end of file", PRVM_NAME, filename); prog->stringssize += (int)strlen (prog->strings + prog->stringssize) + 1; } prog->numknownstrings = 0; @@ -1390,7 +1390,7 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, char **required // check required functions for(i=0 ; i < numrequiredfunc ; i++) if(PRVM_ED_FindFunction(required_func[i]) == 0) - PRVM_ERROR("%s: %s not found in %s\n",PRVM_NAME, required_func[i], filename); + PRVM_ERROR("%s: %s not found in %s",PRVM_NAME, required_func[i], filename); for (i=0 ; iprogs->numglobals ; i++) ((int *)prog->globals.generic)[i] = LittleLong (((int *)prog->globals.generic)[i]); @@ -1408,11 +1408,11 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, char **required case OP_IF: case OP_IFNOT: if ((unsigned short) st->a >= prog->progs->numglobals || st->b + i < 0 || st->b + i >= prog->progs->numstatements) - PRVM_ERROR("PRVM_LoadProgs: out of bounds IF/IFNOT (statement %d) in %s\n", i, PRVM_NAME); + PRVM_ERROR("PRVM_LoadProgs: out of bounds IF/IFNOT (statement %d) in %s", i, PRVM_NAME); break; case OP_GOTO: if (st->a + i < 0 || st->a + i >= prog->progs->numstatements) - PRVM_ERROR("PRVM_LoadProgs: out of bounds GOTO (statement %d) in %s\n", i, PRVM_NAME); + PRVM_ERROR("PRVM_LoadProgs: out of bounds GOTO (statement %d) in %s", i, PRVM_NAME); break; // global global global case OP_ADD_F: @@ -1450,7 +1450,7 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, char **required case OP_LOAD_FNC: case OP_LOAD_V: if ((unsigned short) st->a >= prog->progs->numglobals || (unsigned short) st->b >= prog->progs->numglobals || (unsigned short) st->c >= prog->progs->numglobals) - PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d)\n", i); + PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d)", i); break; // global none global case OP_NOT_F: @@ -1459,7 +1459,7 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, char **required case OP_NOT_FNC: case OP_NOT_ENT: if ((unsigned short) st->a >= prog->progs->numglobals || (unsigned short) st->c >= prog->progs->numglobals) - PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d) in %s\n", i, PRVM_NAME); + PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d) in %s", i, PRVM_NAME); break; // 2 globals case OP_STOREP_F: @@ -1476,7 +1476,7 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, char **required case OP_STOREP_V: case OP_STORE_V: if ((unsigned short) st->a >= prog->progs->numglobals || (unsigned short) st->b >= prog->progs->numglobals) - PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d)\n in %s", i, PRVM_NAME); + PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d) in %s", i, PRVM_NAME); break; // 1 global case OP_CALL0: @@ -1491,10 +1491,10 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, char **required case OP_DONE: case OP_RETURN: if ((unsigned short) st->a >= prog->progs->numglobals) - PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d) in %s\n", i, PRVM_NAME); + PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d) in %s", i, PRVM_NAME); break; default: - PRVM_ERROR("PRVM_LoadProgs: unknown opcode %d at statement %d in %s\n", st->op, i, PRVM_NAME); + PRVM_ERROR("PRVM_LoadProgs: unknown opcode %d at statement %d in %s", st->op, i, PRVM_NAME); break; } } @@ -1763,7 +1763,7 @@ PRVM_InitProg void PRVM_InitProg(int prognr) { if(prognr < 0 || prognr >= PRVM_MAXPROGS) - Sys_Error("PRVM_InitProg: Invalid program number %i\n",prognr); + Sys_Error("PRVM_InitProg: Invalid program number %i",prognr); prog = &prog_list[prognr]; @@ -1834,14 +1834,14 @@ int PRVM_EDICT_TO_PROG(prvm_edict_t *e) int n; n = e - prog->edicts; if ((unsigned int)n >= (unsigned int)prog->max_edicts) - Host_Error("PRVM_EDICT_TO_PROG: invalid edict %8p (number %i compared to world at %8p)\n", e, n, prog->edicts); + Host_Error("PRVM_EDICT_TO_PROG: invalid edict %8p (number %i compared to world at %8p)", e, n, prog->edicts); return n;// EXPERIMENTAL //return (unsigned char *)e->v - (unsigned char *)prog->edictsfields; } prvm_edict_t *PRVM_PROG_TO_EDICT(int n) { if ((unsigned int)n >= (unsigned int)prog->max_edicts) - Host_Error("PRVM_PROG_TO_EDICT: invalid edict number %i\n", n); + Host_Error("PRVM_PROG_TO_EDICT: invalid edict number %i", n); return prog->edicts + n; // EXPERIMENTAL //return prog->edicts + ((n) / (progs->entityfields * 4)); } @@ -1856,12 +1856,12 @@ const char *PRVM_GetString(int num) { num = -1 - num; if (!prog->knownstrings[num]) - PRVM_ERROR("PRVM_GetString: attempt to get string that is already freed\n"); + PRVM_ERROR("PRVM_GetString: attempt to get string that is already freed"); return prog->knownstrings[num]; } else { - PRVM_ERROR("PRVM_GetString: invalid string offset %i\n", num); + PRVM_ERROR("PRVM_GetString: invalid string offset %i", num); return ""; } } @@ -1872,7 +1872,7 @@ int PRVM_SetEngineString(const char *s) if (!s) return 0; if (s >= prog->strings && s <= prog->strings + prog->stringssize) - PRVM_ERROR("PRVM_SetEngineString: s in prog->strings area\n"); + PRVM_ERROR("PRVM_SetEngineString: s in prog->strings area"); for (i = 0;i < prog->numknownstrings;i++) if (prog->knownstrings[i] == s) return -1 - i; @@ -1940,22 +1940,22 @@ int PRVM_AllocString(size_t bufferlength, char **pointer) void PRVM_FreeString(int num) { if (num == 0) - PRVM_ERROR("PRVM_FreeString: attempt to free a NULL string\n"); + PRVM_ERROR("PRVM_FreeString: attempt to free a NULL string"); else if (num >= 0 && num < prog->stringssize) - PRVM_ERROR("PRVM_FreeString: attempt to free a constant string\n"); + PRVM_ERROR("PRVM_FreeString: attempt to free a constant string"); else if (num < 0 && num >= -prog->numknownstrings) { num = -1 - num; if (!prog->knownstrings[num]) - PRVM_ERROR("PRVM_FreeString: attempt to free a non-existent or already freed string\n"); + PRVM_ERROR("PRVM_FreeString: attempt to free a non-existent or already freed string"); if (!prog->knownstrings[num]) - PRVM_ERROR("PRVM_FreeString: attempt to free a string owned by the engine\n"); + PRVM_ERROR("PRVM_FreeString: attempt to free a string owned by the engine"); PRVM_Free((char *)prog->knownstrings[num]); prog->knownstrings[num] = NULL; prog->knownstrings_freeable[num] = false; prog->firstfreeknownstring = min(prog->firstfreeknownstring, num); } else - PRVM_ERROR("PRVM_FreeString: invalid string offset %i\n", num); + PRVM_ERROR("PRVM_FreeString: invalid string offset %i", num); } diff --git a/prvm_exec.c b/prvm_exec.c index 5160fad8..2f8c97ae 100644 --- a/prvm_exec.c +++ b/prvm_exec.c @@ -310,7 +310,7 @@ int PRVM_EnterFunction (mfunction_t *f) int i, j, c, o; if (!f) - PRVM_ERROR ("PRVM_EnterFunction: NULL function in %s\n", PRVM_NAME); + PRVM_ERROR ("PRVM_EnterFunction: NULL function in %s", PRVM_NAME); prog->stack[prog->depth].s = prog->xstatement; prog->stack[prog->depth].f = prog->xfunction; @@ -321,7 +321,7 @@ int PRVM_EnterFunction (mfunction_t *f) // save off any locals that the new function steps on c = f->locals; if (prog->localstack_used + c > PRVM_LOCALSTACK_SIZE) - PRVM_ERROR ("PRVM_ExecuteProgram: locals stack overflow in %s\n", PRVM_NAME); + PRVM_ERROR ("PRVM_ExecuteProgram: locals stack overflow in %s", PRVM_NAME); for (i=0 ; i < c ; i++) prog->localstack[prog->localstack_used+i] = ((int *)prog->globals.generic)[f->parm_start + i]; @@ -355,12 +355,12 @@ int PRVM_LeaveFunction (void) PRVM_ERROR ("prog stack underflow in %s", PRVM_NAME); if (!prog->xfunction) - PRVM_ERROR ("PR_LeaveFunction: NULL function in %s\n", PRVM_NAME); + PRVM_ERROR ("PR_LeaveFunction: NULL function in %s", PRVM_NAME); // restore locals from the stack c = prog->xfunction->locals; prog->localstack_used -= c; if (prog->localstack_used < 0) - PRVM_ERROR ("PRVM_ExecuteProgram: locals stack underflow in %s\n", PRVM_NAME); + PRVM_ERROR ("PRVM_ExecuteProgram: locals stack underflow in %s", PRVM_NAME); for (i=0 ; i < c ; i++) ((int *)prog->globals.generic)[prog->xfunction->parm_start + i] = prog->localstack[prog->localstack_used+i]; diff --git a/prvm_execprogram.h b/prvm_execprogram.h index 5018b79d..f1885864 100644 --- a/prvm_execprogram.h +++ b/prvm_execprogram.h @@ -154,7 +154,7 @@ prog->xfunction->profile += profile - startprofile; startprofile = profile; prog->xstatement = st - prog->statements; - PRVM_ERROR("%s attempted to write to an out of bounds edict (%i)\n", PRVM_NAME, OPB->_int); + PRVM_ERROR("%s attempted to write to an out of bounds edict (%i)", PRVM_NAME, OPB->_int); return; } #endif @@ -168,7 +168,7 @@ prog->xfunction->profile += profile - startprofile; startprofile = profile; prog->xstatement = st - prog->statements; - PRVM_ERROR("%s attempted to write to an out of bounds edict (%i)\n", PRVM_NAME, OPB->_int); + PRVM_ERROR("%s attempted to write to an out of bounds edict (%i)", PRVM_NAME, OPB->_int); return; } #endif @@ -185,7 +185,7 @@ prog->xfunction->profile += profile - startprofile; startprofile = profile; prog->xstatement = st - prog->statements; - PRVM_ERROR("%s attempted to address an invalid field (%i) in an edict\n", PRVM_NAME, OPB->_int); + PRVM_ERROR("%s attempted to address an invalid field (%i) in an edict", PRVM_NAME, OPB->_int); return; } #endif @@ -212,7 +212,7 @@ prog->xfunction->profile += profile - startprofile; startprofile = profile; prog->xstatement = st - prog->statements; - PRVM_ERROR("%s attempted to read an invalid field in an edict (%i)\n", PRVM_NAME, OPB->_int); + PRVM_ERROR("%s attempted to read an invalid field in an edict (%i)", PRVM_NAME, OPB->_int); return; } #endif @@ -227,7 +227,7 @@ prog->xfunction->profile += profile - startprofile; startprofile = profile; prog->xstatement = st - prog->statements; - PRVM_ERROR("%s attempted to read an invalid field in an edict (%i)\n", PRVM_NAME, OPB->_int); + PRVM_ERROR("%s attempted to read an invalid field in an edict (%i)", PRVM_NAME, OPB->_int); return; } #endif @@ -315,7 +315,7 @@ *(func_t *)((float*)ed->fields.vp + PRVM_ED_FindField ("think")->ofs) = OPB->function; } else - PRVM_ERROR("OP_STATE not supported by %s\n", PRVM_NAME); + PRVM_ERROR("OP_STATE not supported by %s", PRVM_NAME); break; // LordHavoc: to be enabled when Progs version 7 (or whatever it will be numbered) is finalized @@ -478,7 +478,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an out of bounds edict\n"); + Host_Error("Progs attempted to write to an out of bounds edict"); return; } #endif @@ -492,7 +492,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an out of bounds edict number\n"); + Host_Error("Progs attempted to read an out of bounds edict number"); return; } if (OPB->_int < 0 || OPB->_int >= progs->entityfields) @@ -500,7 +500,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid field in an edict\n"); + Host_Error("Progs attempted to read an invalid field in an edict"); return; } #endif @@ -520,7 +520,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an invalid indexed global\n"); + Host_Error("Progs attempted to write to an invalid indexed global"); return; } #endif @@ -533,7 +533,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an invalid indexed global\n"); + Host_Error("Progs attempted to write to an invalid indexed global"); return; } #endif @@ -550,7 +550,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to address an out of bounds global\n"); + Host_Error("Progs attempted to address an out of bounds global"); return; } #endif @@ -569,7 +569,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid indexed global\n"); + Host_Error("Progs attempted to read an invalid indexed global"); return; } #endif @@ -583,7 +583,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid indexed global\n"); + Host_Error("Progs attempted to read an invalid indexed global"); return; } #endif @@ -598,7 +598,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs boundcheck failed at line number %d, value is < 0 or >= %d\n", st->b, st->c); + Host_Error("Progs boundcheck failed at line number %d, value is < 0 or >= %d", st->b, st->c); return; } break; diff --git a/r_modules.c b/r_modules.c index e3729796..56b2d236 100644 --- a/r_modules.c +++ b/r_modules.c @@ -34,7 +34,7 @@ void R_RegisterModule(char *name, void(*start)(void), void(*shutdown)(void), voi } } if (i >= MAXRENDERMODULES) - Sys_Error("R_RegisterModule: ran out of renderer module slots (%i)\n", MAXRENDERMODULES); + Sys_Error("R_RegisterModule: ran out of renderer module slots (%i)", MAXRENDERMODULES); rendermodule[i].active = 0; rendermodule[i].name = name; rendermodule[i].start = start; diff --git a/r_shadow.c b/r_shadow.c index ae46177e..a929ff5b 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -3109,7 +3109,7 @@ void R_Shadow_FreeWorldLight(dlight_t *light) R_RTLight_Uncompile(&light->rtlight); for (lightpointer = &r_shadow_worldlightchain;*lightpointer && *lightpointer != light;lightpointer = &(*lightpointer)->next); if (*lightpointer != light) - Sys_Error("R_Shadow_FreeWorldLight: light not linked into chain\n"); + Sys_Error("R_Shadow_FreeWorldLight: light not linked into chain"); *lightpointer = light->next; Mem_Free(light); } diff --git a/svvm_cmds.c b/svvm_cmds.c index 4daffbc6..89b03104 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -178,7 +178,7 @@ void SetMinMaxSize (prvm_edict_t *e, float *min, float *max, qboolean rotate) for (i=0 ; i<3 ; i++) if (min[i] > max[i]) - PRVM_ERROR("SetMinMaxSize: backwards mins/maxs\n"); + PRVM_ERROR("SetMinMaxSize: backwards mins/maxs"); // set derived values VectorCopy (min, e->fields.server->mins); diff --git a/vid_agl.c b/vid_agl.c index f5db4805..78616057 100644 --- a/vid_agl.c +++ b/vid_agl.c @@ -380,11 +380,11 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp) context = qaglCreateContext(pixelFormat, NULL); qaglDestroyPixelFormat(pixelFormat); if (context == NULL) - Sys_Error ("aglCreateContext failed\n"); + Sys_Error ("aglCreateContext failed"); if (!qaglSetDrawable(context, GetWindowPort(window))) - Sys_Error ("aglSetDrawable failed\n"); + Sys_Error ("aglSetDrawable failed"); if (!qaglSetCurrentContext(context)) - Sys_Error ("aglSetCurrentContext failed\n"); + Sys_Error ("aglSetCurrentContext failed"); scr_width = width; scr_height = height; @@ -395,7 +395,7 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp) if (fullscreen) { if (!qaglSetFullScreen (context, width, height, 0, 0)) - Sys_Error("aglSetFullScreen failed\n"); + Sys_Error("aglSetFullScreen failed"); vid_isfullscreen = true; } diff --git a/vid_sdl.c b/vid_sdl.c index 50513fe6..4906819b 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -305,7 +305,7 @@ static int Sys_EventFilter( SDL_Event *event ); void VID_Init (void) { if (SDL_Init(SDL_INIT_VIDEO) < 0) - Sys_Error ("Failed to init video: %s\n", SDL_GetError()); + Sys_Error ("Failed to init video: %s", SDL_GetError()); vid_isfullscreen = false; } diff --git a/vid_shared.c b/vid_shared.c index 30bb057b..f9621dc3 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -625,7 +625,7 @@ void VID_CheckExtensions(void) gl_support_fragment_shader = false; if (!GL_CheckExtension("OpenGL 1.1.0", opengl110funcs, NULL, false)) - Sys_Error("OpenGL 1.1.0 functions not found\n"); + Sys_Error("OpenGL 1.1.0 functions not found"); Con_Printf("GL_VENDOR: %s\n", gl_vendor); Con_Printf("GL_RENDERER: %s\n", gl_renderer); @@ -940,7 +940,7 @@ void VID_Restart_f(void) { Con_Print("Video mode change failed\n"); if (!VID_Mode(vid.fullscreen, vid.width, vid.height, vid.bitsperpixel)) - Sys_Error("Unable to restore to last working video mode\n"); + Sys_Error("Unable to restore to last working video mode"); } VID_OpenSystems(); } @@ -992,7 +992,7 @@ void VID_Start(void) if (!success && vid_fullscreen.integer) success = VID_Mode(false, 640, 480, 16); if (!success) - Sys_Error("Video modes failed\n"); + Sys_Error("Video modes failed"); } VID_OpenSystems(); } diff --git a/vid_wgl.c b/vid_wgl.c index 56f730f6..ab04857b 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -737,7 +737,7 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp) int depth; if (vid_initialized) - Sys_Error("VID_InitMode called when video is already initialised\n"); + Sys_Error("VID_InitMode called when video is already initialised"); // if stencil is enabled, ask for alpha too if (bpp >= 32)