innfeed/host.c

Igor Timkin ivt at newsfeed.gamma.ru
Mon Dec 25 13:04:58 UTC 2000


Add TerraByte size.

--- innfeed/host.c	Thu Sep 21 21:25:39 2000
+++ innfeed/host.c.NEW	Mon Dec 25 15:59:35 2000
@@ -2893,15 +2893,20 @@
 
 
 
-static double convsize(double size, char **tsize)
+static double
+convsize(double size, char **tsize)
 {
     double dsize;
+    static char tTB[]="TB";
     static char tGB[]="GB";
     static char tMB[]="MB";
     static char tKB[]="KB";
     static char tB []="B";
 
-    if (size/(1024*1024*1000)>=1.) {
+    if (size/((double)1024*1024*1024*1000)>=1.) {
+	dsize=size/((double)1024*1024*1024*1024);
+	*tsize=tTB;
+    } else if (size/(1024*1024*1000)>=1.) {
 	dsize=size/(1024*1024*1024);
 	*tsize=tGB;
     } else if (size/(1024*1000)>=1.) {



More information about the inn-patches mailing list