diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-02-28 04:44:38 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-02-28 04:44:38 +0000 |
commit | 2f47e63a880b52b160ba8010a3d5a6c85b012dc2 (patch) | |
tree | 38b4801a7e02d1929ab62d194bb0427ab1bc4dca /wsutil/str_util.c | |
parent | fb8f5b815a834f6e13c239b417fa5dc0b1868113 (diff) |
str_util.c: Although the glib documentation doesn't explicitly say so,
it looks like the thousands grouping (') modifier is supported so use it
in format_size.
capinfos.c: Set our locale.
svn path=/trunk/; revision=47934
Diffstat (limited to 'wsutil/str_util.c')
-rw-r--r-- | wsutil/str_util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wsutil/str_util.c b/wsutil/str_util.c index f2de5bfbee..5b5bc27450 100644 --- a/wsutil/str_util.c +++ b/wsutil/str_util.c @@ -107,15 +107,15 @@ gchar *format_size(gint64 size, format_size_flags_e flags) { } if (size / power / power / power / power >= 10) { - g_string_printf(human_str, "%" G_GINT64_MODIFIER "d %s", size / power / power / power / power, prefix[pfx_off]); + g_string_printf(human_str, "%'" G_GINT64_MODIFIER "d %s", size / power / power / power / power, prefix[pfx_off]); } else if (size / power / power / power >= 10) { - g_string_printf(human_str, "%" G_GINT64_MODIFIER "d %s", size / power / power / power, prefix[pfx_off+1]); + g_string_printf(human_str, "%'" G_GINT64_MODIFIER "d %s", size / power / power / power, prefix[pfx_off+1]); } else if (size / power / power >= 10) { - g_string_printf(human_str, "%" G_GINT64_MODIFIER "d %s", size / power / power, prefix[pfx_off+2]); + g_string_printf(human_str, "%'" G_GINT64_MODIFIER "d %s", size / power / power, prefix[pfx_off+2]); } else if (size / power >= 10) { - g_string_printf(human_str, "%" G_GINT64_MODIFIER "d %s", size / power, prefix[pfx_off+3]); + g_string_printf(human_str, "%'" G_GINT64_MODIFIER "d %s", size / power, prefix[pfx_off+3]); } else { - g_string_printf(human_str, "%" G_GINT64_MODIFIER "d ", size); + g_string_printf(human_str, "%'" G_GINT64_MODIFIER "d ", size); is_small = TRUE; } |