cleaned up all Con_Printf calls that were missing a \n
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 7 Nov 2005 11:08:12 +0000 (11:08 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 7 Nov 2005 11:08:12 +0000 (11:08 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5800 d7cf8633-e32d-0410-b094-e92efae38249

15 files changed:
cmd.c
cvar.c
fs.c
gl_draw.c
host.c
keys.c
snd_main.c
snd_mem.c
snd_wav.c
sv_main.c
sv_phys.c
svvm_cmds.c
sys_linux.c
sys_win.c
vid_glx.c

diff --git a/cmd.c b/cmd.c
index d8028e9..c0fd366 100644 (file)
--- 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 27853ee..394a832 100644 (file)
--- 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 2179d6d..4617279 100644 (file)
--- 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;
index dd8a320..20cf367 100644 (file)
--- 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 e02d6cc..403a5fb 100644 (file)
--- 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 3df1d01..48d2da9 100644 (file)
--- 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");
        }
 }
 
index 778e68d..7a39a48 100644 (file)
@@ -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;
        }
 
index e742381..0eec602 100644 (file)
--- 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;
        }
 
index 3fa97dc..b6cfe26 100644 (file)
--- 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;
                }
        }
index cc076ff..ac4d6df 100644 (file)
--- 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;
        }
 
index 3db1887..31f1e49 100644 (file)
--- 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;
        }
 
index 502c844..4daffbc 100644 (file)
@@ -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;
 
index 1ee5b72..1d77ae2 100644 (file)
@@ -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();
index c0ae22a..e48c261 100644 (file)
--- 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();
index 8c2ab74..750c01b 100644 (file)
--- 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;
        }