Skip to content

Commit

Permalink
fix some "\n"-related stuff
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
/dev/humancontroller authored and zturtleman committed May 30, 2013
1 parent 242dcf9 commit 2d54a12
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion code/qcommon/vm_sparc.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,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);
}

Expand Down
10 changes: 5 additions & 5 deletions code/renderergl2/tr_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,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;
Expand All @@ -368,10 +368,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
Expand Down Expand Up @@ -2184,7 +2184,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))));
}
}

Expand Down Expand Up @@ -2685,7 +2685,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);
Expand Down
2 changes: 1 addition & 1 deletion code/renderergl2/tr_fbo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions code/renderergl2/tr_glsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

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

Expand Down
4 changes: 2 additions & 2 deletions code/renderergl2/tr_shade_calc.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,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 ) {
Expand Down

0 comments on commit 2d54a12

Please sign in to comment.