Rename g_format_file_size_for_display to g_format_size_for_display.
authorAlexander Larsson <alexl@redhat.com>
Wed, 19 Dec 2007 13:25:09 +0000 (13:25 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Wed, 19 Dec 2007 13:25:09 +0000 (13:25 +0000)
2007-12-19  Alexander Larsson  <alexl@redhat.com>

        * glib/gfileutils.[ch]:
        * glib/glib.symbols:
        Rename g_format_file_size_for_display to g_format_size_for_display.

svn path=/trunk/; revision=6158

ChangeLog
glib/gfileutils.c
glib/gfileutils.h
glib/glib.symbols

index 74f143a..9564403 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-12-19  Alexander Larsson  <alexl@redhat.com>
+
+        * glib/gfileutils.[ch]:
+        * glib/glib.symbols:
+        Rename g_format_file_size_for_display to g_format_size_for_display.
+
 2007-12-18  Tim-Philipp Müller  <tim at centricular dot net>
 
        * docs/reference/glib/glib-sections.txt:
index c11420d..92a2fd0 100644 (file)
@@ -1805,20 +1805,22 @@ g_build_filename (const gchar *first_element,
 #define GIGABYTE_FACTOR (1024.0 * 1024.0 * 1024.0)
 
 /**
- * g_format_file_size_for_display:
- * @size: a file size.
+ * g_format_size_for_display:
+ * @size: a size in bytes.
  * 
- * Formats a file size into a human readable string. Sizes are rounded
- * to the nearest metric prefix and are displayed rounded to the nearest 
- * tenth. E.g. the file size 3292528 bytes will be converted into the string 
- * "3.1 MB".
+ * Formats a size (for example the size of a file) into a human readable string.
+ * Sizes are rounded to the nearest size prefix (KB, MB, GB) and are displayed rounded to
+ * the nearest  tenth. E.g. the file size 3292528 bytes will be converted into
+ * the string "3.1 MB".
+ *
+ * The prefix units base is 1024 (i.e. 1 KB is 1024 bytes).
  * 
  * Returns: a formatted string containing a human readable file size.
  *
  * Since: 2.16
  **/
 char *
-g_format_file_size_for_display (goffset size)
+g_format_size_for_display (goffset size)
 {
   if (size < (goffset) KILOBYTE_FACTOR)
     return g_strdup_printf (dngettext(GETTEXT_PACKAGE, "%u byte", "%u bytes",(guint) size), (guint) size);
index 989fe8a..58f2d23 100644 (file)
@@ -101,7 +101,7 @@ gint    g_file_open_tmp      (const gchar  *tmpl,
                              gchar       **name_used,
                              GError      **error);
 
-char *g_format_file_size_for_display (goffset size);
+char *g_format_size_for_display (goffset size);
 
 gchar *g_build_path     (const gchar *separator,
                         const gchar *first_element,
index c9674b7..6d5d393 100644 (file)
@@ -351,7 +351,7 @@ g_file_set_contents
 g_file_open_tmp PRIVATE
 g_file_test PRIVATE
 g_file_read_link
-g_format_file_size_for_display
+g_format_size_for_display
 g_mkstemp PRIVATE
 g_mkdir_with_parents
 #ifdef G_OS_WIN32