From: havoc Date: Mon, 7 Nov 2005 11:08:12 +0000 (+0000) Subject: cleaned up all Con_Printf calls that were missing a \n X-Git-Tag: xonotic-v0.1.0preview~4484 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f7e37f88d839aaf88b304e2cfc000bf10ca9ed83;p=xonotic%2Fdarkplaces.git cleaned up all Con_Printf calls that were missing a \n git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5800 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cmd.c b/cmd.c index d8028e90..c0fd3665 100644 --- a/cmd.c +++ b/cmd.c @@ -530,11 +530,10 @@ static void Cmd_List_f (void) count++; } - Con_Printf("%i Command%s", count, (count > 1) ? "s" : ""); if (partial) - Con_Printf(" beginning with \"%s\"", partial); - - Con_Print("\n\n"); + Con_Printf("%i Command%s beginning with \"%s\"\n\n", count, (count > 1) ? "s" : "", partial); + else + Con_Printf("%i Command%s\n\n", count, (count > 1) ? "s" : ""); } /* diff --git a/cvar.c b/cvar.c index 27853eec..394a8327 100644 --- a/cvar.c +++ b/cvar.c @@ -294,7 +294,7 @@ void Cvar_RegisterVariable (cvar_t *variable) if (cvar->flags & CVAR_ALLOCATED) { if (developer.integer) - Con_Printf("... replacing existing allocated cvar {\"%s\", \"%s\", %i}", cvar->name, cvar->string, cvar->flags); + Con_Printf("... replacing existing allocated cvar {\"%s\", \"%s\", %i}\n", cvar->name, cvar->string, cvar->flags); // fixed variables replace allocated ones // (because the engine directly accesses fixed variables) // NOTE: this isn't actually used currently @@ -505,10 +505,10 @@ void Cvar_List_f (void) count++; } - Con_Printf("%i cvar(s)", count); if (partial) - Con_Printf(" beginning with \"%s\"", partial); - Con_Print("\n"); + Con_Printf("%i cvar(s) beginning with \"%s\"\n", count, partial); + else + Con_Printf("%i cvar(s)\n", count); } // 2000-01-09 CvarList command by Maddes diff --git a/fs.c b/fs.c index 2179d6d5..46172798 100644 --- a/fs.c +++ b/fs.c @@ -550,7 +550,7 @@ pack_t *FS_LoadPackPK3 (const char *packfile) if (! PK3_GetEndOfCentralDir (packfile, packhandle, &eocd)) { - Con_Printf ("%s is not a PK3 file", packfile); + Con_Printf ("%s is not a PK3 file\n", packfile); close(packhandle); return NULL; } @@ -558,7 +558,7 @@ pack_t *FS_LoadPackPK3 (const char *packfile) // Multi-volume ZIP archives are NOT allowed if (eocd.disknum != 0 || eocd.cdir_disknum != 0) { - Con_Printf ("%s is a multi-volume ZIP archive", packfile); + Con_Printf ("%s is a multi-volume ZIP archive\n", packfile); close(packhandle); return NULL; } @@ -568,7 +568,7 @@ pack_t *FS_LoadPackPK3 (const char *packfile) #if MAX_FILES_IN_PACK < 65535 if (eocd.nbentries > MAX_FILES_IN_PACK) { - Con_Printf ("%s contains too many files (%hu)", packfile, eocd.nbentries); + Con_Printf ("%s contains too many files (%hu)\n", packfile, eocd.nbentries); close(packhandle); return NULL; } @@ -587,7 +587,7 @@ pack_t *FS_LoadPackPK3 (const char *packfile) real_nb_files = PK3_BuildFileList (pack, &eocd); if (real_nb_files < 0) { - Con_Printf ("%s is not a valid PK3 file", packfile); + Con_Printf ("%s is not a valid PK3 file\n", packfile); close(pack->handle); Mem_Free(pack); return NULL; @@ -619,7 +619,7 @@ qboolean PK3_GetTrueFileOffset (packfile_t *pfile, pack_t *pack) count = read (pack->handle, buffer, ZIP_LOCAL_CHUNK_BASE_SIZE); if (count != ZIP_LOCAL_CHUNK_BASE_SIZE || BuffBigLong (buffer) != ZIP_DATA_HEADER) { - Con_Printf ("Can't retrieve file %s in package %s", pfile->name, pack->filename); + Con_Printf ("Can't retrieve file %s in package %s\n", pfile->name, pack->filename); return false; } @@ -763,7 +763,7 @@ pack_t *FS_LoadPackPAK (const char *packfile) read (packhandle, (void *)&header, sizeof(header)); if (memcmp(header.id, "PACK", 4)) { - Con_Printf ("%s is not a packfile", packfile); + Con_Printf ("%s is not a packfile\n", packfile); close(packhandle); return NULL; } @@ -772,7 +772,7 @@ pack_t *FS_LoadPackPAK (const char *packfile) if (header.dirlen % sizeof(dpackfile_t)) { - Con_Printf ("%s has an invalid directory size", packfile); + Con_Printf ("%s has an invalid directory size\n", packfile); close(packhandle); return NULL; } @@ -781,7 +781,7 @@ pack_t *FS_LoadPackPAK (const char *packfile) if (numpackfiles > MAX_FILES_IN_PACK) { - Con_Printf ("%s has %i files", packfile, numpackfiles); + Con_Printf ("%s has %i files\n", packfile, numpackfiles); close(packhandle); return NULL; } @@ -991,7 +991,7 @@ void FS_Init (void) search->pack = FS_LoadPackPAK (com_argv[i]); if (!search->pack) { - Con_Printf ("Couldn't load packfile: %s", com_argv[i]); + Con_Printf ("Couldn't load packfile: %s\n", com_argv[i]); Mem_Free(search); continue; } @@ -1001,7 +1001,7 @@ void FS_Init (void) search->pack = FS_LoadPackPK3 (com_argv[i]); if (!search->pack) { - Con_Printf ("Couldn't load packfile: %s", com_argv[i]); + Con_Printf ("Couldn't load packfile: %s\n", com_argv[i]); Mem_Free(search); continue; } @@ -1183,7 +1183,7 @@ qfile_t *FS_OpenPackedFile (pack_t* pack, int pack_ind) // the dup() call to avoid having to close the dup_handle on error here if (lseek (pack->handle, pfile->offset, SEEK_SET) == -1) { - Con_Printf ("FS_OpenPackedFile: can't lseek to %s in %s (offset: %d)", + Con_Printf ("FS_OpenPackedFile: can't lseek to %s in %s (offset: %d)\n", pfile->name, pack->filename, pfile->offset); return NULL; } @@ -1191,7 +1191,7 @@ qfile_t *FS_OpenPackedFile (pack_t* pack, int pack_ind) dup_handle = dup (pack->handle); if (dup_handle < 0) { - Con_Printf ("FS_OpenPackedFile: can't dup package's handle (pack: %s)", pack->filename); + Con_Printf ("FS_OpenPackedFile: can't dup package's handle (pack: %s)\n", pack->filename); return NULL; } @@ -1230,7 +1230,7 @@ qfile_t *FS_OpenPackedFile (pack_t* pack, int pack_ind) */ if (qz_inflateInit2 (&ztk->zstream, -MAX_WBITS) != Z_OK) { - Con_Printf ("FS_OpenPackedFile: inflate init error (file: %s)", pfile->name); + Con_Printf ("FS_OpenPackedFile: inflate init error (file: %s)\n", pfile->name); close(dup_handle); Mem_Free(file); return NULL; @@ -1604,7 +1604,7 @@ fs_offset_t FS_Read (qfile_t* file, void* buffer, size_t buffersize) lseek (file->handle, file->offset + (fs_offset_t)ztk->in_position, SEEK_SET); if (read (file->handle, ztk->input, count) != count) { - Con_Printf ("FS_Read: unexpected end of file"); + Con_Printf ("FS_Read: unexpected end of file\n"); break; } @@ -1627,7 +1627,7 @@ fs_offset_t FS_Read (qfile_t* file, void* buffer, size_t buffersize) error = qz_inflate (&ztk->zstream, Z_SYNC_FLUSH); if (error != Z_OK && error != Z_STREAM_END) { - Con_Printf ("FS_Read: Can't inflate file"); + Con_Printf ("FS_Read: Can't inflate file\n"); break; } ztk->in_ind = ztk->in_len - ztk->zstream.avail_in; @@ -1649,7 +1649,7 @@ fs_offset_t FS_Read (qfile_t* file, void* buffer, size_t buffersize) error = qz_inflate (&ztk->zstream, Z_SYNC_FLUSH); if (error != Z_OK && error != Z_STREAM_END) { - Con_Printf ("FS_Read: Can't inflate file"); + Con_Printf ("FS_Read: Can't inflate file\n"); break; } ztk->in_ind = ztk->in_len - ztk->zstream.avail_in; diff --git a/gl_draw.c b/gl_draw.c index dd8a3207..20cf3675 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -326,7 +326,7 @@ cachepic_t *Draw_CachePic (const char *path, qboolean persistent) if (numcachepics == MAX_CACHED_PICS) { - Con_Printf ("Draw_CachePic: numcachepics == MAX_CACHED_PICS"); + Con_Printf ("Draw_CachePic: numcachepics == MAX_CACHED_PICS\n"); // FIXME: support NULL in callers? return cachepics; // return the first one } @@ -422,7 +422,7 @@ cachepic_t *Draw_NewPic(const char *picname, int width, int height, int alpha, u { if (numcachepics == MAX_CACHED_PICS) { - Con_Printf ("Draw_NewPic: numcachepics == MAX_CACHED_PICS"); + Con_Printf ("Draw_NewPic: numcachepics == MAX_CACHED_PICS\n"); // FIXME: support NULL in callers? return cachepics; // return the first one } diff --git a/host.c b/host.c index e02d6cce..403a5fb4 100644 --- a/host.c +++ b/host.c @@ -177,7 +177,7 @@ void Host_ServerOptions (void) if (i && i + 1 < com_argc && atoi (com_argv[i+1]) >= 1) svs.maxclients = atoi (com_argv[i+1]); if (COM_CheckParm ("-listen")) - Con_Printf ("Only one of -dedicated or -listen can be specified"); + Con_Printf ("Only one of -dedicated or -listen can be specified\n"); // default sv_public on for dedicated servers (often hosted by serious administrators), off for listen servers (often hosted by clueless users) Cvar_SetValue("sv_public", 1); } diff --git a/keys.c b/keys.c index 3df1d01e..48d2da99 100644 --- a/keys.c +++ b/keys.c @@ -861,7 +861,7 @@ Key_Event (int key, char ascii, qboolean down) if(UI_Callback_IsSlotUsed(key_dest - 3)) UI_Callback_KeyDown (key, ascii); else - Con_Printf ("Key_Event: Bad key_dest"); + Con_Printf ("Key_Event: Bad key_dest\n"); } return; } @@ -926,7 +926,7 @@ Key_Event (int key, char ascii, qboolean down) if(UI_Callback_IsSlotUsed(key_dest - 3)) UI_Callback_KeyDown (key, ascii); else - Con_Printf ("Key_Event: Bad key_dest"); + Con_Printf ("Key_Event: Bad key_dest\n"); } } diff --git a/snd_main.c b/snd_main.c index 778e68d7..7a39a48a 100644 --- a/snd_main.c +++ b/snd_main.c @@ -259,7 +259,7 @@ sfx_t *S_FindName (const char *name) if (strlen (name) >= sizeof (sfx->name)) { - Con_Printf ("S_FindName: sound name too long (%s)", name); + Con_Printf ("S_FindName: sound name too long (%s)\n", name); return NULL; } diff --git a/snd_mem.c b/snd_mem.c index e7423817..0eec602f 100644 --- a/snd_mem.c +++ b/snd_mem.c @@ -70,7 +70,7 @@ size_t ResampleSfx (const unsigned char *in_data, size_t in_length, const snd_fo // Check that we can handle one second of that sound if (in_format->speed * in_format->channels > (1 << INTEGER_BITS)) { - Con_Printf ("ResampleSfx: sound quality too high for resampling (%uHz, %u channel(s))", + Con_Printf ("ResampleSfx: sound quality too high for resampling (%uHz, %u channel(s))\n", in_format->speed, in_format->channels); return 0; } @@ -170,7 +170,7 @@ qboolean S_LoadSound (sfx_t *s, qboolean complain) if (s->fetcher != NULL) { if (s->format.speed != shm->format.speed) - Con_Printf ("S_LoadSound: sound %s hasn't been resampled (%uHz instead of %uHz)", s->name); + Con_Printf ("S_LoadSound: sound %s hasn't been resampled (%uHz instead of %uHz)\n", s->name); return true; } diff --git a/snd_wav.c b/snd_wav.c index 3fa97dca..b6cfe26c 100644 --- a/snd_wav.c +++ b/snd_wav.c @@ -205,7 +205,7 @@ static wavinfo_t GetWavinfo (char *name, unsigned char *wav, int wavlength) { if (samples < info.samples) { - Con_Printf ("Sound %s has a bad loop length", name); + Con_Printf ("Sound %s has a bad loop length\n", name); info.samples = samples; } } diff --git a/sv_main.c b/sv_main.c index cc076ff5..ac4d6df3 100644 --- a/sv_main.c +++ b/sv_main.c @@ -209,19 +209,19 @@ void SV_StartSound (prvm_edict_t *entity, int channel, const char *sample, int v if (volume < 0 || volume > 255) { - Con_Printf ("SV_StartSound: volume = %i", volume); + Con_Printf ("SV_StartSound: volume = %i\n", volume); return; } if (attenuation < 0 || attenuation > 4) { - Con_Printf ("SV_StartSound: attenuation = %f", attenuation); + Con_Printf ("SV_StartSound: attenuation = %f\n", attenuation); return; } if (channel < 0 || channel > 7) { - Con_Printf ("SV_StartSound: channel = %i", channel); + Con_Printf ("SV_StartSound: channel = %i\n", channel); return; } diff --git a/sv_phys.c b/sv_phys.c index 3db1887d..31f1e491 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -1390,7 +1390,7 @@ static void SV_Physics_Entity (prvm_edict_t *ent, qboolean runmove) SV_Physics_Toss (ent); break; default: - Con_Printf ("SV_Physics: bad movetype %i", (int)ent->fields.server->movetype); + Con_Printf ("SV_Physics: bad movetype %i\n", (int)ent->fields.server->movetype); break; } } @@ -1472,7 +1472,7 @@ void SV_Physics_ClientEntity (prvm_edict_t *ent) } break; default: - Con_Printf ("SV_Physics_ClientEntity: bad movetype %i", (int)ent->fields.server->movetype); + Con_Printf ("SV_Physics_ClientEntity: bad movetype %i\n", (int)ent->fields.server->movetype); break; } diff --git a/svvm_cmds.c b/svvm_cmds.c index 502c8449..4daffbc6 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -1141,7 +1141,7 @@ sizebuf_t *WriteDest (void) return &svs.clients[entnum-1].message; default: - Con_Printf ("WriteDest: bad destination"); + Con_Printf ("WriteDest: bad destination\n"); case MSG_ALL: return &sv.reliable_datagram; diff --git a/sys_linux.c b/sys_linux.c index 1ee5b729..1d77ae23 100644 --- a/sys_linux.c +++ b/sys_linux.c @@ -97,7 +97,7 @@ double Sys_DoubleTime (void) if (!QueryPerformanceFrequency (&PerformanceFreq)) { - Con_Printf ("No hardware timer available"); + Con_Printf ("No hardware timer available\n"); // fall back to timeGetTime Cvar_SetValueQuick(&sys_usetimegettime, true); return Sys_DoubleTime(); diff --git a/sys_win.c b/sys_win.c index c0ae22af..e48c2616 100644 --- a/sys_win.c +++ b/sys_win.c @@ -158,7 +158,7 @@ double Sys_DoubleTime (void) if (!QueryPerformanceFrequency (&PerformanceFreq)) { - Con_Printf ("No hardware timer available"); + Con_Printf ("No hardware timer available\n"); // fall back to timeGetTime Cvar_SetValueQuick(&sys_usetimegettime, true); return Sys_DoubleTime(); diff --git a/vid_glx.c b/vid_glx.c index 8c2ab74e..750c01bb 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -848,7 +848,7 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp) if ((qglGetString = (const GLubyte* (GLAPIENTRY *)(GLenum name))GL_GetProcAddress("glGetString")) == NULL) { - Con_Printf ("glGetString not found in %s", gl_driver); + Con_Printf ("glGetString not found in %s\n", gl_driver); return false; }