]> granicus.if.org Git - libjpeg-turbo/commitdiff
Fix a couple of output formatting issues
authorDRC <dcommander@users.sourceforge.net>
Wed, 12 Mar 2014 07:16:17 +0000 (07:16 +0000)
committerDRC <dcommander@users.sourceforge.net>
Wed, 12 Mar 2014 07:16:17 +0000 (07:16 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1158 632fc199-4ca6-4c93-a231-07263d6284db

tjbench.c

index 1d1c504a5c33f41eab20c0e67123a3d52af1d5f9..454faa5bcca306fcb8cb0ddd5fc43cc00e2c1b79 100644 (file)
--- a/tjbench.c
+++ b/tjbench.c
@@ -190,13 +190,14 @@ int decomp(unsigned char *srcbuf, unsigned char **jpegbuf,
 
        if(quiet)
        {
-               printf("%-6s  ",
-                       sigfig((double)(w*h)/1000000.*(double)iter/elapsed, 4, tempstr, 1024));
+               printf("%-6s%s",
+                       sigfig((double)(w*h)/1000000.*(double)iter/elapsed, 4, tempstr, 1024),
+                       quiet==2? "\n":"  ");
                if(doyuv)
-                       printf("%s",
+                       printf("%s\n",
                                sigfig((double)(w*h)/1000000.*(double)iter/elapsedDecode, 4, tempstr,
                                        1024));
-               printf("\n");
+               else if(quiet!=2) printf("\n");
        }
        else
        {