summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2013-05-30 15:32:44 -0500
committerTim Angus <tim@ngus.net>2013-05-31 23:10:53 +0100
commite402f6bcfd0d7aff795f320842d251accbb065b1 (patch)
tree8bc52caefdcbceee09c55badbc89bbd9112e1d31
parent44886a355b9aae4e05fb0e3202613f6323217b57 (diff)
fix some "\n"-related stuff
add missing "\n"s to some Printf()-like calls (in Rend2) drop erroneous "\n"s from some Error()-like calls (in Rend2) drop erroneous "\n" from a Com_Error() call (in vm_sparc.c)
-rw-r--r--src/qcommon/vm_sparc.c2
-rw-r--r--src/renderergl2/tr_bsp.c10
-rw-r--r--src/renderergl2/tr_fbo.c2
-rw-r--r--src/renderergl2/tr_glsl.c6
-rw-r--r--src/renderergl2/tr_shade_calc.c4
5 files changed, 13 insertions, 11 deletions
diff --git a/src/qcommon/vm_sparc.c b/src/qcommon/vm_sparc.c
index b34b2175..d55ac5c2 100644
--- a/src/qcommon/vm_sparc.c
+++ b/src/qcommon/vm_sparc.c
@@ -702,7 +702,7 @@ static void dst_insn_append(struct func_info * const fp)
static void ErrJump(void)
{
- Com_Error(ERR_DROP, "program tried to execute code outside VM\n");
+ Com_Error(ERR_DROP, "program tried to execute code outside VM");
exit(1);
}
diff --git a/src/renderergl2/tr_bsp.c b/src/renderergl2/tr_bsp.c
index 6cbd9d21..f32c2365 100644
--- a/src/renderergl2/tr_bsp.c
+++ b/src/renderergl2/tr_bsp.c
@@ -351,7 +351,7 @@ static void R_LoadLightmaps( lump_t *l, lump_t *surfs ) {
}
if (!size)
- ri.Error(ERR_DROP, "Bad header for %s!\n", filename);
+ ri.Error(ERR_DROP, "Bad header for %s!", filename);
size -= 2;
p += 2;
@@ -369,10 +369,10 @@ static void R_LoadLightmaps( lump_t *l, lump_t *surfs ) {
#if 0 // HDRFILE_RGBE
if (size != tr.lightmapSize * tr.lightmapSize * 4)
- ri.Error(ERR_DROP, "Bad size for %s (%i)!\n", filename, size);
+ ri.Error(ERR_DROP, "Bad size for %s (%i)!", filename, size);
#else // HDRFILE_FLOAT
if (size != tr.lightmapSize * tr.lightmapSize * 12)
- ri.Error(ERR_DROP, "Bad size for %s (%i)!\n", filename, size);
+ ri.Error(ERR_DROP, "Bad size for %s (%i)!", filename, size);
#endif
}
else
@@ -2185,7 +2185,7 @@ static void R_LoadSurfaces( lump_t *surfs, lump_t *verts, lump_t *indexLump ) {
{
//ri.Printf(PRINT_ALL, "Found!\n");
if (size != sizeof(float) * 3 * (verts->filelen / sizeof(*dv)))
- ri.Error(ERR_DROP, "Bad size for %s (%i, expected %i)!\n", filename, size, (int)((sizeof(float)) * 3 * (verts->filelen / sizeof(*dv))));
+ ri.Error(ERR_DROP, "Bad size for %s (%i, expected %i)!", filename, size, (int)((sizeof(float)) * 3 * (verts->filelen / sizeof(*dv))));
}
}
@@ -2686,7 +2686,7 @@ void R_LoadLightGrid( lump_t *l ) {
if (size != sizeof(float) * 6 * numGridPoints)
{
- ri.Error(ERR_DROP, "Bad size for %s (%i, expected %i)!\n", filename, size, (int)(sizeof(float)) * 6 * numGridPoints);
+ ri.Error(ERR_DROP, "Bad size for %s (%i, expected %i)!", filename, size, (int)(sizeof(float)) * 6 * numGridPoints);
}
w->hdrLightGrid = ri.Hunk_Alloc(size, h_low);
diff --git a/src/renderergl2/tr_fbo.c b/src/renderergl2/tr_fbo.c
index 00b8b174..fee11d5c 100644
--- a/src/renderergl2/tr_fbo.c
+++ b/src/renderergl2/tr_fbo.c
@@ -107,7 +107,7 @@ FBO_t *FBO_Create(const char *name, int width, int height)
if(strlen(name) >= MAX_QPATH)
{
- ri.Error(ERR_DROP, "FBO_Create: \"%s\" is too long\n", name);
+ ri.Error(ERR_DROP, "FBO_Create: \"%s\" is too long", name);
}
if(width <= 0 || width > glRefConfig.maxRenderbufferSize)
diff --git a/src/renderergl2/tr_glsl.c b/src/renderergl2/tr_glsl.c
index 93b78a1a..d8b07432 100644
--- a/src/renderergl2/tr_glsl.c
+++ b/src/renderergl2/tr_glsl.c
@@ -431,7 +431,8 @@ static void GLSL_LinkProgram(GLhandleARB program)
if(!linked)
{
GLSL_PrintInfoLog(program, qfalse);
- ri.Error(ERR_DROP, "\nshaders failed to link");
+ ri.Printf(PRINT_ALL, "\n");
+ ri.Error(ERR_DROP, "shaders failed to link");
}
}
@@ -445,7 +446,8 @@ static void GLSL_ValidateProgram(GLhandleARB program)
if(!validated)
{
GLSL_PrintInfoLog(program, qfalse);
- ri.Error(ERR_DROP, "\nshaders failed to validate");
+ ri.Printf(PRINT_ALL, "\n");
+ ri.Error(ERR_DROP, "shaders failed to validate");
}
}
diff --git a/src/renderergl2/tr_shade_calc.c b/src/renderergl2/tr_shade_calc.c
index 977ae6de..c2e9aa83 100644
--- a/src/renderergl2/tr_shade_calc.c
+++ b/src/renderergl2/tr_shade_calc.c
@@ -457,10 +457,10 @@ static void Autosprite2Deform( void ) {
vec3_t forward;
if ( tess.numVertexes & 3 ) {
- ri.Printf( PRINT_WARNING, "Autosprite2 shader %s had odd vertex count", tess.shader->name );
+ ri.Printf( PRINT_WARNING, "Autosprite2 shader %s had odd vertex count\n", tess.shader->name );
}
if ( tess.numIndexes != ( tess.numVertexes >> 2 ) * 6 ) {
- ri.Printf( PRINT_WARNING, "Autosprite2 shader %s had odd index count", tess.shader->name );
+ ri.Printf( PRINT_WARNING, "Autosprite2 shader %s had odd index count\n", tess.shader->name );
}
if ( backEnd.currentEntity != &tr.worldEntity ) {