evolution r36714 - branches/gnome-2-24/e-util
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r36714 - branches/gnome-2-24/e-util
- Date: Sun, 2 Nov 2008 14:18:20 +0000 (UTC)
Author: mbarnes
Date: Sun Nov 2 14:18:20 2008
New Revision: 36714
URL: http://svn.gnome.org/viewvc/evolution?rev=36714&view=rev
Log:
2008-11-02 Matthew Barnes <mbarnes redhat com>
* e-util.c (do_format_number_as_float):
Remove this unused internal function.
Modified:
branches/gnome-2-24/e-util/ChangeLog
branches/gnome-2-24/e-util/e-util.c
Modified: branches/gnome-2-24/e-util/e-util.c
==============================================================================
--- branches/gnome-2-24/e-util/e-util.c (original)
+++ branches/gnome-2-24/e-util/e-util.c Sun Nov 2 14:18:20 2008
@@ -332,94 +332,6 @@
}
}
-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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]