bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Locate: Negative compression-ratios.


From: Bas van Gompel
Subject: Locate: Negative compression-ratios.
Date: Sat, 25 Dec 2004 21:29:21 +0100 (MET)
User-agent: slrn/0.9.8.1 (Win32) Hamster/2.0.6.0 Korrnews/4.2

Hi,

Currently, negative compression-ratios are displayed as huge numbers
Following patch fixes it.


2004-12-25  Bas van Gompel  <address@hidden>

        * locate/locate.c (new_locate): Fix display of negative compression
        ratios.


--- locate/locate.c     2004-12-23 17:57:26.000000000 +0100
+++ locate/locate.c     2004-12-25 20:16:48.000000000 +0100
@@ -658,7 +658,7 @@ new_locate (char *pathpart,
                             hbuf, human_ceiling, 1, 1));
       
       printf(_("Compression ratio %4.2f%%\n"),
-            100.0 * (double)(statistics.total_filename_length - st.st_size)
+            100.0 * (double)((int)statistics.total_filename_length - 
st.st_size)
             / (double) statistics.total_filename_length);
       printf("\n");
     }


HANX, KUTGW.

Buzz.

BTW: How do you manage the ChangeLog? I don't see anything recent in
there.
-- 
  ) |  | ---/ ---/  Yes, this | This message consists of true | I do not
--  |  |   /    /   really is |   and false bits entirely.    | mail for
  ) |  |  /    /    a 72 by 4 +-------------------------------+ any1 but
--  \--| /--- /---  .sigfile. |   |perl -pe "s.u(z)\1.as."    | me. 4^re




reply via email to

[Prev in Thread] Current Thread [Next in Thread]