aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-util.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2008-11-02 22:16:17 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-11-02 22:16:17 +0800
commit71b380658b14b5511dc5008a4eda649c97a6cfae (patch)
tree5533a02bcd9ea54e2aae783190421944ce4e5bc3 /e-util/e-util.c
parentbfdb40c459f61da80587af2bb234c835b075ea4c (diff)
downloadgsoc2013-evolution-71b380658b14b5511dc5008a4eda649c97a6cfae.tar.gz
gsoc2013-evolution-71b380658b14b5511dc5008a4eda649c97a6cfae.tar.zst
gsoc2013-evolution-71b380658b14b5511dc5008a4eda649c97a6cfae.zip
Remove this unused internal function.
2008-11-02 Matthew Barnes <mbarnes@redhat.com> * e-util.c (do_format_number_as_float): Remove this unused internal function. svn path=/trunk/; revision=36713
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r--e-util/e-util.c88
1 files changed, 0 insertions, 88 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c
index 2ce78ea0e2..f05c9d907a 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -332,94 +332,6 @@ e_format_number (gint number)
}
}
-static gchar *
-do_format_number_as_float (gdouble number)
-{
- GList *iterator, *list = NULL;
- struct lconv *locality;
- gint char_length = 0;
- gint group_count = 0;
- gchar *grouping;
- gint last_count = 3;
- gint divider;
- gchar *value;
- gchar *value_iterator;
- gdouble fractional;
-
- locality = localeconv();
- grouping = locality->grouping;
- while (number >= 1.0) {
- gchar *group;
- switch (*grouping) {
- default:
- last_count = *grouping;
- grouping++;
- /* Fall through */
- case 0:
- divider = epow10(last_count);
- number /= divider;
- fractional = modf (number, &number);
- fractional *= divider;
- fractional = floor (fractional);
-
- if (number >= 1.0) {
- group = g_strdup_printf("%0*d", last_count, (int) fractional);
- } else {
- group = g_strdup_printf("%d", (gint) fractional);
- }
- break;
- case CHAR_MAX:
- divider = epow10(last_count);
- number /= divider;
- fractional = modf (number, &number);
- fractional *= divider;
- fractional = floor (fractional);
-
- while (number >= 1.0) {
- group = g_strdup_printf("%0*d", last_count, (gint) fractional);
-
- char_length += strlen(group);
- list = g_list_prepend(list, group);
- group_count ++;
-
- divider = epow10(last_count);
- number /= divider;
- fractional = modf (number, &number);
- fractional *= divider;
- fractional = floor (fractional);
- }
-
- group = g_strdup_printf("%d", (gint) fractional);
- break;
- }
- char_length += strlen(group);
- list = g_list_prepend(list, group);
- group_count ++;
- }
-
- if (list) {
- value = g_new(gchar, 1 + char_length + (group_count - 1) * strlen(locality->thousands_sep));
-
- iterator = list;
- value_iterator = value;
-
- strcpy(value_iterator, iterator->data);
- value_iterator += strlen(iterator->data);
- for (iterator = iterator->next; iterator; iterator = iterator->next) {
- strcpy(value_iterator, locality->thousands_sep);
- value_iterator += strlen(locality->thousands_sep);
-
- strcpy(value_iterator, iterator->data);
- value_iterator += strlen(iterator->data);
- }
- g_list_foreach (list, (GFunc) g_free, NULL);
- g_list_free (list);
- return value;
- } else {
- return g_strdup("0");
- }
-}
-
/* Perform a binary search for key in base which has nmemb elements
of size bytes each. The comparisons are done by (*compare)(). */
void