]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
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 d8028e90ef33ab5f44c6e2619869b8904bfc6762..c0fd366536f08a459ceb0d66c5d84bdc036f93bd 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 27853eec54b3d504feaa968aa5c6a6532e405045..394a83270ac220db05219120c40ddb17770ca00c 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 2179d6d5db6cfe38191e8afaed39f9d3b86e6472..46172798fe28f0a4f91ab0a677d99e14ad654cc1 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 dd8a32070683d75562de1b639aa8a1adc6685ac8..20cf36755f1276a44fbb0861052261fbb5c999c5 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 e02d6cceb57f987c30855789db9ba32ba7ecbc2d..403a5fb4302e7e0947377095f15a4b2e65aed3e5 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 3df1d01e5873c0a15510d2b06039d654f0d6b328..48d2da9904653e026bc1d4b87b6c2a8bc8ceda08 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 778e68d73285a5e2625cddc1754debc5aba52743..7a39a48a0779d25f28576575b2e8ae1e849d0755 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 e74238179f5156051689e3f01cb16fa1b8967a0e..0eec602f9dbb478ef777ed1370d6b57dc8a48915 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 3fa97dca8df81cbb191d73f75468705b24b6541b..b6cfe26cc83d683cf42ac55b20294c00bf76bacd 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 cc076ff572466c8d7d9718c18ec4c8f136250d41..ac4d6df35da4fcacac2aacaa60e23ad7d7320ba0 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 3db1887dec1048920f11fe4fb951db32905196d1..31f1e49125d660ef5ed83d9ea8f8ede2e8032a7a 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 502c8449f9ec5f72944968cf08a1477eff1b3ba6..4daffbc6ae63033cd363670ba587771cf05ce6e5 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 1ee5b729dc76b09b505ea25012a3475f488eb459..1d77ae238524bef9dfec71ef94344f65629b42ba 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 c0ae22af3006c3230409385a0cc0dbb763e418b1..e48c2616acdf17cc49ddecc816e155a84609bcb3 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 8c2ab74e667ce491225455b07e9da45f27c8b99c..750c01bb9cc80d05d3a954404c61e2328f927fc4 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;
        }