From de9c37dd91ea2ce66f58ea7686b8e73ab9795cb8 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 19 Dec 2007 13:25:09 +0000 Subject: [PATCH] Rename g_format_file_size_for_display to g_format_size_for_display. 2007-12-19 Alexander Larsson * 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 | 6 ++++++ glib/gfileutils.c | 16 +++++++++------- glib/gfileutils.h | 2 +- glib/glib.symbols | 2 +- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74f143ad..95644034 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-12-19 Alexander Larsson + + * 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 * docs/reference/glib/glib-sections.txt: diff --git a/glib/gfileutils.c b/glib/gfileutils.c index c11420d7..92a2fd08 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -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); diff --git a/glib/gfileutils.h b/glib/gfileutils.h index 989fe8a5..58f2d23a 100644 --- a/glib/gfileutils.h +++ b/glib/gfileutils.h @@ -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, diff --git a/glib/glib.symbols b/glib/glib.symbols index c9674b7f..6d5d393d 100644 --- a/glib/glib.symbols +++ b/glib/glib.symbols @@ -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 -- 2.34.1