aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-util.c88
2 files changed, 5 insertions, 88 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 3cc045e114..d53074fdcd 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-02 Matthew Barnes <mbarnes@redhat.com>
+
+ * e-util.c (do_format_number_as_float):
+ Remove this unused internal function.
+
2008-10-30 Matthew Barnes <mbarnes@redhat.com>
* e-icon-factory.c:
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