summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-05-14 14:32:43 +0000
committerTim Angus <tim@ngus.net>2013-01-09 22:17:32 +0000
commit457f832631206027d7c92050a4b1230f378aa1e4 (patch)
treeffe4a9314eb1c2dac875e7d9f40970d5cf717be3 /src
parent24e257f5281d4056dd963c35243e4ee00c07e223 (diff)
Remove newlines from Com_Error calls, patch by DevHC
Diffstat (limited to 'src')
-rw-r--r--src/renderer/tr_backend.c6
-rw-r--r--src/renderer/tr_bsp.c2
-rw-r--r--src/renderer/tr_cmds.c2
-rw-r--r--src/renderer/tr_image.c4
-rw-r--r--src/renderer/tr_image_bmp.c20
-rw-r--r--src/renderer/tr_image_jpg.c6
-rw-r--r--src/renderer/tr_image_tga.c26
-rw-r--r--src/renderer/tr_shade.c2
-rw-r--r--src/renderer/tr_shade_calc.c2
-rw-r--r--src/renderer/tr_shader.c2
-rw-r--r--src/renderer/tr_sky.c2
-rw-r--r--src/sdl/sdl_glimp.c2
12 files changed, 38 insertions, 38 deletions
diff --git a/src/renderer/tr_backend.c b/src/renderer/tr_backend.c
index 704d947f..aa54344d 100644
--- a/src/renderer/tr_backend.c
+++ b/src/renderer/tr_backend.c
@@ -190,7 +190,7 @@ void GL_TexEnv( int env )
qglTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD );
break;
default:
- ri.Error( ERR_DROP, "GL_TexEnv: invalid env '%d' passed\n", env );
+ ri.Error( ERR_DROP, "GL_TexEnv: invalid env '%d' passed", env );
break;
}
}
@@ -265,7 +265,7 @@ void GL_State( unsigned long stateBits )
break;
default:
srcFactor = GL_ONE; // to get warning to shut up
- ri.Error( ERR_DROP, "GL_State: invalid src blend state bits\n" );
+ ri.Error( ERR_DROP, "GL_State: invalid src blend state bits" );
break;
}
@@ -297,7 +297,7 @@ void GL_State( unsigned long stateBits )
break;
default:
dstFactor = GL_ONE; // to get warning to shut up
- ri.Error( ERR_DROP, "GL_State: invalid dst blend state bits\n" );
+ ri.Error( ERR_DROP, "GL_State: invalid dst blend state bits" );
break;
}
diff --git a/src/renderer/tr_bsp.c b/src/renderer/tr_bsp.c
index 563bb36d..4a7c0312 100644
--- a/src/renderer/tr_bsp.c
+++ b/src/renderer/tr_bsp.c
@@ -1801,7 +1801,7 @@ void RE_LoadWorldMap( const char *name ) {
byte *startMarker;
if ( tr.worldMapLoaded ) {
- ri.Error( ERR_DROP, "ERROR: attempted to redundantly load world map\n" );
+ ri.Error( ERR_DROP, "ERROR: attempted to redundantly load world map" );
}
// set default sun direction to be used if it isn't
diff --git a/src/renderer/tr_cmds.c b/src/renderer/tr_cmds.c
index 3958a718..6eba4162 100644
--- a/src/renderer/tr_cmds.c
+++ b/src/renderer/tr_cmds.c
@@ -497,7 +497,7 @@ void RE_BeginFrame( stereoFrame_t stereoFrame ) {
R_SyncRenderThread();
if ((err = qglGetError()) != GL_NO_ERROR)
- ri.Error(ERR_FATAL, "RE_BeginFrame() - glGetError() failed (0x%x)!\n", err);
+ ri.Error(ERR_FATAL, "RE_BeginFrame() - glGetError() failed (0x%x)!", err);
}
if (glConfig.stereoEnabled) {
diff --git a/src/renderer/tr_image.c b/src/renderer/tr_image.c
index c40add48..50ba3a75 100644
--- a/src/renderer/tr_image.c
+++ b/src/renderer/tr_image.c
@@ -781,14 +781,14 @@ image_t *R_CreateImage( const char *name, const byte *pic, int width, int height
long hash;
if (strlen(name) >= MAX_QPATH ) {
- ri.Error (ERR_DROP, "R_CreateImage: \"%s\" is too long\n", name);
+ ri.Error (ERR_DROP, "R_CreateImage: \"%s\" is too long", name);
}
if ( !strncmp( name, "*lightmap", 9 ) ) {
isLightmap = qtrue;
}
if ( tr.numImages == MAX_DRAWIMAGES ) {
- ri.Error( ERR_DROP, "R_CreateImage: MAX_DRAWIMAGES hit\n");
+ ri.Error( ERR_DROP, "R_CreateImage: MAX_DRAWIMAGES hit");
}
image = tr.images[tr.numImages] = ri.Hunk_Alloc( sizeof( image_t ), h_low );
diff --git a/src/renderer/tr_image_bmp.c b/src/renderer/tr_image_bmp.c
index 75373124..eed62c58 100644
--- a/src/renderer/tr_image_bmp.c
+++ b/src/renderer/tr_image_bmp.c
@@ -77,7 +77,7 @@ void R_LoadBMP( const char *name, byte **pic, int *width, int *height )
if (length < 54)
{
- ri.Error( ERR_DROP, "LoadBMP: header too short (%s)\n", name );
+ ri.Error( ERR_DROP, "LoadBMP: header too short (%s)", name );
}
buf_p = buffer.b;
@@ -117,7 +117,7 @@ void R_LoadBMP( const char *name, byte **pic, int *width, int *height )
if ( bmpHeader.bitsPerPixel == 8 )
{
if (buf_p + sizeof(bmpHeader.palette) > end)
- ri.Error( ERR_DROP, "LoadBMP: header too short (%s)\n", name );
+ ri.Error( ERR_DROP, "LoadBMP: header too short (%s)", name );
Com_Memcpy( bmpHeader.palette, buf_p, sizeof( bmpHeader.palette ) );
buf_p += sizeof(bmpHeader.palette);
@@ -125,26 +125,26 @@ void R_LoadBMP( const char *name, byte **pic, int *width, int *height )
if (buffer.b + bmpHeader.bitmapDataOffset > end)
{
- ri.Error( ERR_DROP, "LoadBMP: invalid offset value in header (%s)\n", name );
+ ri.Error( ERR_DROP, "LoadBMP: invalid offset value in header (%s)", name );
}
buf_p = buffer.b + bmpHeader.bitmapDataOffset;
if ( bmpHeader.id[0] != 'B' && bmpHeader.id[1] != 'M' )
{
- ri.Error( ERR_DROP, "LoadBMP: only Windows-style BMP files supported (%s)\n", name );
+ ri.Error( ERR_DROP, "LoadBMP: only Windows-style BMP files supported (%s)", name );
}
if ( bmpHeader.fileSize != length )
{
- ri.Error( ERR_DROP, "LoadBMP: header size does not match file size (%u vs. %u) (%s)\n", bmpHeader.fileSize, length, name );
+ ri.Error( ERR_DROP, "LoadBMP: header size does not match file size (%u vs. %u) (%s)", bmpHeader.fileSize, length, name );
}
if ( bmpHeader.compression != 0 )
{
- ri.Error( ERR_DROP, "LoadBMP: only uncompressed BMP files supported (%s)\n", name );
+ ri.Error( ERR_DROP, "LoadBMP: only uncompressed BMP files supported (%s)", name );
}
if ( bmpHeader.bitsPerPixel < 8 )
{
- ri.Error( ERR_DROP, "LoadBMP: monochrome and 4-bit BMP files not supported (%s)\n", name );
+ ri.Error( ERR_DROP, "LoadBMP: monochrome and 4-bit BMP files not supported (%s)", name );
}
switch ( bmpHeader.bitsPerPixel )
@@ -155,7 +155,7 @@ void R_LoadBMP( const char *name, byte **pic, int *width, int *height )
case 32:
break;
default:
- ri.Error( ERR_DROP, "LoadBMP: illegal pixel_size '%hu' in file '%s'\n", bmpHeader.bitsPerPixel, name );
+ ri.Error( ERR_DROP, "LoadBMP: illegal pixel_size '%hu' in file '%s'", bmpHeader.bitsPerPixel, name );
break;
}
@@ -168,11 +168,11 @@ void R_LoadBMP( const char *name, byte **pic, int *width, int *height )
if(columns <= 0 || !rows || numPixels > 0x1FFFFFFF // 4*1FFFFFFF == 0x7FFFFFFC < 0x7FFFFFFF
|| ((numPixels * 4) / columns) / 4 != rows)
{
- ri.Error (ERR_DROP, "LoadBMP: %s has an invalid image size\n", name);
+ ri.Error (ERR_DROP, "LoadBMP: %s has an invalid image size", name);
}
if(buf_p + numPixels*bmpHeader.bitsPerPixel/8 > end)
{
- ri.Error (ERR_DROP, "LoadBMP: file truncated (%s)\n", name);
+ ri.Error (ERR_DROP, "LoadBMP: file truncated (%s)", name);
}
if ( width )
diff --git a/src/renderer/tr_image_jpg.c b/src/renderer/tr_image_jpg.c
index 7390e143..7d4a793a 100644
--- a/src/renderer/tr_image_jpg.c
+++ b/src/renderer/tr_image_jpg.c
@@ -52,7 +52,7 @@ static void R_JPGErrorExit(j_common_ptr cinfo)
/* Let the memory manager delete any temp files before we die */
jpeg_destroy(cinfo);
- ri.Error(ERR_FATAL, "%s\n", buffer);
+ ri.Error(ERR_FATAL, "%s", buffer);
}
static void R_JPGOutputMessage(j_common_ptr cinfo)
@@ -170,7 +170,7 @@ void R_LoadJPG(const char *filename, unsigned char **pic, int *width, int *heigh
ri.FS_FreeFile (fbuffer.v);
jpeg_destroy_decompress(&cinfo);
- ri.Error(ERR_DROP, "LoadJPG: %s has an invalid image format: %dx%d*4=%d, components: %d\n", filename,
+ ri.Error(ERR_DROP, "LoadJPG: %s has an invalid image format: %dx%d*4=%d, components: %d", filename,
cinfo.output_width, cinfo.output_height, pixelcount * 4, cinfo.output_components);
}
@@ -299,7 +299,7 @@ empty_output_buffer (j_compress_ptr cinfo)
jpeg_destroy_compress(cinfo);
// Make crash fatal or we would probably leak memory.
- ri.Error(ERR_FATAL, "Output buffer for encoded JPEG image has insufficient size of %d bytes\n",
+ ri.Error(ERR_FATAL, "Output buffer for encoded JPEG image has insufficient size of %d bytes",
dest->size);
return FALSE;
diff --git a/src/renderer/tr_image_tga.c b/src/renderer/tr_image_tga.c
index b5375f84..b707c0ed 100644
--- a/src/renderer/tr_image_tga.c
+++ b/src/renderer/tr_image_tga.c
@@ -71,7 +71,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
if(length < 18)
{
- ri.Error( ERR_DROP, "LoadTGA: header too short (%s)\n", name );
+ ri.Error( ERR_DROP, "LoadTGA: header too short (%s)", name );
}
buf_p = buffer.b;
@@ -104,17 +104,17 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
&& targa_header.image_type!=10
&& targa_header.image_type != 3 )
{
- ri.Error (ERR_DROP, "LoadTGA: Only type 2 (RGB), 3 (gray), and 10 (RGB) TGA images supported\n");
+ ri.Error (ERR_DROP, "LoadTGA: Only type 2 (RGB), 3 (gray), and 10 (RGB) TGA images supported");
}
if ( targa_header.colormap_type != 0 )
{
- ri.Error( ERR_DROP, "LoadTGA: colormaps not supported\n" );
+ ri.Error( ERR_DROP, "LoadTGA: colormaps not supported" );
}
if ( ( targa_header.pixel_size != 32 && targa_header.pixel_size != 24 ) && targa_header.image_type != 3 )
{
- ri.Error (ERR_DROP, "LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n");
+ ri.Error (ERR_DROP, "LoadTGA: Only 32 or 24 bit images supported (no colormaps)");
}
columns = targa_header.width;
@@ -123,7 +123,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
if(!columns || !rows || numPixels > 0x7FFFFFFF || numPixels / columns / 4 != rows)
{
- ri.Error (ERR_DROP, "LoadTGA: %s has an invalid image size\n", name);
+ ri.Error (ERR_DROP, "LoadTGA: %s has an invalid image size", name);
}
@@ -132,7 +132,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
if (targa_header.id_length != 0)
{
if (buf_p + targa_header.id_length > end)
- ri.Error( ERR_DROP, "LoadTGA: header too short (%s)\n", name );
+ ri.Error( ERR_DROP, "LoadTGA: header too short (%s)", name );
buf_p += targa_header.id_length; // skip TARGA image comment
}
@@ -141,7 +141,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
{
if(buf_p + columns*rows*targa_header.pixel_size/8 > end)
{
- ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)\n", name);
+ ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)", name);
}
// Uncompressed RGB or gray scale image
@@ -184,7 +184,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
*pixbuf++ = alphabyte;
break;
default:
- ri.Error( ERR_DROP, "LoadTGA: illegal pixel_size '%d' in file '%s'\n", targa_header.pixel_size, name );
+ ri.Error( ERR_DROP, "LoadTGA: illegal pixel_size '%d' in file '%s'", targa_header.pixel_size, name );
break;
}
}
@@ -202,12 +202,12 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
pixbuf = targa_rgba + row*columns*4;
for(column=0; column<columns; ) {
if(buf_p + 1 > end)
- ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)\n", name);
+ ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)", name);
packetHeader= *buf_p++;
packetSize = 1 + (packetHeader & 0x7f);
if (packetHeader & 0x80) { // run-length packet
if(buf_p + targa_header.pixel_size/8 > end)
- ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)\n", name);
+ ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)", name);
switch (targa_header.pixel_size) {
case 24:
blue = *buf_p++;
@@ -222,7 +222,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
alphabyte = *buf_p++;
break;
default:
- ri.Error( ERR_DROP, "LoadTGA: illegal pixel_size '%d' in file '%s'\n", targa_header.pixel_size, name );
+ ri.Error( ERR_DROP, "LoadTGA: illegal pixel_size '%d' in file '%s'", targa_header.pixel_size, name );
break;
}
@@ -245,7 +245,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
else { // non run-length packet
if(buf_p + targa_header.pixel_size/8*packetSize > end)
- ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)\n", name);
+ ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)", name);
for(j=0;j<packetSize;j++) {
switch (targa_header.pixel_size) {
case 24:
@@ -268,7 +268,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
*pixbuf++ = alphabyte;
break;
default:
- ri.Error( ERR_DROP, "LoadTGA: illegal pixel_size '%d' in file '%s'\n", targa_header.pixel_size, name );
+ ri.Error( ERR_DROP, "LoadTGA: illegal pixel_size '%d' in file '%s'", targa_header.pixel_size, name );
break;
}
column++;
diff --git a/src/renderer/tr_shade.c b/src/renderer/tr_shade.c
index 93ec88ba..b40a06c5 100644
--- a/src/renderer/tr_shade.c
+++ b/src/renderer/tr_shade.c
@@ -1097,7 +1097,7 @@ static void ComputeTexCoords( shaderStage_t *pStage ) {
break;
default:
- ri.Error( ERR_DROP, "ERROR: unknown texmod '%d' in shader '%s'\n", pStage->bundle[b].texMods[tm].type, tess.shader->name );
+ ri.Error( ERR_DROP, "ERROR: unknown texmod '%d' in shader '%s'", pStage->bundle[b].texMods[tm].type, tess.shader->name );
break;
}
}
diff --git a/src/renderer/tr_shade_calc.c b/src/renderer/tr_shade_calc.c
index ba61a6df..13fcf0b5 100644
--- a/src/renderer/tr_shade_calc.c
+++ b/src/renderer/tr_shade_calc.c
@@ -49,7 +49,7 @@ static float *TableForFunc( genFunc_t func )
break;
}
- ri.Error( ERR_DROP, "TableForFunc called with invalid function '%d' in shader '%s'\n", func, tess.shader->name );
+ ri.Error( ERR_DROP, "TableForFunc called with invalid function '%d' in shader '%s'", func, tess.shader->name );
return NULL;
}
diff --git a/src/renderer/tr_shader.c b/src/renderer/tr_shader.c
index 4b2452e2..3152612a 100644
--- a/src/renderer/tr_shader.c
+++ b/src/renderer/tr_shader.c
@@ -364,7 +364,7 @@ static void ParseTexMod( char *_text, shaderStage_t *stage )
texModInfo_t *tmi;
if ( stage->bundle[0].numTexMods == TR_MAX_TEXMODS ) {
- ri.Error( ERR_DROP, "ERROR: too many tcMod stages in shader '%s'\n", shader.name );
+ ri.Error( ERR_DROP, "ERROR: too many tcMod stages in shader '%s'", shader.name );
return;
}
diff --git a/src/renderer/tr_sky.c b/src/renderer/tr_sky.c
index fd266ee3..6ab8aa6e 100644
--- a/src/renderer/tr_sky.c
+++ b/src/renderer/tr_sky.c
@@ -476,7 +476,7 @@ static void FillCloudySkySide( const int mins[2], const int maxs[2], qboolean ad
if ( tess.numVertexes >= SHADER_MAX_VERTEXES )
{
- ri.Error( ERR_DROP, "SHADER_MAX_VERTEXES hit in FillCloudySkySide()\n" );
+ ri.Error( ERR_DROP, "SHADER_MAX_VERTEXES hit in FillCloudySkySide()" );
}
}
}
diff --git a/src/sdl/sdl_glimp.c b/src/sdl/sdl_glimp.c
index ad30fdef..41114ca9 100644
--- a/src/sdl/sdl_glimp.c
+++ b/src/sdl/sdl_glimp.c
@@ -732,7 +732,7 @@ void GLimp_Init( void )
goto success;
// Nothing worked, give up
- ri.Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem\n" );
+ ri.Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem" );
success:
// This values force the UI to disable driver selection