graveman-cvs
[Top][All Lists]
Advanced

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

[Graveman-cvs] Changes to graveman/current/src/tools.c


From: sylvain cresto
Subject: [Graveman-cvs] Changes to graveman/current/src/tools.c
Date: Sat, 05 Feb 2005 12:32:58 -0500

Index: graveman/current/src/tools.c
diff -u graveman/current/src/tools.c:1.5 graveman/current/src/tools.c:1.6
--- graveman/current/src/tools.c:1.5    Tue Feb  1 02:35:19 2005
+++ graveman/current/src/tools.c        Sat Feb  5 17:31:48 2005
@@ -121,7 +121,7 @@
 }
 
 /* format un nombre en chaine de la forme MM:SS */
-gchar *format_length(guint32 Alennbr)
+gchar *format_length(guint64 Alennbr)
 {
    guint Lmin = 0, Lsec = 0;
 
@@ -132,26 +132,26 @@
 }
 
 /* format un nombre en taille de la forme XX Mo ou XX Ko oo XX octets */
-gchar *format_size(guint32 Asize)
+gchar *format_size(guint64 Asize)
 {
-  guint32 Lko = Asize / 1024;
+  guint64 Lko = Asize / 1024;
   gdouble Lreste;
-  guint32 Lmo;
+  guint64 Lmo;
 
-  if (Lko < 1) return g_strdup_printf("%d %s", Asize, Asize > 1 ? _("octets") 
: _("octet"));
+  if (Lko < 1) return g_strdup_printf("%lld %s", (unsigned long long) Asize, 
Asize > 1 ? _("octets") : _("MB"));
   Lmo = Lko / 1024;
 
   if (Lmo < 1) {
     if (Asize - (Lko * 1024) > 511) Lko++;
-    return g_strdup_printf(_("%d K"), Lko);
+    return g_strdup_printf(_("%lld K"), (unsigned long long) Lko);
   }
 
   Lreste = (Lko - (Lmo * 1024));
   Lreste = Lreste / 1024;
   if (Lreste > 0 && Lreste < 1) {
-    return g_strdup_printf(_("%d.%.0f MB"), Lmo, Lreste * 10);
+    return g_strdup_printf(_("%lld.%.0f MB"), (unsigned long long) Lmo, Lreste 
* 10);
   } else {
-    return g_strdup_printf(_("%d MB"), Lmo);
+    return g_strdup_printf(_("%lld MB"), (unsigned long long) Lmo);
   }
 }
 




reply via email to

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