[gnome-commander] Use G_GUINT64_FORMAT specifier and guint64



commit fe8dedea51d712fe3972379edffbf1e56a3e9016
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Thu Feb 25 22:30:01 2021 +0100

    Use G_GUINT64_FORMAT specifier and guint64

 src/gnome-cmd-file.cc | 4 ++--
 src/utils.cc          | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index 59c2202d..33a9e911 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -55,7 +55,7 @@ struct GnomeCmdFile::Private
     Handle *dir_handle;
     GTimeVal last_update;
     gint ref_cnt;
-    GnomeVFSFileSize tree_size;
+    guint64 tree_size;
 };
 
 
@@ -719,7 +719,7 @@ guint64 GnomeCmdFile::calc_tree_size (gulong *count)
 {
     g_return_val_if_fail (this->gFile != NULL, -1);
 
-    GnomeVFSFileSize size = 0;
+    guint64 size = 0;
 
     if (GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_STANDARD_TYPE) == G_FILE_TYPE_DIRECTORY)
     {
diff --git a/src/utils.cc b/src/utils.cc
index 441b2eae..fdef4e94 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -338,13 +338,13 @@ const gchar *size2string (guint64 size, GnomeCmdSizeDispMode size_disp_mode)
                 if (i)
                     g_snprintf (buf0, sizeof(buf0), "%.1f %s ", dsize, prefixes[i]);
                 else
-                    g_snprintf (buf0, sizeof(buf0), "%lu %s ", size, prefixes[0]);
+                    g_snprintf (buf0, sizeof(buf0), "%" G_GUINT64_FORMAT " %s ", size, prefixes[0]);
             }
             break;
 
         case GNOME_CMD_SIZE_DISP_MODE_GROUPED:
             {
-                gint len = g_snprintf (buf0, sizeof(buf0), "%lu ", size);
+                gint len = g_snprintf (buf0, sizeof(buf0), "%" G_GUINT64_FORMAT " ", size);
 
                 if (len < 5)
                     return buf0;
@@ -367,11 +367,11 @@ const gchar *size2string (guint64 size, GnomeCmdSizeDispMode size_disp_mode)
             return buf1;
 
         case GNOME_CMD_SIZE_DISP_MODE_LOCALE:
-            g_snprintf (buf0, sizeof(buf0), "%'lu ", size);
+            g_snprintf (buf0, sizeof(buf0), "%'" G_GUINT64_FORMAT " ", size);
             break;
 
         case GNOME_CMD_SIZE_DISP_MODE_PLAIN:
-            g_snprintf (buf0, sizeof(buf0), "%lu ", size);
+            g_snprintf (buf0, sizeof(buf0), "%" G_GUINT64_FORMAT " ", size);
             break;
 
         default:


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