[axel-commits] r35 - /trunk/text.c

appaji-guest at users.alioth.debian.org appaji-guest at users.alioth.debian.org
Fri Sep 12 09:23:59 UTC 2008


Author: appaji-guest
Date: Fri Sep 12 09:23:59 2008
New Revision: 35

URL: http://svn.debian.org/wsvn/axel/?sc=1&rev=35
Log:
Use B/s, KB/s and MB/s as applicable (#310903)

Modified:
    trunk/text.c

Modified: trunk/text.c
URL: http://svn.debian.org/wsvn/axel/trunk/text.c?rev=35&op=diff
==============================================================================
--- trunk/text.c (original)
+++ trunk/text.c Fri Sep 12 09:23:59 2008
@@ -493,7 +493,12 @@
 			putchar(' ');
 	}
 	
-	printf( "] [%6.1fKB/s]", (double) axel->bytes_per_second / 1024 );
+	if(axel->bytes_per_second > 1048576)
+		printf( "] [%6.1fMB/s]", (double) axel->bytes_per_second / 1024*1024 );
+	else if(axel->bytes_per_second > 1024)
+		printf( "] [%6.1fKB/s]", (double) axel->bytes_per_second / 1024 );
+	else
+		printf( "] [%6.1fB/s]", (double) axel->bytes_per_second );
 	
 	if(done<total)
 	{




More information about the axel-commits mailing list