[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_2-28-g25dab4b

Rémi Cardona nobody at users.sourceforge.net
Sat Jul 16 19:27:40 CEST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, master has been updated
       via  25dab4bf1a94aa7db35f2fb6b99ff7dc7b50ba1f (commit)
       via  01ca9641bb9185f0f8070f8f00fd77274533f078 (commit)
       via  d2c6ce18911b51dd69d9375928b2098e0eaf3bc9 (commit)
       via  baf7785154bda069f921d158d3f93e2ec44960ce (commit)
       via  9cf50168adff0225e2e0ff451efde8f392a53e9c (commit)
       via  3c65049d8181ee5d54b96b4d3726ce99001c3650 (commit)
       via  b2ad0fdb440b36bec3cb09610dcf249e1c7dc508 (commit)
       via  fd02168ace5e6672432dfeb9efbdeed4e87852ce (commit)
      from  5e80350a2ba8d4648594d9b0d459f29c0ccc87be (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 25dab4bf1a94aa7db35f2fb6b99ff7dc7b50ba1f
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sun May 22 17:45:16 2011 +0200

    utils_real: rename gsb_real_get_from_string() to utils_real_get_from_string()

commit 01ca9641bb9185f0f8070f8f00fd77274533f078
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sun May 22 09:47:10 2011 +0200

    utils_real: rename gsb_real_get_string_with_currency() to utils_real_get_string_with_currency()

commit d2c6ce18911b51dd69d9375928b2098e0eaf3bc9
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sun May 22 08:36:05 2011 +0200

    utils_real: rename gsb_real_get_string() to utils_real_get_string()

commit baf7785154bda069f921d158d3f93e2ec44960ce
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sun May 22 09:41:47 2011 +0200

    tests: split some tests out from gsb_real_cunit.c to utils_real_cunit.c
    
    This better reflects what happened in the source dir.

commit 9cf50168adff0225e2e0ff451efde8f392a53e9c
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sat May 21 09:04:40 2011 +0200

    utils_real: move gsb_real_get_from_string() to a new location

commit 3c65049d8181ee5d54b96b4d3726ce99001c3650
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sun May 22 09:56:02 2011 +0200

    utils_real: move gsb_real_get_string_with_currency() to a new location

commit b2ad0fdb440b36bec3cb09610dcf249e1c7dc508
Author: Rémi Cardona <remi at gentoo.org>
Date:   Fri May 20 11:05:01 2011 +0200

    utils_real: move gsb_real_get_string() to a new location

commit fd02168ace5e6672432dfeb9efbdeed4e87852ce
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sun May 22 08:27:58 2011 +0200

    Add missing includes in utils_str.h

-----------------------------------------------------------------------

Changes:
diff --git a/src/Makefile.am b/src/Makefile.am
index 7cc4096..beddca6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -151,6 +151,7 @@ libgrisbi_la_SOURCES = \
 	utils_files.c		\
 	utils_font.c		\
 	utils_operations.c	\
+	utils_real.c		\
 	utils_str.c		\
 	bet_config.c \
 	bet_data.c \
@@ -302,6 +303,7 @@ libgrisbi_la_SOURCES = \
 	utils_files.h		\
 	utils_font.h		\
 	utils_operations.h	\
+	utils_real.h		\
 	utils_str.h
 
 grisbi_SOURCES = 		\
diff --git a/src/accueil.c b/src/accueil.c
index dd60b77..5bc8e7c 100644
--- a/src/accueil.c
+++ b/src/accueil.c
@@ -52,6 +52,7 @@
 #include "structures.h"
 #include "utils.h"
 #include "utils_dates.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -854,7 +855,7 @@ void gsb_main_page_affiche_ligne_du_compte ( GtkWidget *pTable,
     gtk_widget_show ( pLabel );
 
     /* Deuxième colonne : elle contient le solde pointé du compte */
-    tmpstr = gsb_real_get_string_with_currency (
+    tmpstr = utils_real_get_string_with_currency (
             gsb_data_account_get_marked_balance ( account_number ),
             gsb_data_account_get_currency (account_number), TRUE);
     pLabel = gtk_label_new ( tmpstr );
@@ -913,7 +914,7 @@ void gsb_main_page_affiche_ligne_du_compte ( GtkWidget *pTable,
     gtk_widget_show ( pLabel );
 
     /* Troisième colonne : elle contient le solde courant du compte */
-    tmpstr = gsb_real_get_string_with_currency (
+    tmpstr = utils_real_get_string_with_currency (
             gsb_data_account_get_current_balance (account_number),
             gsb_data_account_get_currency (account_number), TRUE);
     pLabel = gtk_label_new ( tmpstr );
@@ -1107,7 +1108,7 @@ void affiche_solde_des_comptes ( GtkWidget *table,
 	gtk_widget_show ( label );
 
 	/* Deuxième colonne : elle contient le solde total pointé des comptes */
-	tmpstr = gsb_real_get_string_with_currency (solde_global_pointe,
+	tmpstr = utils_real_get_string_with_currency (solde_global_pointe,
 								    currency_number, TRUE);
 	label = gtk_label_new ( tmpstr );
 	g_free ( tmpstr );
@@ -1116,7 +1117,7 @@ void affiche_solde_des_comptes ( GtkWidget *table,
 	gtk_widget_show ( label );
 
 	/* Troisième colonne : elle contient le solde total courant des comptes */
-	tmpstr = gsb_real_get_string_with_currency (solde_global_courant, currency_number, TRUE);
+	tmpstr = utils_real_get_string_with_currency (solde_global_courant, currency_number, TRUE);
 	label = gtk_label_new ( tmpstr );
 	g_free ( tmpstr );
 	gtk_misc_set_alignment ( GTK_MISC ( label ), MISC_RIGHT, MISC_VERT_CENTER );
@@ -1326,7 +1327,7 @@ void update_liste_echeances_manuelles_accueil ( gboolean force )
 	    /* label à droite */
 	    if ( gsb_data_scheduled_get_amount (scheduled_number).mantissa >= 0 )
 	    {
-		gchar* tmpstr2 = gsb_real_get_string_with_currency (
+		gchar* tmpstr2 = utils_real_get_string_with_currency (
 			gsb_data_scheduled_get_amount (scheduled_number), currency_number, TRUE);
                 gchar* tmpstr = g_strdup_printf ( _("%s credited on %s"), tmpstr2,
 							  gsb_data_account_get_name (account_number));
@@ -1336,7 +1337,7 @@ void update_liste_echeances_manuelles_accueil ( gboolean force )
 	    }
 	    else
 	    {
-		gchar* tmpstr2 = gsb_real_get_string_with_currency (gsb_real_abs (
+		gchar* tmpstr2 = utils_real_get_string_with_currency (gsb_real_abs (
 				  gsb_data_scheduled_get_amount (scheduled_number)), currency_number, TRUE);
 	        gchar* tmpstr = g_strdup_printf ( _("%s debited on %s"), tmpstr2,
 							  gsb_data_account_get_name (account_number));
@@ -1450,7 +1451,7 @@ void update_liste_echeances_auto_accueil ( gboolean force )
 
 	    if ( gsb_data_transaction_get_amount (transaction_number).mantissa >= 0 )
 	    {
-		gchar* tmpstr2 = gsb_real_get_string_with_currency (
+		gchar* tmpstr2 = utils_real_get_string_with_currency (
 			gsb_data_transaction_get_amount (transaction_number), currency_number, TRUE);
 	        gchar* tmpstr = g_strdup_printf ( _("%s credited on %s"), tmpstr2 ,
 							  gsb_data_account_get_name (account_number));
@@ -1460,7 +1461,7 @@ void update_liste_echeances_auto_accueil ( gboolean force )
 	    }
 	    else
 	    {
-		gchar* tmpstr2 = gsb_real_get_string_with_currency (gsb_real_abs (
+		gchar* tmpstr2 = utils_real_get_string_with_currency (gsb_real_abs (
 			gsb_data_transaction_get_amount (transaction_number)), currency_number, TRUE);
 	        gchar* tmpstr = g_strdup_printf ( _("%s debited on %s"),
 					  tmpstr2, gsb_data_account_get_name (account_number));
@@ -1911,7 +1912,7 @@ gboolean gsb_main_page_update_finished_scheduled_transactions ( gint scheduled_n
 
     if ( gsb_data_scheduled_get_amount (scheduled_number).mantissa >= 0 )
     {
-	gchar* tmpstr2 = gsb_real_get_string_with_currency ( gsb_data_scheduled_get_amount (
+	gchar* tmpstr2 = utils_real_get_string_with_currency ( gsb_data_scheduled_get_amount (
 		scheduled_number), currency_number, TRUE );
         tmpstr = g_strdup_printf ( _("%s credited on %s"),
 				  tmpstr2,
@@ -1920,7 +1921,7 @@ gboolean gsb_main_page_update_finished_scheduled_transactions ( gint scheduled_n
     }
     else
     {
-	gchar* tmpstr2 = gsb_real_get_string_with_currency ( gsb_real_abs (
+	gchar* tmpstr2 = utils_real_get_string_with_currency ( gsb_real_abs (
 		gsb_data_scheduled_get_amount (scheduled_number)), currency_number, TRUE );
 	tmpstr = g_strdup_printf ( _("%s debited on %s"),
 				  tmpstr2,
diff --git a/src/bet_config.c b/src/bet_config.c
index 2dd3168..6309faa 100644
--- a/src/bet_config.c
+++ b/src/bet_config.c
@@ -50,6 +50,7 @@
 #include "traitement_variables.h"
 #include "utils.h"
 #include "utils_dates.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -1411,7 +1412,7 @@ void bet_config_initialise_finance_widget ( gint account_number,
     /* set capital */
     widget = g_object_get_data ( G_OBJECT ( parent ), "bet_config_capital" );
     gtk_entry_set_text ( GTK_ENTRY ( widget ),
-                        gsb_real_get_string_with_currency (
+                        utils_real_get_string_with_currency (
                         gsb_real_double_to_real (
                         gsb_data_account_get_bet_finance_capital ( account_number ) ),
                         devise, FALSE ) );
@@ -1439,7 +1440,7 @@ void bet_config_initialise_finance_widget ( gint account_number,
     /* set frais */
     widget = g_object_get_data ( G_OBJECT ( parent ), "bet_config_montant_frais" );
     gtk_entry_set_text ( GTK_ENTRY ( widget ),
-                        gsb_real_get_string_with_currency (
+                        utils_real_get_string_with_currency (
                         gsb_real_double_to_real (
                         gsb_data_account_get_bet_finance_frais ( account_number ) ),
                         devise, FALSE ) );
diff --git a/src/bet_finance_ui.c b/src/bet_finance_ui.c
index e3e8a99..1f98372 100644
--- a/src/bet_finance_ui.c
+++ b/src/bet_finance_ui.c
@@ -51,6 +51,7 @@
 #include "utils.h"
 #include "utils_dates.h"
 #include "utils_file_selection.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -233,7 +234,7 @@ GtkWidget *bet_finance_create_simulator_page ( void )
     gtk_label_set_justify ( GTK_LABEL ( label ), GTK_JUSTIFY_LEFT );
     gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 5 );
 
-    str_capital = gsb_real_get_string_with_currency ( gsb_real_double_to_real (
+    str_capital = utils_real_get_string_with_currency ( gsb_real_double_to_real (
                         etat.bet_capital ),
                         etat.bet_currency,
                         FALSE );
@@ -809,7 +810,7 @@ gdouble bet_finance_get_number_from_string ( GtkWidget *parent, const gchar *nam
         {
             number = utils_str_strtod ( entry, NULL );
 
-            tmp_str = gsb_real_get_string_with_currency (
+            tmp_str = utils_real_get_string_with_currency (
                                 gsb_real_double_to_real ( number ),
                                 etat.bet_currency,
                                 FALSE );
@@ -845,26 +846,26 @@ void bet_finance_fill_data_ligne ( GtkTreeModel *model,
 
     str_duree = g_strconcat ( utils_str_itoa ( s_echeance -> duree ), " ", unit, " ", NULL );
 
-    str_capital = gsb_real_get_string_with_currency (
+    str_capital = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_echeance -> capital ),
                         s_echeance -> devise, TRUE );
 
     nbre_char = g_sprintf ( buffer, "%.2f", s_echeance -> taux );
     str_taux =  g_strndup ( buffer, nbre_char + 1 );
 
-    str_frais = gsb_real_get_string_with_currency (
+    str_frais = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_echeance -> frais ),
                         s_echeance -> devise, TRUE );
 
-    str_echeance = gsb_real_get_string_with_currency (
+    str_echeance = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_echeance -> echeance ),
                         s_echeance -> devise, TRUE );
 
-    str_totale = gsb_real_get_string_with_currency (
+    str_totale = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_echeance -> total_echeance ),
                         s_echeance -> devise, TRUE );
 
-    str_total_cost = gsb_real_get_string_with_currency (
+    str_total_cost = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_echeance -> total_cost ),
                         s_echeance -> devise, TRUE );
 
@@ -1409,7 +1410,7 @@ void bet_finance_fill_amortization_array ( GtkWidget *menu_item,
                         s_amortissement -> interets,
                         s_amortissement -> frais );
             g_free ( s_amortissement -> str_echeance );
-            s_amortissement -> str_echeance = gsb_real_get_string_with_currency (
+            s_amortissement -> str_echeance = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_amortissement -> echeance ),
                         s_amortissement ->  devise, TRUE );
             s_amortissement -> principal = s_amortissement -> capital_du;
@@ -1448,15 +1449,15 @@ void bet_finance_fill_amortization_ligne ( GtkTreeModel *model,
     gchar *str_interets = NULL;
     gchar *str_principal = NULL;
 
-    str_capital_du = gsb_real_get_string_with_currency (
+    str_capital_du = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_amortissement -> capital_du ),
                         s_amortissement -> devise, TRUE );
 
-    str_interets = gsb_real_get_string_with_currency (
+    str_interets = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_amortissement -> interets ),
                         s_amortissement ->  devise, TRUE );
 
-    str_principal = gsb_real_get_string_with_currency (
+    str_principal = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_amortissement -> principal ),
                         s_amortissement ->  devise, TRUE );
 
@@ -1643,7 +1644,7 @@ void bet_finance_ui_update_amortization_tab ( gint account_number )
     /* set capital */
     s_amortissement -> capital_du = gsb_data_account_get_bet_finance_capital ( account_number );
     label = g_object_get_data ( G_OBJECT ( account_page ), "bet_finance_capital" );
-    tmp_str = gsb_real_get_string_with_currency (
+    tmp_str = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_amortissement -> capital_du ),
                         s_amortissement -> devise, TRUE );
     gtk_label_set_label ( GTK_LABEL ( label ), tmp_str );
@@ -1672,7 +1673,7 @@ void bet_finance_ui_update_amortization_tab ( gint account_number )
 
     /* set frais */
     s_amortissement -> frais = gsb_data_account_get_bet_finance_frais ( account_number );
-    s_amortissement -> str_frais = gsb_real_get_string_with_currency (
+    s_amortissement -> str_frais = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_amortissement -> frais ),
                         s_amortissement -> devise, TRUE );
 
@@ -1684,7 +1685,7 @@ void bet_finance_ui_update_amortization_tab ( gint account_number )
     s_amortissement -> echeance = bet_data_finance_get_echeance ( s_amortissement -> capital_du,
                         taux_periodique, nbre_echeances );
     s_amortissement -> echeance += s_amortissement -> frais;
-    s_amortissement -> str_echeance = gsb_real_get_string_with_currency (
+    s_amortissement -> str_echeance = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_amortissement -> echeance ),
                         s_amortissement -> devise, TRUE );
 
@@ -1700,7 +1701,7 @@ void bet_finance_ui_update_amortization_tab ( gint account_number )
                         s_amortissement -> interets,
                         s_amortissement -> frais );
             g_free ( s_amortissement -> str_echeance );
-            s_amortissement -> str_echeance = gsb_real_get_string_with_currency (
+            s_amortissement -> str_echeance = utils_real_get_string_with_currency (
                         gsb_real_double_to_real ( s_amortissement -> echeance ),
                         s_amortissement ->  devise, TRUE );
             s_amortissement -> principal = s_amortissement -> capital_du;
@@ -2096,7 +2097,7 @@ gboolean bet_finance_capital_entry_key_press_event ( GtkWidget *widget,
             break;
 
         case GDK_Escape :
-            str_capital = gsb_real_get_string_with_currency ( gsb_real_double_to_real (
+            str_capital = utils_real_get_string_with_currency ( gsb_real_double_to_real (
                                     etat.bet_capital ),
                                     etat.bet_currency,
                                     FALSE );
diff --git a/src/bet_future.c b/src/bet_future.c
index ec3f3f3..b243100 100644
--- a/src/bet_future.c
+++ b/src/bet_future.c
@@ -56,6 +56,7 @@
 #include "utils_editables.h"
 #include "gtk_combofix.h"
 #include "utils.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "structures.h"
 #include "gsb_data_payment.h"
@@ -1392,13 +1393,13 @@ gboolean bet_future_set_form_data_from_line ( gint account_number,
     if ( scheduled -> amount.mantissa < 0 )
     {
         widget = bet_form_widget_get_widget ( TRANSACTION_FORM_DEBIT );
-        gtk_entry_set_text ( GTK_ENTRY ( widget ), gsb_real_get_string (
+        gtk_entry_set_text ( GTK_ENTRY ( widget ), utils_real_get_string (
                         gsb_real_opposite ( scheduled -> amount ) ) );
     }
     else
     {
         widget = bet_form_widget_get_widget ( TRANSACTION_FORM_CREDIT );
-        gtk_entry_set_text ( GTK_ENTRY ( widget ), gsb_real_get_string ( scheduled -> amount ) );
+        gtk_entry_set_text ( GTK_ENTRY ( widget ), utils_real_get_string ( scheduled -> amount ) );
     }
     gsb_form_widget_set_empty ( widget, FALSE );
 
diff --git a/src/bet_hist.c b/src/bet_hist.c
index d1958d7..f88e979 100644
--- a/src/bet_hist.c
+++ b/src/bet_hist.c
@@ -48,6 +48,7 @@
 #include "traitement_variables.h"
 #include "utils.h"
 #include "utils_dates.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -316,7 +317,7 @@ gboolean bet_historical_div_toggle_clicked ( GtkCellRendererToggle *renderer,
                                 gsb_data_account_get_currency_floating_point ( account_number ) );
                     if ( str_average )
                         g_free ( str_average );
-                    str_average = gsb_real_get_string_with_currency ( amount,
+                    str_average = utils_real_get_string_with_currency ( amount,
                                 gsb_data_account_get_currency ( account_number ), TRUE );
                     gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                                 &parent,
@@ -415,9 +416,9 @@ void bet_historical_div_cell_edited (GtkCellRendererText *cell,
             bet_historical_row_collapse_all ( GTK_TREE_VIEW ( tree_view ), &iter, model );
         }
 
-        number = gsb_real_get_from_string ( new_text );
+        number = utils_real_get_from_string ( new_text );
         currency_number = gsb_data_account_get_currency ( account_number );
-        tmp_str = gsb_real_get_string_with_currency ( number, currency_number, TRUE );
+        tmp_str = utils_real_get_string_with_currency ( number, currency_number, TRUE );
         str_amount = gsb_real_safe_real_to_string ( number,
                                 gsb_data_currency_get_floating_point ( currency_number ) );
 
@@ -446,7 +447,7 @@ void bet_historical_div_cell_edited (GtkCellRendererText *cell,
             bet_data_set_div_amount ( account_number, div_number, 0, number );
             str_amount = gsb_real_safe_real_to_string ( number,
                                 gsb_data_currency_get_floating_point ( currency_number ) );
-            tmp_str = gsb_real_get_string_with_currency ( number, currency_number, TRUE );
+            tmp_str = utils_real_get_string_with_currency ( number, currency_number, TRUE );
             gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                         &parent,
                         SPP_HISTORICAL_SELECT_COLUMN, TRUE,
@@ -817,13 +818,13 @@ void bet_historical_populate_div_model ( gpointer key,
 
     model = gtk_tree_view_get_model ( tree_view );
 
-    str_balance = gsb_real_get_string_with_currency ( sbr -> current_balance, currency_number, TRUE );
+    str_balance = utils_real_get_string_with_currency ( sbr -> current_balance, currency_number, TRUE );
     average = gsb_real_div ( sbr -> current_balance, period );
     str_amount = gsb_real_safe_real_to_string ( average,
                         gsb_data_currency_get_floating_point ( currency_number ) );
-    str_average = gsb_real_get_string_with_currency ( average, currency_number, TRUE );
+    str_average = utils_real_get_string_with_currency ( average, currency_number, TRUE );
 
-    str_current_fyear = gsb_real_get_string_with_currency ( sbr -> current_fyear, currency_number, TRUE );
+    str_current_fyear = utils_real_get_string_with_currency ( sbr -> current_fyear, currency_number, TRUE );
 
     gtk_tree_store_append ( GTK_TREE_STORE ( model ), &parent, NULL);
     gtk_tree_store_set ( GTK_TREE_STORE ( model ),
@@ -851,7 +852,7 @@ void bet_historical_populate_div_model ( gpointer key,
             g_free ( str_amount );
         str_amount = gsb_real_safe_real_to_string ( retained,
                         gsb_data_currency_get_floating_point ( currency_number ) );
-        str_retained = gsb_real_get_string_with_currency ( retained, currency_number, TRUE );
+        str_retained = utils_real_get_string_with_currency ( retained, currency_number, TRUE );
         gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                         &parent,
                         SPP_HISTORICAL_SELECT_COLUMN, TRUE,
@@ -894,14 +895,14 @@ void bet_historical_populate_div_model ( gpointer key,
                 g_strfreev ( tab_str );
         }
 
-        str_balance = gsb_real_get_string_with_currency ( sub_sbr -> current_balance, 
+        str_balance = utils_real_get_string_with_currency ( sub_sbr -> current_balance, 
                         currency_number, TRUE );
         average = gsb_real_div ( sub_sbr -> current_balance, period );
         str_amount = gsb_real_safe_real_to_string ( average,
                         gsb_data_currency_get_floating_point ( currency_number ) );
-        str_average = gsb_real_get_string_with_currency ( average,
+        str_average = utils_real_get_string_with_currency ( average,
                         currency_number, TRUE );
-        str_current_fyear = gsb_real_get_string_with_currency ( sub_sbr -> current_fyear,
+        str_current_fyear = utils_real_get_string_with_currency ( sub_sbr -> current_fyear,
                         currency_number, TRUE );
 
         gtk_tree_store_append ( GTK_TREE_STORE ( model ), &fils, &parent );
@@ -931,7 +932,7 @@ void bet_historical_populate_div_model ( gpointer key,
                     g_free ( str_amount );
                 str_amount = gsb_real_safe_real_to_string ( retained,
                         gsb_data_currency_get_floating_point ( currency_number ) );
-                str_retained = gsb_real_get_string_with_currency ( retained, currency_number, TRUE );
+                str_retained = utils_real_get_string_with_currency ( retained, currency_number, TRUE );
 
                 edited = FALSE;
                 gtk_tree_store_set ( GTK_TREE_STORE ( model ),
@@ -970,7 +971,7 @@ void bet_historical_populate_div_model ( gpointer key,
         amount = bet_historical_get_children_amount ( model, &parent );
         str_amount = gsb_real_safe_real_to_string ( amount,
                     gsb_data_currency_get_floating_point ( currency_number ) );
-        str_retained = gsb_real_get_string_with_currency ( amount, currency_number, TRUE );
+        str_retained = utils_real_get_string_with_currency ( amount, currency_number, TRUE );
 
         gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                     &parent,
@@ -1207,7 +1208,7 @@ gboolean bet_historical_set_full_sub_div ( GtkTreeModel *model, GtkTreeIter *par
             bet_data_hist_add_div ( account_nb, div_number, sub_div_nb );
             bet_data_set_div_amount ( account_nb, div_number, sub_div_nb,
                         gsb_real_safe_real_from_string ( str_amount ) );
-            str_retained = gsb_real_get_string_with_currency ( retained,
+            str_retained = utils_real_get_string_with_currency ( retained,
                         gsb_data_account_get_currency ( account_nb ), TRUE );
             gtk_tree_store_set ( GTK_TREE_STORE ( model ), &fils_iter,
                         SPP_HISTORICAL_SELECT_COLUMN, TRUE,
@@ -1512,7 +1513,7 @@ void bet_historical_add_last_amount ( GtkWidget *menu_item,
     str_amount = gsb_real_safe_real_to_string ( amount, 
                     gsb_data_currency_get_floating_point ( currency_number ) );
 
-    tmp_str = gsb_real_get_string_with_currency ( amount, currency_number, TRUE );
+    tmp_str = utils_real_get_string_with_currency ( amount, currency_number, TRUE );
     /* printf ("div = %d sub_div_nb = %d tmp_str = %s\n", div_number, sub_div_nb, tmp_str); */
     if ( bet_data_search_div_hist ( account_number, div_number, sub_div_nb ) == FALSE )
         bet_data_hist_add_div ( account_number, div_number, sub_div_nb );
diff --git a/src/bet_tab.c b/src/bet_tab.c
index d66366d..70cef3d 100644
--- a/src/bet_tab.c
+++ b/src/bet_tab.c
@@ -64,6 +64,7 @@
 #include "utils.h"
 #include "utils_dates.h"
 #include "utils_file_selection.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -345,7 +346,7 @@ static gboolean bet_array_update_average_column ( GtkTreeModel *model,
     amount = gsb_real_safe_real_from_string ( tmp_str );
 
     tmp_range -> current_balance = gsb_real_add ( tmp_range -> current_balance, amount );
-    str_balance = gsb_real_get_string_with_currency ( tmp_range -> current_balance, 
+    str_balance = utils_real_get_string_with_currency ( tmp_range -> current_balance, 
                                 gsb_data_account_get_currency ( selected_account ), TRUE );
 
     if ( tmp_range->current_balance.mantissa < 0 )
@@ -426,7 +427,7 @@ void bet_array_refresh_estimate_tab ( gint account_number )
 
     str_amount = gsb_real_safe_real_to_string ( current_balance, 
                     gsb_data_currency_get_floating_point ( currency_number ) );
-    str_current_balance = gsb_real_get_string_with_currency ( current_balance, currency_number, TRUE );
+    str_current_balance = utils_real_get_string_with_currency ( current_balance, currency_number, TRUE );
 
     if ( current_balance.mantissa < 0 )
         color_str = "red";
@@ -872,9 +873,9 @@ void bet_array_refresh_scheduled_data ( GtkTreeModel *tab_model,
 
         currency_number = gsb_data_scheduled_get_currency_number ( scheduled_number );
         if (amount.mantissa < 0)
-            str_debit = gsb_real_get_string_with_currency ( gsb_real_abs ( amount ), currency_number, TRUE );
+            str_debit = utils_real_get_string_with_currency ( gsb_real_abs ( amount ), currency_number, TRUE );
         else
-            str_credit = gsb_real_get_string_with_currency ( amount, currency_number, TRUE );
+            str_credit = utils_real_get_string_with_currency ( amount, currency_number, TRUE );
 
         /* calculate each instance of the scheduled operation
          * in the range from date_min (today) to date_max */
@@ -1024,9 +1025,9 @@ void bet_array_refresh_transactions_data ( GtkTreeModel *tab_model,
 
         currency_number = gsb_data_transaction_get_currency_number ( transaction_number);
         if (amount.mantissa < 0)
-            str_debit = gsb_real_get_string_with_currency ( gsb_real_abs ( amount ), currency_number, TRUE );
+            str_debit = utils_real_get_string_with_currency ( gsb_real_abs ( amount ), currency_number, TRUE );
         else
-            str_credit = gsb_real_get_string_with_currency ( amount, currency_number, TRUE);
+            str_credit = utils_real_get_string_with_currency ( amount, currency_number, TRUE);
 
         transfer_number =
                         gsb_data_transaction_get_contra_transaction_number (
@@ -1123,7 +1124,7 @@ void bet_array_list_add_new_hist_line ( GtkTreeModel *tab_model,
     amount = gsb_real_safe_real_from_string ( str_amount );
 
     if ( amount.mantissa < 0 )
-        str_debit = gsb_real_get_string_with_currency ( gsb_real_opposite ( amount ),
+        str_debit = utils_real_get_string_with_currency ( gsb_real_opposite ( amount ),
                         bet_data_get_selected_currency ( ), TRUE );
     else
         str_credit = str_value;
@@ -1260,10 +1261,10 @@ gboolean bet_array_refresh_futur_data ( GtkTreeModel *tab_model,
                     gsb_data_currency_get_floating_point ( currency_number ) );
 
         if ( amount.mantissa < 0 )
-            str_debit = gsb_real_get_string_with_currency ( gsb_real_opposite ( amount ),
+            str_debit = utils_real_get_string_with_currency ( gsb_real_opposite ( amount ),
                             currency_number, TRUE );
         else
-            str_credit = gsb_real_get_string_with_currency ( amount, currency_number, TRUE );
+            str_credit = utils_real_get_string_with_currency ( amount, currency_number, TRUE );
 
         str_date = gsb_format_gdate ( scheduled -> date );
 
@@ -1861,7 +1862,7 @@ void bet_array_adjust_hist_amount ( gint div_number,
                             {
                                 str_amount = gsb_real_safe_real_to_string ( number, 
                                             gsb_data_currency_get_floating_point ( currency_number ) );
-                                str_debit = gsb_real_get_string_with_currency (
+                                str_debit = utils_real_get_string_with_currency (
                                             gsb_real_abs ( number ),
                                             currency_number,
                                             TRUE );
@@ -1869,7 +1870,7 @@ void bet_array_adjust_hist_amount ( gint div_number,
                             }
                             else
                             {
-                                str_debit = gsb_real_get_string_with_currency (
+                                str_debit = utils_real_get_string_with_currency (
                                             null_real,
                                             currency_number,
                                             TRUE );
@@ -1883,7 +1884,7 @@ void bet_array_adjust_hist_amount ( gint div_number,
                             {
                                 str_amount = gsb_real_safe_real_to_string ( number, 
                                             gsb_data_currency_get_floating_point ( currency_number ) );
-                                str_credit = gsb_real_get_string_with_currency (
+                                str_credit = utils_real_get_string_with_currency (
                                             gsb_real_abs ( number ),
                                             currency_number,
                                             TRUE );
@@ -1891,7 +1892,7 @@ void bet_array_adjust_hist_amount ( gint div_number,
                             }
                             else
                             {
-                                str_credit = gsb_real_get_string_with_currency (
+                                str_credit = utils_real_get_string_with_currency (
                                             null_real,
                                             currency_number,
                                             TRUE );
@@ -2638,9 +2639,9 @@ gboolean bet_array_refresh_transfert_data ( GtkTreeModel *tab_model,
 
         currency_number = gsb_data_account_get_currency ( transfert -> replace_account );
         if (amount.mantissa < 0)
-            str_debit = gsb_real_get_string_with_currency ( gsb_real_abs ( amount ), currency_number, TRUE );
+            str_debit = utils_real_get_string_with_currency ( gsb_real_abs ( amount ), currency_number, TRUE );
         else
-            str_credit = gsb_real_get_string_with_currency ( amount, currency_number, TRUE);
+            str_credit = utils_real_get_string_with_currency ( amount, currency_number, TRUE);
 
         str_date = gsb_format_gdate ( transfert -> date );
 
diff --git a/src/csv_parse.c b/src/csv_parse.c
index a25eb1f..00b57da 100644
--- a/src/csv_parse.c
+++ b/src/csv_parse.c
@@ -33,6 +33,7 @@
 #include "utils_dates.h"
 #include "gsb_data_currency.h"
 #include "gsb_real.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "gsb_data_transaction.h"
 #include "import.h"
@@ -427,7 +428,7 @@ gboolean csv_import_parse_balance ( struct struct_ope_importation * ope, gchar *
 
     if ( strlen ( string ) > 0 )
     {
-        ope -> montant = gsb_real_get_from_string ( string );
+        ope -> montant = utils_real_get_from_string ( string );
         return TRUE;
     }
 
@@ -444,7 +445,7 @@ gboolean csv_import_parse_credit ( struct struct_ope_importation * ope, gchar *
     if ( strlen ( string ) > 0 )
     {
 	ope -> montant = gsb_real_add ( ope -> montant,
-					gsb_real_get_from_string (string));
+					utils_real_get_from_string (string));
     }
     return TRUE;
 }
@@ -462,7 +463,7 @@ gboolean csv_import_parse_debit ( struct struct_ope_importation * ope, gchar * s
     if ( strlen ( string ) > 0 )
     {
 	ope -> montant = gsb_real_sub ( ope -> montant,
-					gsb_real_get_from_string (string));
+					utils_real_get_from_string (string));
     }
     return TRUE;
 }
diff --git a/src/etats_affiche.c b/src/etats_affiche.c
index 2ecb842..98904c4 100644
--- a/src/etats_affiche.c
+++ b/src/etats_affiche.c
@@ -46,6 +46,7 @@
 #include "utils_dates.h"
 #include "navigation.h"
 #include "gsb_real.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "structures.h"
 #include "etats_config.h"
@@ -207,7 +208,7 @@ gint etat_affiche_affiche_total_categories ( gint ligne )
 					ligne, ligne + 1, ALIGN_LEFT, 0 );
             g_free ( text );
 
-	    text = gsb_real_get_string_with_currency (montant_categ_etat, devise_categ_etat, TRUE );
+	    text = utils_real_get_string_with_currency (montant_categ_etat, devise_categ_etat, TRUE );
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes,
 					ligne, ligne + 1, ALIGN_RIGHT, 0 );
 	    g_free ( text );
@@ -229,13 +230,13 @@ gint etat_affiche_affiche_total_categories ( gint ligne )
 		else
 		    fmtstr = _("%s (%d transactions)");
 
-		tmpstr = gsb_real_get_string_with_currency ( montant_categ_etat,
+		tmpstr = utils_real_get_string_with_currency ( montant_categ_etat,
 										 devise_categ_etat, TRUE  );
 	        text = g_strdup_printf ( fmtstr , tmpstr, nb_ope_categ_etat );
 		g_free ( tmpstr );
 	    }
 	    else
-		text = gsb_real_get_string_with_currency ( montant_categ_etat,
+		text = utils_real_get_string_with_currency ( montant_categ_etat,
 							   devise_categ_etat, TRUE );
 
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes,
@@ -329,7 +330,7 @@ gint etat_affiche_affiche_total_sous_categ ( gint ligne )
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, 1, nb_colonnes - 1, ligne, ligne + 1, ALIGN_LEFT, 0 );
 	    g_free ( text );
 
-	    text = gsb_real_get_string_with_currency (montant_sous_categ_etat, devise_categ_etat, TRUE);
+	    text = utils_real_get_string_with_currency (montant_sous_categ_etat, devise_categ_etat, TRUE);
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
 	    g_free ( text );
 	    ligne++;
@@ -348,13 +349,13 @@ gint etat_affiche_affiche_total_sous_categ ( gint ligne )
 		    fmtstr = _("%s (%d transaction)"); 
 		else
 		    fmtstr = _("%s (%d transactions)");
-		tmpstr = gsb_real_get_string_with_currency ( montant_sous_categ_etat, devise_categ_etat, TRUE  );
+		tmpstr = utils_real_get_string_with_currency ( montant_sous_categ_etat, devise_categ_etat, TRUE  );
 	        text = g_strdup_printf ( fmtstr, tmpstr, 
 				nb_ope_sous_categ_etat );
 	        g_free ( tmpstr );
 	    }
 	    else
-		text = gsb_real_get_string_with_currency ( montant_sous_categ_etat,
+		text = utils_real_get_string_with_currency ( montant_sous_categ_etat,
 							   devise_categ_etat, TRUE );
 
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
@@ -442,7 +443,7 @@ gint etat_affiche_affiche_total_ib ( gint ligne )
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, 1, nb_colonnes - 1, ligne, ligne + 1, ALIGN_LEFT, 0 );
 	    g_free ( text );
 
-	    text = gsb_real_get_string_with_currency ( montant_ib_etat, devise_ib_etat, TRUE );
+	    text = utils_real_get_string_with_currency ( montant_ib_etat, devise_ib_etat, TRUE );
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
 	    g_free ( text );
 	    ligne++;
@@ -461,12 +462,12 @@ gint etat_affiche_affiche_total_ib ( gint ligne )
 		    fmtstr = _("%s (%d transaction)"); 
 		else
 		    fmtstr = _("%s (%d transactions)"); 
-		tmpstr2 = gsb_real_get_string_with_currency (montant_ib_etat, devise_ib_etat, TRUE  );
+		tmpstr2 = utils_real_get_string_with_currency (montant_ib_etat, devise_ib_etat, TRUE  );
 		text = g_strdup_printf ( fmtstr, tmpstr2 , nb_ope_ib_etat );
 		g_free (tmpstr2);
 	    }
 	    else
-		text = gsb_real_get_string_with_currency ( montant_ib_etat, devise_ib_etat, TRUE );
+		text = utils_real_get_string_with_currency ( montant_ib_etat, devise_ib_etat, TRUE );
 
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
 	    g_free ( text );
@@ -556,7 +557,7 @@ gint etat_affiche_affiche_total_sous_ib ( gint ligne )
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, 1, nb_colonnes - 1, ligne, ligne + 1, ALIGN_LEFT, 0 );
 	    g_free ( text );
 
-	    text = gsb_real_get_string_with_currency (montant_sous_ib_etat, devise_ib_etat, TRUE );
+	    text = utils_real_get_string_with_currency (montant_sous_ib_etat, devise_ib_etat, TRUE );
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
 	    g_free ( text );
 	    ligne++;
@@ -577,14 +578,14 @@ gint etat_affiche_affiche_total_sous_ib ( gint ligne )
 		    fmtstr = _("%s (%d transaction)"); 
 		else
 		    fmtstr = _("%s (%d transactions)"); 
-		tmpstr = gsb_real_get_string_with_currency (montant_sous_ib_etat, 
+		tmpstr = utils_real_get_string_with_currency (montant_sous_ib_etat, 
 							    devise_ib_etat, TRUE  );
 		text = g_strdup_printf ( fmtstr, tmpstr, 
 					 nb_ope_sous_ib_etat );
 		g_free ( tmpstr );
 	    }
 	    else
-		text = gsb_real_get_string_with_currency ( montant_sous_ib_etat, devise_ib_etat, TRUE );
+		text = utils_real_get_string_with_currency ( montant_sous_ib_etat, devise_ib_etat, TRUE );
 
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
 	    g_free ( text );
@@ -667,7 +668,7 @@ gint etat_affiche_affiche_total_compte ( gint ligne )
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, 1, nb_colonnes - 1, ligne, ligne + 1, ALIGN_LEFT, 0 );
 	    g_free ( text );
 
-	    text = gsb_real_get_string_with_currency (montant_compte_etat, devise_compte_en_cours_etat, TRUE );
+	    text = utils_real_get_string_with_currency (montant_compte_etat, devise_compte_en_cours_etat, TRUE );
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
 	    g_free ( text );
 	    ligne++;
@@ -686,14 +687,14 @@ gint etat_affiche_affiche_total_compte ( gint ligne )
 		    fmtstr = _("%s (%d transaction)"); 
 		else
 		    fmtstr = _("%s (%d transactions)"); 
-		tmpstr = gsb_real_get_string_with_currency ( montant_compte_etat,
+		tmpstr = utils_real_get_string_with_currency ( montant_compte_etat,
 				devise_compte_en_cours_etat, TRUE  );
 		text = g_strdup_printf ( fmtstr, tmpstr, 
 					     nb_ope_compte_etat );
 	        g_free ( tmpstr );
 	    }
 	    else
-		text = gsb_real_get_string_with_currency ( montant_compte_etat, devise_compte_en_cours_etat, TRUE );
+		text = utils_real_get_string_with_currency ( montant_compte_etat, devise_compte_en_cours_etat, TRUE );
 
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );  
 	    g_free ( text );
@@ -775,7 +776,7 @@ gint etat_affiche_affiche_total_tiers ( gint ligne )
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, 1, nb_colonnes - 1, ligne, ligne + 1, ALIGN_LEFT, 0 );
 	    g_free ( text );
 
-	    text = gsb_real_get_string_with_currency (montant_tiers_etat, devise_tiers_etat, TRUE );
+	    text = utils_real_get_string_with_currency (montant_tiers_etat, devise_tiers_etat, TRUE );
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
 	    g_free ( text );
 	    ligne++;
@@ -794,13 +795,13 @@ gint etat_affiche_affiche_total_tiers ( gint ligne )
 		    fmtstr = _("%s (%d transaction)"); 
 		else
 		    fmtstr = _("%s (%d transactions)"); 
-		tmpstr = gsb_real_get_string_with_currency (montant_tiers_etat,
+		tmpstr = utils_real_get_string_with_currency (montant_tiers_etat,
 										devise_tiers_etat, TRUE  );
 		text = g_strdup_printf ( fmtstr, tmpstr, nb_ope_tiers_etat );
 	        g_free ( tmpstr );
 	    }
 	    else
-		text = gsb_real_get_string_with_currency (montant_tiers_etat, devise_tiers_etat, TRUE );
+		text = utils_real_get_string_with_currency (montant_tiers_etat, devise_tiers_etat, TRUE );
 
 	    etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
 	    g_free ( text );
@@ -1074,7 +1075,7 @@ gint etat_affiche_affiche_total_periode ( gint transaction_number,
 	etat_affiche_attach_label ( text, TEXT_NORMAL, 1, nb_colonnes - 1, ligne, ligne + 1, ALIGN_LEFT, 0 );
 	g_free ( text );
 
-	text = gsb_real_get_string_with_currency (montant_periode_etat, devise_generale_etat, TRUE );
+	text = utils_real_get_string_with_currency (montant_periode_etat, devise_generale_etat, TRUE );
 	etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
 	g_free ( text );
 	ligne++;
@@ -1228,7 +1229,7 @@ gint etat_affiche_affiche_total_exercice ( gint transaction_number,
 	etat_affiche_attach_label ( text, TEXT_NORMAL, 1, nb_colonnes - 1, ligne, ligne + 1, ALIGN_LEFT, 0 );
 	g_free ( text );
 
-	text = gsb_real_get_string_with_currency (montant_exo_etat, devise_generale_etat, TRUE );
+	text = utils_real_get_string_with_currency (montant_exo_etat, devise_generale_etat, TRUE );
 	etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
 	g_free ( text );
 	ligne++;
@@ -1626,7 +1627,7 @@ gint etat_affiche_affichage_ligne_ope ( gint transaction_number,
 
 	/* on affiche le montant au bout de la ligne */
 
-	text = gsb_real_get_string_with_currency (gsb_data_transaction_get_amount (transaction_number),
+	text = utils_real_get_string_with_currency (gsb_data_transaction_get_amount (transaction_number),
 						  gsb_data_transaction_get_currency_number (transaction_number), TRUE );
 
 	if ( gsb_data_report_get_report_can_click (current_report_number))
@@ -1700,7 +1701,7 @@ gint etat_affiche_affiche_total_partiel ( gsb_real total_partie,
     etat_affiche_attach_label ( text, TEXT_NORMAL, 0, nb_colonnes - 1, ligne, ligne + 1, ALIGN_LEFT, 0 );
     g_free ( text );
 
-    text = gsb_real_get_string_with_currency (total_partie, devise_generale_etat, TRUE );
+    text = utils_real_get_string_with_currency (total_partie, devise_generale_etat, TRUE );
     etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
     g_free ( text );
     ligne++;
@@ -1754,7 +1755,7 @@ gint etat_affiche_affiche_total_general ( gsb_real total_general,
     etat_affiche_attach_label ( text, TEXT_NORMAL, 0, nb_colonnes - 1, ligne, ligne + 1, ALIGN_LEFT, 0 );
     g_free ( text );
 
-    text = gsb_real_get_string_with_currency (total_general, devise_generale_etat, TRUE );
+    text = utils_real_get_string_with_currency (total_general, devise_generale_etat, TRUE );
     etat_affiche_attach_label ( text, TEXT_NORMAL, nb_colonnes - 1, nb_colonnes, ligne, ligne + 1, ALIGN_RIGHT, 0 );
     g_free ( text );
     ligne++;
diff --git a/src/etats_config.c b/src/etats_config.c
index 1db4de4..ff4c27b 100644
--- a/src/etats_config.c
+++ b/src/etats_config.c
@@ -49,6 +49,7 @@
 #include "gsb_file.h"
 #include "gsb_form_widget.h"
 #include "utils_dates.h"
+#include "utils_real.h"
 #include "navigation.h"
 #include "gsb_real.h"
 #include "traitement_variables.h"
@@ -1854,9 +1855,9 @@ void recuperation_info_perso_etat ( void )
 								      GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU (gsb_data_report_amount_comparison_get_button_second_comparison (amount_comparison_number)) -> menu_item ),
 													      "no_comparateur" )));
 	    gsb_data_report_amount_comparison_set_first_amount ( amount_comparison_number,
-								 gsb_real_get_from_string (gtk_entry_get_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_first_amount (amount_comparison_number)))));
+								 utils_real_get_from_string (gtk_entry_get_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_first_amount (amount_comparison_number)))));
 	    gsb_data_report_amount_comparison_set_second_amount ( amount_comparison_number,
-								  gsb_real_get_from_string (gtk_entry_get_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_second_amount (amount_comparison_number)))));
+								  utils_real_get_from_string (gtk_entry_get_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_second_amount (amount_comparison_number)))));
 
 	    comparison_list = comparison_list -> next;
 	}
@@ -5402,11 +5403,11 @@ void remplit_liste_comparaisons_montants_etat ( void )
 	gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_amount_comparison_get_button_second_comparison (amount_comparison_number)),
 				      gsb_data_report_amount_comparison_get_second_comparison (amount_comparison_number));
 
-	tmpstr = gsb_real_get_string (gsb_data_report_amount_comparison_get_first_amount (amount_comparison_number));
+	tmpstr = utils_real_get_string (gsb_data_report_amount_comparison_get_first_amount (amount_comparison_number));
 	gtk_entry_set_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_first_amount (amount_comparison_number)), tmpstr);
 	g_free ( tmpstr );
 
-	tmpstr = gsb_real_get_string (gsb_data_report_amount_comparison_get_second_amount (amount_comparison_number));
+	tmpstr = utils_real_get_string (gsb_data_report_amount_comparison_get_second_amount (amount_comparison_number));
 	gtk_entry_set_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_second_amount (amount_comparison_number)), tmpstr);
 	g_free ( tmpstr );
 
diff --git a/src/export_csv.c b/src/export_csv.c
index b550092..26ae15d 100644
--- a/src/export_csv.c
+++ b/src/export_csv.c
@@ -51,6 +51,7 @@
 #include "gsb_file_util.h"
 #include "gsb_real.h"
 #include "main.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "utils_files.h"
 /*END_INCLUDE*/
@@ -315,16 +316,16 @@ gboolean gsb_csv_export_account ( const gchar *filename, gint account_nb )
 
     /* ok the balance is now good, can write it */
     CSV_CLEAR_FIELD (csv_field_solde);
-    csv_field_solde = gsb_real_get_string (current_balance);
+    csv_field_solde = utils_real_get_string (current_balance);
     if ( current_balance.mantissa >= 0 )
     {
 	CSV_CLEAR_FIELD (csv_field_credit);
-	csv_field_credit = gsb_real_get_string (current_balance);
+	csv_field_credit = utils_real_get_string (current_balance);
     }
     else
     {
 	CSV_CLEAR_FIELD (csv_field_debit);
-	csv_field_debit = gsb_real_get_string (gsb_real_abs (current_balance));
+	csv_field_debit = utils_real_get_string (gsb_real_abs (current_balance));
     }
 
     csv_add_record(csv_file,TRUE, TRUE);
@@ -520,9 +521,9 @@ static gboolean gsb_csv_export_transaction ( gint transaction_number,
 							    return_exponent);
 	CSV_CLEAR_FIELD (csv_field_credit);
 	if (amount.mantissa >= 0 )
-	    csv_field_credit = gsb_real_get_string (amount);
+	    csv_field_credit = utils_real_get_string (amount);
 	else
-	    csv_field_debit  = gsb_real_get_string (gsb_real_abs (amount));
+	    csv_field_debit  = utils_real_get_string (gsb_real_abs (amount));
 
 	/* met le cheque si c'est un type à numerotation automatique */
 	payment_method = gsb_data_transaction_get_method_of_payment_number ( transaction_number );
@@ -554,7 +555,7 @@ static gboolean gsb_csv_export_transaction ( gint transaction_number,
 	    current_balance = gsb_real_add ( current_balance,
 					     amount );
 	    CSV_CLEAR_FIELD (csv_field_solde);
-	    csv_field_solde = gsb_real_get_string (current_balance);
+	    csv_field_solde = utils_real_get_string (current_balance);
 	}
 
 	/* Number */
@@ -649,7 +650,7 @@ static gboolean gsb_csv_export_transaction ( gint transaction_number,
 		    /* met le montant de la ventilation */
 		    amount = gsb_data_transaction_get_adjusted_amount ( pSplitTransaction, return_exponent );
 		    CSV_CLEAR_FIELD (csv_field_montant);
-		    csv_field_montant = gsb_real_get_string (amount);
+		    csv_field_montant = utils_real_get_string (amount);
 
 		    /* met le rapprochement */
 		    if ( gsb_data_transaction_get_reconcile_number ( pSplitTransaction ) )
diff --git a/src/gsb_assistant_account.c b/src/gsb_assistant_account.c
index 77bcc88..e3a1554 100644
--- a/src/gsb_assistant_account.c
+++ b/src/gsb_assistant_account.c
@@ -48,6 +48,7 @@
 #include "gsb_real.h"
 #include "gsb_select_icon.h"
 #include "utils.h"
+#include "utils_real.h"
 #include "structures.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -130,7 +131,7 @@ GtkResponseType gsb_assistant_account_run ( void )
 	gsb_account_new ( GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT (assistant), "account_kind")),
 			  gsb_currency_get_currency_from_combobox (account_combobox_currency),
 			  gsb_bank_list_get_bank_number (account_combobox_bank),
-			  gsb_real_get_from_string (gtk_entry_get_text (GTK_ENTRY (account_entry_initial_amount))),
+			  utils_real_get_from_string (gtk_entry_get_text (GTK_ENTRY (account_entry_initial_amount))),
 			  gtk_entry_get_text (GTK_ENTRY (account_entry_name)),
               new_icon );
         result = TRUE; /* assistant was not cancelled */
diff --git a/src/gsb_assistant_reconcile_config.c b/src/gsb_assistant_reconcile_config.c
index 5eb1dda..3775817 100644
--- a/src/gsb_assistant_reconcile_config.c
+++ b/src/gsb_assistant_reconcile_config.c
@@ -46,6 +46,7 @@
 #include "utils_dates.h"
 #include "gsb_real.h"
 #include "gsb_reconcile_config.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "utils.h"
 #include "structures.h"
@@ -822,10 +823,10 @@ static gboolean gsb_assistant_reconcile_config_page_add_new_reconcile ( GtkWidge
     gsb_data_reconcile_set_final_date ( reconcile_number,
                         gsb_calendar_entry_get_date ( reconcile_final_date_entry ) );
     gsb_data_reconcile_set_init_balance ( reconcile_number,
-                        gsb_real_get_from_string ( gtk_entry_get_text (
+                        utils_real_get_from_string ( gtk_entry_get_text (
                         GTK_ENTRY (reconcile_init_balance_entry ) ) ) );
     gsb_data_reconcile_set_final_balance ( reconcile_number,
-                        gsb_real_get_from_string ( gtk_entry_get_text (
+                        utils_real_get_from_string ( gtk_entry_get_text (
                         GTK_ENTRY ( reconcile_final_balance_entry ) ) ) );
     gsb_data_reconcile_set_account ( reconcile_number,
                         gsb_account_get_combo_account_number ( reconcile_account_button ) );
@@ -1072,7 +1073,7 @@ gboolean gsb_assistant_reconcile_config_update_manu_asso ( GtkWidget *assistant,
 	    GtkTreeIter iter;
 
 	    date_str = gsb_format_gdate (gsb_data_transaction_get_date (transaction_number));
-	    amount_str = gsb_real_get_string (gsb_data_transaction_get_amount (transaction_number));
+	    amount_str = utils_real_get_string (gsb_data_transaction_get_amount (transaction_number));
 
 	    gtk_list_store_append ( GTK_LIST_STORE (store),
 				    &iter );
diff --git a/src/gsb_autofunc.c b/src/gsb_autofunc.c
index a9c218c..8fc0e46 100644
--- a/src/gsb_autofunc.c
+++ b/src/gsb_autofunc.c
@@ -50,6 +50,7 @@
 #include "utils_editables.h"
 #include "gsb_real.h"
 #include "traitement_variables.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "structures.h"
 /*END_INCLUDE*/
@@ -1065,7 +1066,7 @@ GtkWidget *gsb_autofunc_real_new ( gsb_real real,
     /* first, create and fill the entry */
     entry = gtk_entry_new ();
 
-    string = gsb_real_get_string (real);
+    string = utils_real_get_string (real);
     gtk_entry_set_text ( GTK_ENTRY (entry), string );
     g_free (string);
 
@@ -1115,7 +1116,7 @@ void gsb_autofunc_real_set ( GtkWidget *entry,
 							     "changed-hook"));
 
     /* Fill in value */
-    string = gsb_real_get_string (real);
+    string = utils_real_get_string (real);
     gtk_entry_set_text ( GTK_ENTRY (entry), string );
     g_free (string);
 
@@ -1155,7 +1156,7 @@ static gboolean gsb_autofunc_real_changed ( GtkWidget *entry,
 
     number_for_func = GPOINTER_TO_INT ( g_object_get_data (G_OBJECT (entry), "number_for_func"));
     default_func ( number_for_func,
-		   gsb_real_get_from_string (gtk_entry_get_text (GTK_ENTRY (entry))));
+		   utils_real_get_from_string (gtk_entry_get_text (GTK_ENTRY (entry))));
 
     /* Mark file as modified */
     gsb_file_set_modified ( TRUE );
diff --git a/src/gsb_currency.c b/src/gsb_currency.c
index de26730..a334696 100644
--- a/src/gsb_currency.c
+++ b/src/gsb_currency.c
@@ -51,6 +51,7 @@
 #include "structures.h"
 #include "utils.h"
 #include "utils_files.h"
+#include "utils_real.h"
 #include "erreur.h"
 /*END_INCLUDE*/
 
@@ -699,14 +700,14 @@ void gsb_currency_exchange_dialog ( gint account_currency_number,
     /* if the rate or fees exist already, fill them here */
     if ( exchange_rate.mantissa )
     {
-        tmpstr = gsb_real_get_string ( exchange_rate );
+        tmpstr = utils_real_get_string ( exchange_rate );
         gtk_entry_set_text ( GTK_ENTRY ( entry ), tmpstr );
         g_free ( tmpstr );
     }
 
     if ( exchange_fees.mantissa )
     {
-        tmpstr = gsb_real_get_string (gsb_real_abs (exchange_fees));
+        tmpstr = utils_real_get_string (gsb_real_abs (exchange_fees));
         gtk_entry_set_text ( GTK_ENTRY ( fees_entry ), tmpstr );
         g_free ( tmpstr );
     }
@@ -722,14 +723,14 @@ dialog_return:
         gint new_link_number;
         gint new_link_currency;
 
-        current_exchange = gsb_real_get_from_string (
+        current_exchange = utils_real_get_from_string (
                         gtk_entry_get_text ( GTK_ENTRY ( entry ) ) );
 
         if ( strlen ( gtk_entry_get_text ( GTK_ENTRY ( fees_entry ) ) ) > 0
          ||
          strcmp ( gtk_entry_get_text ( GTK_ENTRY ( fees_entry ) ), "0" ) != 0 )
         {
-            current_exchange_fees = gsb_real_get_from_string (
+            current_exchange_fees = utils_real_get_from_string (
                         gtk_entry_get_text ( GTK_ENTRY ( fees_entry ) ) );
         }
         else
@@ -1026,10 +1027,10 @@ gboolean gsb_currency_select_double_amount ( GtkWidget *entry_1,
 		else
         {
             gtk_widget_set_sensitive ( GTK_WIDGET ( entry ), FALSE );
-            amount_1 = gsb_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY ( entry_1 ) ) );
-            amount_2 = gsb_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY ( entry_2 ) ) );
+            amount_1 = utils_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY ( entry_1 ) ) );
+            amount_2 = utils_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY ( entry_2 ) ) );
             taux = gsb_real_div ( amount_2, amount_1 );
-            gtk_entry_set_text ( GTK_ENTRY ( entry ), gsb_real_get_string ( taux ) );
+            gtk_entry_set_text ( GTK_ENTRY ( entry ), utils_real_get_string ( taux ) );
         }
     }
     return FALSE;
diff --git a/src/gsb_currency_link_config.c b/src/gsb_currency_link_config.c
index 8688e16..8c35c7a 100644
--- a/src/gsb_currency_link_config.c
+++ b/src/gsb_currency_link_config.c
@@ -47,6 +47,7 @@
 #include "structures.h"
 #include "traitement_variables.h"
 #include "utils.h"
+#include "utils_real.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -380,7 +381,7 @@ void gsb_currency_link_config_append_line ( GtkTreeModel *model,
     else
 	invalid = NULL;
 
-    tmpstr = gsb_real_get_string (gsb_data_currency_link_get_change_rate (link_number));
+    tmpstr = utils_real_get_string (gsb_data_currency_link_get_change_rate (link_number));
     gtk_list_store_append ( GTK_LIST_STORE ( model ), iter_ptr );
     gtk_list_store_set ( GTK_LIST_STORE ( model ),
 			 iter_ptr,
@@ -470,7 +471,7 @@ gboolean gsb_currency_link_config_select_currency ( GtkTreeSelection *tree_selec
     g_signal_handlers_block_by_func ( G_OBJECT (exchange_entry),
 				      G_CALLBACK (gsb_currency_link_config_modify_link),
 				      tree_view );
-    tmpstr = gsb_real_get_string (gsb_data_currency_link_get_change_rate (link_number));
+    tmpstr = utils_real_get_string (gsb_data_currency_link_get_change_rate (link_number));
     gtk_entry_set_text ( GTK_ENTRY (exchange_entry), tmpstr);
     g_free ( tmpstr );
     g_signal_handlers_unblock_by_func ( G_OBJECT (exchange_entry),
@@ -546,7 +547,7 @@ gboolean gsb_currency_link_config_modify_link ( GtkWidget *tree_view )
     exchange_entry = g_object_get_data ( G_OBJECT (model),
 					 "exchange_entry" );
 
-    number = gsb_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY (exchange_entry) ) );
+    number = utils_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY (exchange_entry) ) );
     if ( number.exponent > 8 )
         gtk_entry_set_max_length (GTK_ENTRY (exchange_entry),
                         strlen( gtk_entry_get_text ( GTK_ENTRY ( exchange_entry ) ) - 1) );
@@ -565,7 +566,7 @@ gboolean gsb_currency_link_config_modify_link ( GtkWidget *tree_view )
     else
 	invalid = NULL;
 
-    tmpstr = gsb_real_get_string ( gsb_data_currency_link_get_change_rate ( link_number ) );
+    tmpstr = utils_real_get_string ( gsb_data_currency_link_get_change_rate ( link_number ) );
     gtk_list_store_set ( GTK_LIST_STORE (model),
 			 &iter,
 			 LINK_CURRENCY1_COLUMN, gsb_data_currency_get_name (gsb_data_currency_link_get_first_currency(link_number)),
diff --git a/src/gsb_data_account.c b/src/gsb_data_account.c
index 5e49dbe..c4983db 100644
--- a/src/gsb_data_account.c
+++ b/src/gsb_data_account.c
@@ -51,6 +51,7 @@
 #include "traitement_variables.h"
 #include "utils.h"
 #include "utils_dates.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -2797,11 +2798,11 @@ void gsb_data_account_colorize_current_balance ( gint account_number )
 
 	if (gsb_data_account_get_current_balance (account_number).mantissa < 0)
 	    string = g_strdup_printf ( "<span color=\"red\">%s</span>",
-                        gsb_real_get_string_with_currency (
+                        utils_real_get_string_with_currency (
                         gsb_data_account_get_current_balance (account_number),
                         gsb_data_account_get_currency (account_number), TRUE ));
 	else
-	    string = gsb_real_get_string_with_currency (
+	     tring = gsb_real_get_string_with_currency (  cy (account_number), TRUE ));  nt_number )  y(link_number)),  ber)), tmpstr);  number)),  rison_number)))));  _number)) -> menu_item ),    Èô'øP+  è„GøP+                          ’hCùP+  PÌ=ÿ  €€eùP+          `¸Œ=ÿ         0·Œ=ÿ  ë&øP+  6                    è     è!     è!     àŒ=ÿ  PÌ=ÿ  x$CùP+          `¹Œ=ÿ          "q&øP+          Ž&øP+  àŒ=ÿ  ðp&øP+  Ì=ÿ         À§ùP+  óx&øP+   §ùP+  اùP+  ¨§ùP+  Èô'øP+          x$CùP+          `¹Œ=ÿ          0¸Œ=ÿ  ë&øP+  à!     à!     àŒ=ÿ  PÌ=ÿ  Èí"ùP+          @ºŒ=ÿ         "q&øP+          Ž&øP+  àŒ=ÿ  ðp&øP+  Ì=ÿ  Ì=ÿ  Ì=ÿ  ‹GøP+  Œp˜        PÌ=ÿ  óx&øP+  Èô'øP+                  @ºŒ=ÿ         ¹Œ=ÿ  ë&øP+          G       H   I       J   K           M   N   O       P   àŒ=ÿ  PÌ=ÿ  H¥ùøP+          ໌=ÿ         "q&øP+          Ž&øP+  àŒ=ÿ         0§ùP+  óx&øP+   0CùP+   ÙÖøP+   §ùP+  اùP+  ¨§ùP+  Èô'øP+ 
          H¥ùøP+          ໌=ÿ          ºŒ=ÿ  ë&øP+  8¥ùøP+          ໌=ÿ         PºŒ=ÿ  ë&øP+  (¥ùøP+          ໌=ÿ         €ºŒ=ÿ  ë&øP+  ¥ùøP+          ໌=ÿ         °ºŒ=ÿ  ë&øP+  	       ¨§ùP+  óx&øP+         ¨§ùP+  0µŒ=ÿ          Š(×øP+  æw&øP+         اùP+  P»Œ=ÿ          y(×øP+  æw&øP+          §ùP+  €»Œ=ÿ          Z(×øP+  æw&øP+  ØÔÖøP+   0CùP+   ÙÖøP+   §ùP+  Ø4CùP+  اùP+  ¨§ùP+  Èô'øP+          àÕøP+           ½Œ=ÿ         лŒ=ÿ  ë&øP+  #   %       '       )       *   -   .   0   3       5   6   7   8   :   <   =   àŒ=ÿ  PÌ=ÿ  p[¡øP+           ¾Œ=ÿ          "q&øP+                 8?CùP+  óx&øP+  Ø4CùP+   9CùP+  Èô'øP+                          c   f   møP+  PÌ=ÿ  p[¡øP+           ¾Œ=ÿ          ð¼Œ=ÿ  ë&øP+  Ó%°•æ§ìš‹wqÒ-øÒ êÓïs¨Ó,~9„×u]ÞÓ	4Q ÷U^Qʉ§ ¶uª¹ñìò*ēv´2søP+          ÄŒ=ÿ  F@
úP+  F@
úP+         ?…pøP+         PČ=ÿ  °»Œ=ÿ  p¿Œ=ÿ  møP+  æw&øP+  è„GøP+  ÐŌ=ÿ  B@
úP+   ÄŒ=ÿ  Ì=ÿ  õHøP+  PÌ=ÿ          ÿÿÿÿÿÿÿÿB@
úP+          XÌ=ÿ  ë&ø            string = utils_real_get_string_with_currency (
                         gsb_data_account_get_current_balance (account_number),
                         gsb_data_account_get_currency (account_number), TRUE );
     if ( !string )
diff --git a/src/gsb_data_partial_balance.c b/src/gsb_data_partial_balance.c
index efae985..78a8d35 100644
--- a/src/gsb_data_partial_balance.c
+++ b/src/gsb_data_partial_balance.c
@@ -43,6 +43,7 @@
 #include "gsb_data_currency_link.h"
 #include "navigation.h"
 #include "gsb_real.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "utils.h"
 #include "structures.h"
@@ -1079,10 +1080,10 @@ gchar *gsb_data_partial_balance_get_marked_balance ( gint partial_balance_number
 
     if ( partial_balance -> colorise && solde.mantissa < 0 )
         string = g_strdup_printf ( "<span color=\"red\">%s</span>",
-                        gsb_real_get_string_with_currency (
+                        utils_real_get_string_with_currency (
                         solde, partial_balance -> currency, TRUE ) );
     else
-        string = gsb_real_get_string_with_currency (
+        string = utils_real_get_string_with_currency (
                         solde, partial_balance -> currency, TRUE );
 
     return string;
@@ -1161,10 +1162,10 @@ gchar *gsb_data_partial_balance_get_current_balance ( gint partial_balance_numbe
 
     if ( partial_balance -> colorise && solde.mantissa < 0 )
         string = g_strdup_printf ( "<span color=\"red\">%s</span>",
-                        gsb_real_get_string_with_currency (
+                        utils_real_get_string_with_currency (
                         solde, partial_balance -> currency, TRUE ) );
     else
-        string = gsb_real_get_string_with_currency (
+        string = utils_real_get_string_with_currency (
                         solde, partial_balance -> currency, TRUE );
 
     return string;
diff --git a/src/gsb_debug.c b/src/gsb_debug.c
index 960e3e6..a6d38e3 100644
--- a/src/gsb_debug.c
+++ b/src/gsb_debug.c
@@ -41,6 +41,7 @@
 #include "gsb_real.h"
 #include "gsb_status.h"
 #include "traitement_variables.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "structures.h"
 /*END_INCLUDE*/
@@ -436,10 +437,10 @@ gchar * gsb_debug_reconcile_test ( void )
         {
             affected_accounts ++;
 
-            tmprealstr1 = gsb_real_get_string_with_currency (
+            tmprealstr1 = utils_real_get_string_with_currency (
 	                                gsb_data_reconcile_get_final_balance (reconcile_number),
 	                                gsb_data_account_get_currency ( account_nb ), TRUE  );
-            tmprealstr2 = gsb_real_get_string_with_currency (reconcilied_amount,
+            tmprealstr2 = utils_real_get_string_with_currency (reconcilied_amount,
 					gsb_data_account_get_currency ( account_nb ), TRUE  );
             tmpstr1 = g_strdup_printf ( _("<span weight=\"bold\">%s</span>\n"
 					"  Last reconciliation amount : %s\n"
diff --git a/src/gsb_file_load.c b/src/gsb_file_load.c
index cfb82bc..7d43174 100644
--- a/src/gsb_file_load.c
+++ b/src/gsb_file_load.c
@@ -78,6 +78,7 @@
 #include "utils.h"
 #include "utils_dates.h"
 #include "utils_files.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 #include "gsb_dirs.h"
@@ -5606,11 +5607,11 @@ void gsb_file_load_start_element_before_0_6 ( GMarkupParseContext *context,
             gsb_real number;
 
             tmp_string = utils_str_reduce_exponant_from_string ( attribute_values[i], 2 );
-            number = gsb_real_get_from_string (tmp_string);
+            number = utils_real_get_from_string (tmp_string);
             /* printf ("tmp_string = %s number.mantissa = %ld number.exponent = %d\n", tmp_string,
                         number.mantissa, number.exponent); */
             gsb_data_transaction_set_amount ( transaction_number,
-                                  gsb_real_get_from_string (tmp_string));
+                                  utils_real_get_from_string (tmp_string));
             if (tmp_string) g_free (tmp_string);
         }
 
@@ -5627,12 +5628,12 @@ void gsb_file_load_start_element_before_0_6 ( GMarkupParseContext *context,
         if ( !strcmp ( attribute_names[i],
                    "Tc" ))
             gsb_data_transaction_set_exchange_rate ( transaction_number,
-                                     gsb_real_get_from_string (attribute_values[i]));
+                                     utils_real_get_from_string (attribute_values[i]));
 
         if ( !strcmp ( attribute_names[i],
                    "Fc" ))
             gsb_data_transaction_set_exchange_fees ( transaction_number,
-                                     gsb_real_get_from_string (attribute_values[i]));
+                                     utils_real_get_from_string (attribute_values[i]));
 
         if ( !strcmp ( attribute_names[i],
                    "T" ))
@@ -5781,7 +5782,7 @@ void gsb_file_load_start_element_before_0_6 ( GMarkupParseContext *context,
 
             tmp_string = utils_str_reduce_exponant_from_string ( attribute_values[i], 2 );
             gsb_data_scheduled_set_amount ( scheduled_number,
-                                gsb_real_get_from_string (tmp_string));
+                                utils_real_get_from_string (tmp_string));
             if (tmp_string) g_free (tmp_string);
         }
 
@@ -6137,7 +6138,7 @@ void gsb_file_load_start_element_before_0_6 ( GMarkupParseContext *context,
 
         if ( !strcmp ( attribute_names[i],
                    "Change" ))
-            tmp_currency_link.exchange = gsb_real_get_from_string (attribute_values[i]);
+            tmp_currency_link.exchange = utils_real_get_from_string (attribute_values[i]);
         if ( !strcmp ( attribute_names[i], "Date_dernier_change" ) 
          &&
          strlen ( attribute_values[i] ) )
@@ -6504,7 +6505,7 @@ void gsb_file_load_start_element_before_0_6 ( GMarkupParseContext *context,
 
             tmp_string = utils_str_reduce_exponant_from_string ( attribute_values[i], 2 );
             gsb_data_report_amount_comparison_set_first_amount ( amount_comparison_number,
-                                         gsb_real_get_from_string (tmp_string));
+                                         utils_real_get_from_string (tmp_string));
             if (tmp_string) g_free (tmp_string);
         }
 
@@ -6517,7 +6518,7 @@ void gsb_file_load_start_element_before_0_6 ( GMarkupParseContext *context,
 
             tmp_string = utils_str_reduce_exponant_from_string ( attribute_values[i], 2 );
             gsb_data_report_amount_comparison_set_second_amount ( amount_comparison_number,
-                                          gsb_real_get_from_string (tmp_string));
+                                          utils_real_get_from_string (tmp_string));
             if (tmp_string) g_free (tmp_string);
         }
 
@@ -6933,14 +6934,14 @@ void gsb_file_load_account_part_before_0_6 ( GMarkupParseContext *context,
     
     tmp_string = utils_str_reduce_exponant_from_string ( text, 2 );
     /* printf ("solde_initial = %s\n", tmp_string ); */
-    number = gsb_real_get_from_string ( tmp_string );
+    number = utils_real_get_from_string ( tmp_string );
     if ( number.mantissa == error_real.mantissa )
         gsb_data_account_set_init_balance ( account_number, null_real );
     else
         gsb_data_account_set_init_balance ( account_number, number );
     /* printf ("tmp_string = %s number.mantissa = %ld number.exponent = %d initial_balance = %s\n", tmp_string,
                         number.mantissa, number.exponent,
-                        gsb_real_get_string ( gsb_data_account_get_init_balance ( account_number, 2))); */
+                        utils_real_get_string ( gsb_data_account_get_init_balance ( account_number, 2))); */
 
     if (tmp_string) 
         g_free (tmp_string);
@@ -6956,7 +6957,7 @@ void gsb_file_load_account_part_before_0_6 ( GMarkupParseContext *context,
     gsb_real number;
     
     tmp_string = utils_str_reduce_exponant_from_string ( text, 2 );
-    number = gsb_real_get_from_string ( tmp_string );
+    number = utils_real_get_from_string ( tmp_string );
     if ( number.mantissa == error_real.mantissa )
         gsb_data_account_set_mini_balance_wanted ( account_number, null_real );
     else
@@ -6976,7 +6977,7 @@ void gsb_file_load_account_part_before_0_6 ( GMarkupParseContext *context,
     gsb_real number;
     
     tmp_string = utils_str_reduce_exponant_from_string ( text, 2 );
-    number = gsb_real_get_from_string ( tmp_string );
+    number = utils_real_get_from_string ( tmp_string );
     if ( number.mantissa == error_real.mantissa )
         gsb_data_account_set_mini_balance_authorized ( account_number, null_real );
     else
@@ -7017,7 +7018,7 @@ void gsb_file_load_account_part_before_0_6 ( GMarkupParseContext *context,
 
     tmp_string = utils_str_reduce_exponant_from_string ( text, 2 );
     if (buffer_reconcile_conversion)
-        buffer_reconcile_conversion -> final_balance = gsb_real_get_from_string (tmp_string);
+        buffer_reconcile_conversion -> final_balance = utils_real_get_from_string (tmp_string);
     if (tmp_string) 
         g_free (tmp_string);
     return;
diff --git a/src/gsb_form.c b/src/gsb_form.c
index ba89778..63a57e5 100644
--- a/src/gsb_form.c
+++ b/src/gsb_form.c
@@ -76,6 +76,7 @@
 #include "utils_editables.h"
 #include "gtk_combofix.h"
 #include "traitement_variables.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "transaction_list.h"
 #include "transaction_list_select.h"
@@ -700,7 +701,7 @@ void gsb_form_fill_element ( gint element_number,
 	case TRANSACTION_FORM_DEBIT:
 	    if (gsb_data_mix_get_amount (transaction_number, is_transaction).mantissa < 0)
 	    {
-		char_tmp = gsb_real_get_string_with_currency (gsb_real_abs (gsb_data_mix_get_amount (transaction_number, is_transaction)),
+		char_tmp = utils_real_get_string_with_currency (gsb_real_abs (gsb_data_mix_get_amount (transaction_number, is_transaction)),
 							      gsb_data_mix_get_currency_number (transaction_number, is_transaction),
 							      FALSE );
 
@@ -714,7 +715,7 @@ void gsb_form_fill_element ( gint element_number,
 	case TRANSACTION_FORM_CREDIT:
 	    if (gsb_data_mix_get_amount (transaction_number, is_transaction).mantissa >= 0)
 	    {
-		char_tmp = gsb_real_get_string_with_currency (gsb_data_mix_get_amount (transaction_number, is_transaction),
+		char_tmp = utils_real_get_string_with_currency (gsb_data_mix_get_amount (transaction_number, is_transaction),
 							      gsb_data_mix_get_currency_number (transaction_number, is_transaction),
 							      FALSE );
 
@@ -2860,14 +2861,14 @@ gboolean gsb_form_validate_form_transaction ( gint transaction_number,
         gsb_real number = null_real;
 
         if ( gsb_form_widget_check_empty ( widget ) == FALSE )
-            number = gsb_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY ( widget ) ) );
+            number = utils_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY ( widget ) ) );
             
 	    if ( gsb_form_widget_check_empty ( widget ) == TRUE
          ||
          number.mantissa == 0 )
         {
             widget = gsb_form_widget_get_widget ( TRANSACTION_FORM_CREDIT );
-            number = gsb_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY ( widget ) ) );
+            number = utils_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY ( widget ) ) );
 
             if ( gsb_form_widget_check_empty ( widget ) == TRUE
              ||
diff --git a/src/gsb_real.c b/src/gsb_real.c
index ef7efe3..2472043 100644
--- a/src/gsb_real.c
+++ b/src/gsb_real.c
@@ -41,7 +41,6 @@
 #include <assert.h>
 
 /*START_INCLUDE*/
-#include "gsb_locale.h"
 #include "gsb_real.h"
 /*END_INCLUDE*/
 
@@ -69,27 +68,6 @@ static gboolean gsb_real_raw_truncate_number ( gint64 *mantissa, gint *exponent
 
 
 /**
- * Return the real in a formatted string, according to the currency 
- * regarding decimal separator, thousands separator and positive or
- * negative sign.
- * this is directly the number coded in the real wich is returned
- * usually, gsb_real_get_string_with_currency is better to adapt the format
- * 	of the number to the currency format
- * 
- * \param number	Number to format.
- *
- * \return		A newly allocated string of the number (this
- *			function will never return NULL) 
-*/
-gchar *gsb_real_get_string ( gsb_real number )
-{
-    struct lconv *locale = gsb_locale_get_locale ();
-
-    return gsb_real_raw_format_string ( number, locale, NULL );
-}
-
-
-/**
  * Return the real in a formatted string with an optional currency
  * symbol, according to the given locale regarding decimal separator,
  * thousands separator and positive or negative sign.
@@ -156,34 +134,6 @@ gchar *gsb_real_raw_format_string (gsb_real number,
 }
 
 
-/**
- * get a real number from a string
- * the string can be formatted :
- * - handle , or . as separator
- * - spaces are ignored
- * - another character makes a 0 return
- *
- *   there is no ask for any exponent, so the gsb_real will be exactly the
- *   same as the string
- *
- * \param string
- *
- * \return the number in the string transformed to gsb_real
- * */
-gsb_real gsb_real_get_from_string ( const gchar *string )
-{
-    gsb_real result;
-    gchar *thousands_sep = gsb_locale_get_mon_thousands_sep ( );
-    gchar *decimal_point = gsb_locale_get_mon_decimal_point ( );
-
-    result =  gsb_real_raw_get_from_string ( string, thousands_sep, decimal_point );
-
-    g_free ( decimal_point );
-    g_free ( thousands_sep );
-
-    return result;
-}
-
 
 /**
  * get a real number from an integer
diff --git a/src/gsb_real.h b/src/gsb_real.h
index b57811a..21dfafd 100644
--- a/src/gsb_real.h
+++ b/src/gsb_real.h
@@ -32,8 +32,6 @@ G_MODULE_EXPORT gint gsb_real_cmp ( gsb_real number_1,
 gsb_real gsb_real_div ( gsb_real number_1,
                         gsb_real number_2 );
 G_MODULE_EXPORT gsb_real gsb_real_double_to_real ( gdouble number );
-gsb_real gsb_real_get_from_string ( const gchar *string );
-gchar *gsb_real_get_string ( gsb_real number );
 gsb_real gsb_real_mul ( gsb_real number_1,
                         gsb_real number_2 );
 gsb_real gsb_real_new ( gint64 mantissa, gint exponent );
diff --git a/src/gsb_reconcile.c b/src/gsb_reconcile.c
index 9be01d9..1442ae8 100644
--- a/src/gsb_reconcile.c
+++ b/src/gsb_reconcile.c
@@ -60,6 +60,7 @@
 #include "transaction_list_sort.h"
 #include "utils_dates.h"
 #include "utils_editables.h"
+#include "utils_real.h"
 #include "utils_str.h"
 /*END_INCLUDE*/
 
@@ -430,7 +431,7 @@ gboolean gsb_reconcile_run_reconciliation ( GtkWidget *button,
                 g_date_free (today);
 
             /* it's not the first reconciliation, set the old balance and unsensitive the old balance entry */
-            tmpstr = gsb_real_get_string (gsb_data_reconcile_get_final_balance (reconcile_number));
+            tmpstr = utils_real_get_string (gsb_data_reconcile_get_final_balance (reconcile_number));
             gtk_entry_set_text ( GTK_ENTRY ( reconcile_initial_balance_entry ), tmpstr);
             g_free ( tmpstr );
             gtk_widget_set_sensitive ( GTK_WIDGET ( reconcile_initial_balance_entry ),
@@ -444,7 +445,7 @@ gboolean gsb_reconcile_run_reconciliation ( GtkWidget *button,
 
             /* it's the first reconciliation, set the initial balance and make sensitive the old balance to change
              * it if necessary */
-            tmpstr = gsb_real_get_string ( gsb_data_account_get_init_balance (account_number, -1));
+            tmpstr = utils_real_get_string ( gsb_data_account_get_init_balance (account_number, -1));
             gtk_entry_set_text ( GTK_ENTRY ( reconcile_initial_balance_entry ), tmpstr);
             g_free ( tmpstr );
             gtk_widget_set_sensitive ( GTK_WIDGET ( reconcile_initial_balance_entry ), TRUE );
@@ -532,9 +533,9 @@ gboolean gsb_reconcile_finish_reconciliation ( GtkWidget *button,
 
     account_number = gsb_gui_navigation_get_current_account ();
 
-    if ( gsb_real_sub ( gsb_real_add ( gsb_real_get_from_string (gtk_entry_get_text ( GTK_ENTRY ( reconcile_initial_balance_entry ))),
+    if ( gsb_real_sub ( gsb_real_add ( utils_real_get_from_string (gtk_entry_get_text ( GTK_ENTRY ( reconcile_initial_balance_entry ))),
 				       gsb_data_account_calculate_waiting_marked_balance (account_number)),
-			gsb_real_get_from_string (gtk_entry_get_text ( GTK_ENTRY ( reconcile_final_balance_entry )))).mantissa != 0 )
+			utils_real_get_from_string (gtk_entry_get_text ( GTK_ENTRY ( reconcile_final_balance_entry )))).mantissa != 0 )
     {
 	dialogue_warning_hint ( _("There is a variance in balances, check that both final balance and initial balance minus marked transactions are equal."),
 				_("Reconciliation can't be completed.") );
@@ -595,11 +596,11 @@ gboolean gsb_reconcile_finish_reconciliation ( GtkWidget *button,
     gsb_data_reconcile_set_init_date ( reconcile_number, date );
     g_free (date);
 
-    real = gsb_real_get_from_string ( gtk_entry_get_text (
+    real = utils_real_get_from_string ( gtk_entry_get_text (
                         GTK_ENTRY ( reconcile_initial_balance_entry ) ) );
     gsb_data_reconcile_set_init_balance ( reconcile_number, real );
 
-    real = gsb_real_get_from_string ( gtk_entry_get_text (
+    real = utils_real_get_from_string ( gtk_entry_get_text (
                         GTK_ENTRY ( reconcile_final_balance_entry ) ) );
     gsb_data_reconcile_set_final_balance ( reconcile_number,
 					   real );
@@ -792,13 +793,13 @@ gboolean gsb_reconcile_update_amounts ( GtkWidget *entry,
 
     currency_number = gsb_data_account_get_currency ( account_number );
     amount = gsb_utils_edit_calculate_entry ( reconcile_final_balance_entry );
-    final_balance = gsb_real_get_string_with_currency ( amount, currency_number, FALSE );
+    final_balance = utils_real_get_string_with_currency ( amount, currency_number, FALSE );
     gtk_label_set_text ( GTK_LABEL ( reconcile_final_balance_label ), final_balance );
 
     /* set the marked balance amount,
      * this is what we mark as P while reconciling, so it's the total marked balance 
      * - the initial marked balance */
-    tmp_string = gsb_real_get_string_with_currency (
+    tmp_string = utils_real_get_string_with_currency (
                         gsb_data_account_calculate_waiting_marked_balance ( account_number ),
                         currency_number,
                         FALSE );
@@ -807,11 +808,11 @@ gboolean gsb_reconcile_update_amounts ( GtkWidget *entry,
 
     /* calculate the variation balance and show it */
     amount = gsb_real_sub ( gsb_real_add (
-                        gsb_real_get_from_string ( initial_balance ),
+                        utils_real_get_from_string ( initial_balance ),
 					    gsb_data_account_calculate_waiting_marked_balance ( account_number ) ),
-			            gsb_real_get_from_string ( final_balance ) );
+			            utils_real_get_from_string ( final_balance ) );
 
-    tmpstr = gsb_real_get_string_with_currency ( amount, currency_number, FALSE );
+    tmpstr = utils_real_get_string_with_currency ( amount, currency_number, FALSE );
     gtk_label_set_text ( GTK_LABEL ( reconcile_variation_balance_label ), tmpstr);
     g_free ( tmpstr );
 
diff --git a/src/gsb_reconcile_config.c b/src/gsb_reconcile_config.c
index 91cf4c5..355793c 100644
--- a/src/gsb_reconcile_config.c
+++ b/src/gsb_reconcile_config.c
@@ -49,6 +49,7 @@
 #include "traitement_variables.h"
 #include "utils.h"
 #include "utils_dates.h"
+#include "utils_real.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -356,8 +357,8 @@ void gsb_reconcile_config_fill ( void )
 
 		init_date = gsb_format_gdate (gsb_data_reconcile_get_init_date (reconcile_number));
 		final_date = gsb_format_gdate (gsb_data_reconcile_get_final_date (reconcile_number));
-		init_balance = gsb_real_get_string (gsb_data_reconcile_get_init_balance (reconcile_number));
-		final_balance = gsb_real_get_string (gsb_data_reconcile_get_final_balance (reconcile_number));
+		init_balance = utils_real_get_string (gsb_data_reconcile_get_init_balance (reconcile_number));
+		final_balance = utils_real_get_string (gsb_data_reconcile_get_final_balance (reconcile_number));
 
 		gtk_tree_store_append ( GTK_TREE_STORE (model),
 					&reconcile_iter,
@@ -477,8 +478,8 @@ gboolean gsb_reconcile_config_update_line ( GtkWidget *entry,
 
 		init_date = gsb_format_gdate (gsb_data_reconcile_get_init_date (reconcile_number));
 		final_date = gsb_format_gdate (gsb_data_reconcile_get_final_date (reconcile_number));
-		init_balance = gsb_real_get_string (gsb_data_reconcile_get_init_balance (reconcile_number));
-		final_balance = gsb_real_get_string (gsb_data_reconcile_get_final_balance (reconcile_number));
+		init_balance = utils_real_get_string (gsb_data_reconcile_get_init_balance (reconcile_number));
+		final_balance = utils_real_get_string (gsb_data_reconcile_get_final_balance (reconcile_number));
 
 		gtk_tree_store_set ( GTK_TREE_STORE (model),
 				     &iter,
diff --git a/src/gsb_scheduler_list.c b/src/gsb_scheduler_list.c
index 369eebd..42a40cd 100644
--- a/src/gsb_scheduler_list.c
+++ b/src/gsb_scheduler_list.c
@@ -62,6 +62,7 @@
 #include "traitement_variables.h"
 #include "utils.h"
 #include "utils_dates.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -1318,7 +1319,7 @@ gboolean gsb_scheduler_list_fill_transaction_text ( gint scheduled_number,
     if ( scheduled_number < 0 )
         line[COL_NB_AMOUNT] = NULL;
     else
-        line[COL_NB_AMOUNT] = gsb_real_get_string_with_currency (
+        line[COL_NB_AMOUNT] = utils_real_get_string_with_currency (
                         gsb_data_scheduled_get_amount ( scheduled_number ),
                         gsb_data_scheduled_get_currency_number ( scheduled_number ),
                         TRUE );
@@ -2013,7 +2014,7 @@ gboolean gsb_scheduler_list_delete_scheduled_transaction ( gint scheduled_number
             result = delete_msg[msg_no].default_answer;
         else
         {
-	    tmpstr = gsb_real_get_string (gsb_data_scheduled_get_amount (scheduled_number));
+	    tmpstr = utils_real_get_string (gsb_data_scheduled_get_amount (scheduled_number));
 	    occurences = g_strdup_printf ( _("Do you want to delete just this occurrence or "
                         "the whole scheduled transaction?\n\n%s : %s [%s %s]"),
                         gsb_format_gdate ( gsb_data_scheduled_get_date (scheduled_number)),
@@ -2726,8 +2727,8 @@ gboolean gsb_scheduler_list_update_white_child ( gint white_line_number,
         gint currency_number;
 
         currency_number = gsb_data_scheduled_get_currency_number ( mother_scheduled_number );
-        amount_string = gsb_real_get_string_with_currency ( total_split, currency_number, TRUE);
-        variance_string = gsb_real_get_string_with_currency (variance, currency_number, TRUE);
+        amount_string = utils_real_get_string_with_currency ( total_split, currency_number, TRUE);
+        variance_string = utils_real_get_string_with_currency (variance, currency_number, TRUE);
 
         tmp_str = g_strdup_printf ( _("Total : %s (variance : %s)"), amount_string, variance_string );
 
diff --git a/src/gsb_transactions_list.c b/src/gsb_transactions_list.c
index e9eb422..593a43e 100644
--- a/src/gsb_transactions_list.c
+++ b/src/gsb_transactions_list.c
@@ -73,6 +73,7 @@
 #include "transaction_model.h"
 #include "utils_dates.h"
 #include "utils_operations.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -1015,7 +1016,7 @@ gchar *gsb_transactions_list_grep_cell_content ( gint transaction_number,
 		 (cell_content_number == ELEMENT_CREDIT
 		  &&
 		  gsb_data_transaction_get_amount ( transaction_number).mantissa >= 0 ))
-		    return gsb_real_get_string_with_currency (
+		    return utils_real_get_string_with_currency (
                         gsb_real_abs ( gsb_data_transaction_get_amount ( transaction_number ) ),
 					    gsb_data_transaction_get_currency_number ( transaction_number ), TRUE );
 	    else
@@ -1035,7 +1036,7 @@ gchar *gsb_transactions_list_grep_cell_content ( gint transaction_number,
             gchar* tmpstr;
             gchar* result;
 
-            tmpstr = gsb_real_get_string (
+            tmpstr = utils_real_get_string (
                         gsb_data_transaction_get_adjusted_amount_for_currency (
                         transaction_number,
                         account_currency,
diff --git a/src/import.c b/src/import.c
index f5e9ca9..9e0c121 100644
--- a/src/import.c
+++ b/src/import.c
@@ -78,6 +78,7 @@
 #include "qif.h"
 #include "transaction_list.h"
 #include "utils_files.h"
+#include "utils_real.h"
 #include "structures.h"
 #include "erreur.h"
 #include "gsb_dirs.h"
@@ -2353,7 +2354,7 @@ void confirmation_enregistrement_ope_import ( struct struct_compte_importation *
 	    gtk_box_pack_start ( GTK_BOX ( hbox ), ope_import -> bouton, FALSE, FALSE, 0 );
 	    gtk_widget_show ( ope_import -> bouton );
 
-	    tmpstr2 = gsb_real_get_string (ope_import -> montant);
+	    tmpstr2 = utils_real_get_string (ope_import -> montant);
         if ( etat.get_fusion_import_transactions )
             tmpstr = g_strdup_printf ( _("Transactions to be merged : %s ; %s ; %s"),
                         gsb_format_gdate ( ope_import -> date ),
@@ -2384,7 +2385,7 @@ void confirmation_enregistrement_ope_import ( struct struct_compte_importation *
 
 	    if ( gsb_data_transaction_get_notes (ope_import -> ope_correspondante))
 	    {
-            tmpstr2 = gsb_real_get_string (gsb_data_transaction_get_amount (
+            tmpstr2 = utils_real_get_string (gsb_data_transaction_get_amount (
                                 ope_import -> ope_correspondante));
             tmpstr = g_strdup_printf ( _("Transaction found : %s ; %s ; %s ; %s"),
                         gsb_format_gdate ( gsb_data_transaction_get_date (
@@ -2398,7 +2399,7 @@ void confirmation_enregistrement_ope_import ( struct struct_compte_importation *
 	    }
 	    else
 	    {
-            tmpstr2 = gsb_real_get_string (gsb_data_transaction_get_amount (
+            tmpstr2 = utils_real_get_string (gsb_data_transaction_get_amount (
                                 ope_import -> ope_correspondante));
             tmpstr = g_strdup_printf ( _("Transaction found : %s ; %s ; %s"),
                         gsb_format_gdate ( gsb_data_transaction_get_date (
@@ -3283,7 +3284,7 @@ void gsb_import_show_orphan_transactions ( GSList *orphan_list,
                         0, FALSE,
                         1, gsb_format_gdate ( ope_import -> date ),
                         2, ope_import -> tiers,
-                        3, gsb_real_get_string_with_currency ( ope_import -> montant,
+                        3, utils_real_get_string_with_currency ( ope_import -> montant,
                         ope_import -> devise, TRUE ),
                         -1 );
 
diff --git a/src/metatree.c b/src/metatree.c
index d9bc0a8..706e9d0 100644
--- a/src/metatree.c
+++ b/src/metatree.c
@@ -54,6 +54,7 @@
 #include "transaction_list_select.h"
 #include "utils.h"
 #include "utils_dates.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -353,7 +354,7 @@ void fill_division_row ( GtkTreeModel * model, MetatreeInterface * iface,
 	label = g_strdup_printf ( "%s (%d)", string_tmp, number_transactions);
 	g_free (string_tmp);
 	string_tmp = label;
-	balance = gsb_real_get_string_with_currency ( iface -> div_balance ( division ),
+	balance = utils_real_get_string_with_currency ( iface -> div_balance ( division ),
 						      iface -> tree_currency (), TRUE );
 
 	/* add a white child to show the arrow to open it */
@@ -436,7 +437,7 @@ void fill_sub_division_row ( GtkTreeModel *model,
 	if ( ! gtk_tree_model_iter_has_child ( model, iter ) )
 	    gtk_tree_store_append (GTK_TREE_STORE (model), &dumb_iter, iter );
 
-	balance = gsb_real_get_string_with_currency ( iface -> sub_div_balance ( division, sub_division ),
+	balance = utils_real_get_string_with_currency ( iface -> sub_div_balance ( division, sub_division ),
 						      iface -> tree_currency (), TRUE );
     }
     
@@ -536,7 +537,7 @@ void fill_transaction_row ( GtkTreeModel *model,
 	g_free ( tmpstr );
     }
 
-    amount = gsb_real_get_string_with_currency ( gsb_data_transaction_get_amount (transaction_number),
+    amount = utils_real_get_string_with_currency ( gsb_data_transaction_get_amount (transaction_number),
 						 gsb_data_transaction_get_currency_number (transaction_number), TRUE );
     account = gsb_data_account_get_name ( gsb_data_transaction_get_account_number (transaction_number));
     gtk_tree_store_set ( GTK_TREE_STORE(model), iter, 
@@ -2325,7 +2326,7 @@ gboolean metatree_selection_changed ( GtkTreeSelection *selection, GtkTreeModel
 
 	if ( div_id ) 
 	{
-	    balance = gsb_real_get_string_with_currency ( iface -> div_balance ( div_id ),
+	    balance = utils_real_get_string_with_currency ( iface -> div_balance ( div_id ),
 							  iface -> tree_currency (), TRUE );
 	}
 
@@ -2336,7 +2337,7 @@ gboolean metatree_selection_changed ( GtkTreeSelection *selection, GtkTreeModel
 				 ( sub_div_id ? iface -> sub_div_name ( div_id, sub_div_id ) :
 				   _(iface->no_sub_div_label) ), NULL );
             g_free ( tmpstr );
-	    balance = gsb_real_get_string_with_currency ( iface -> sub_div_balance ( div_id, sub_div_id ),
+	    balance = utils_real_get_string_with_currency ( iface -> sub_div_balance ( div_id, sub_div_id ),
 							  iface -> tree_currency (), TRUE );
 	}
 
@@ -2531,7 +2532,7 @@ void fill_division_zero ( GtkTreeModel * model,
 	g_free (string_tmp);
 	string_tmp = label;
 
-	balance = gsb_real_get_string_with_currency ( iface -> div_balance ( 0 ),
+	balance = utils_real_get_string_with_currency ( iface -> div_balance ( 0 ),
 						      iface -> tree_currency (), TRUE );
 
 	/* add a white child to show the arrow to open it */
@@ -2609,7 +2610,7 @@ void fill_sub_division_zero ( GtkTreeModel * model,
 	if ( ! gtk_tree_model_iter_has_child ( model, iter ) )
 	    gtk_tree_store_append (GTK_TREE_STORE (model), &dumb_iter, iter );
 
-	balance = gsb_real_get_string_with_currency ( iface -> sub_div_balance ( division, 0 ),
+	balance = utils_real_get_string_with_currency ( iface -> sub_div_balance ( division, 0 ),
 						      iface -> tree_currency (), TRUE );
     }
     
diff --git a/src/navigation.c b/src/navigation.c
index 5c69ac4..07b9bfc 100644
--- a/src/navigation.c
+++ b/src/navigation.c
@@ -66,6 +66,7 @@
 #include "transaction_list_sort.h"
 #include "utils.h"
 #include "utils_dates.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -1003,7 +1004,7 @@ void gsb_navigation_update_statement_label ( gint account_number )
     {
         tmp_str1 = gsb_format_gdate ( gsb_data_reconcile_get_final_date (
                                             reconcile_number ) );
-        tmp_str2 = gsb_real_get_string_with_currency ( amount,
+        tmp_str2 = utils_real_get_string_with_currency ( amount,
                         gsb_data_account_get_currency ( account_number ), TRUE );
         
         tmp_str = g_strconcat ( _("Last statement: "), tmp_str1, " - ",
@@ -1015,7 +1016,7 @@ void gsb_navigation_update_statement_label ( gint account_number )
     }
     else if ( amount.mantissa != 0 )
     {
-        tmp_str2 = gsb_real_get_string_with_currency (amount,
+        tmp_str2 = utils_real_get_string_with_currency (amount,
                         gsb_data_account_get_currency ( account_number ), TRUE );
         
         tmp_str = g_strconcat ( _("Last statement: none"), " - ",
diff --git a/src/parametres.c b/src/parametres.c
index 8ec282e..de7df59 100644
--- a/src/parametres.c
+++ b/src/parametres.c
@@ -71,6 +71,7 @@
 #include "utils.h"
 #include "utils_dates.h"
 #include "utils_files.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -1492,7 +1493,7 @@ void gsb_localisation_decimal_point_changed ( GtkComboBox *widget, gpointer user
 
     /* reset capital */
     entry = bet_finance_get_capital_entry ( );
-    str_capital = gsb_real_get_string_with_currency ( gsb_real_double_to_real (
+    str_capital = utils_real_get_string_with_currency ( gsb_real_double_to_real (
                     etat.bet_capital ),
                     etat.bet_currency,
                     FALSE );
@@ -1552,7 +1553,7 @@ void gsb_localisation_thousands_sep_changed ( GtkComboBox *widget, gpointer user
 
     /* reset capital */
     entry = bet_finance_get_capital_entry ( );
-    str_capital = gsb_real_get_string_with_currency ( gsb_real_double_to_real (
+    str_capital = utils_real_get_string_with_currency ( gsb_real_double_to_real (
                     etat.bet_capital ),
                     etat.bet_currency,
                     FALSE );
diff --git a/src/qif.c b/src/qif.c
index 7271138..30cc566 100644
--- a/src/qif.c
+++ b/src/qif.c
@@ -44,6 +44,7 @@
 #include "gsb_data_transaction.h"
 #include "gsb_file_util.h"
 #include "gsb_real.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "import.h"
 #include "erreur.h"
@@ -797,7 +798,7 @@ gboolean qif_export ( const gchar *filename,
 			  g_date_get_year (gsb_data_transaction_get_date (transaction_number_tmp)));
 
 		/* met le solde initial */
-		tmpstr = gsb_real_get_string (gsb_data_account_get_init_balance (account_nb, -1));
+		tmpstr = utils_real_get_string (gsb_data_account_get_init_balance (account_nb, -1));
 		fprintf ( fichier_qif,
 			  "T%s\n",
 			  tmpstr);
@@ -852,7 +853,7 @@ gboolean qif_export ( const gchar *filename,
 
 
 		/* met le montant, transforme la devise si necessaire */
-		tmpstr = gsb_real_get_string (gsb_data_transaction_get_adjusted_amount ( transaction_number_tmp, floating_point));
+		tmpstr = utils_real_get_string (gsb_data_transaction_get_adjusted_amount ( transaction_number_tmp, floating_point));
 		fprintf ( fichier_qif,
 			  "T%s\n",
 			  tmpstr);
@@ -947,7 +948,7 @@ gboolean qif_export ( const gchar *filename,
 
 			    /* set the amount of the split child */
 
-			    tmpstr = gsb_real_get_string (gsb_data_transaction_get_adjusted_amount (transaction_number_tmp_2, floating_point));
+			    tmpstr = utils_real_get_string (gsb_data_transaction_get_adjusted_amount (transaction_number_tmp_2, floating_point));
 			    fprintf ( fichier_qif,
 				      "$%s\n",
 				      tmpstr);
@@ -995,7 +996,7 @@ gboolean qif_export ( const gchar *filename,
 	/* there is no transaction in the account, so do the opening of the account, bug no date */
 	/* met le solde initial */
 
-	gchar* tmpstr = gsb_real_get_string (gsb_data_account_get_init_balance (account_nb, -1));
+	gchar* tmpstr = utils_real_get_string (gsb_data_account_get_init_balance (account_nb, -1));
 	fprintf ( fichier_qif,
 		  "T%s\n",
 		  tmpstr);
@@ -1131,7 +1132,7 @@ gint gsb_qif_recupere_operations_from_account ( FILE *qif_file,
                 gchar *new_str;
 
                 new_str = utils_str_localise_decimal_point_from_string ( string + 1 );
-                imported_transaction -> montant = gsb_real_get_from_string ( new_str );
+                imported_transaction -> montant = utils_real_get_from_string ( new_str );
 
                 g_free ( new_str );
             }
@@ -1209,7 +1210,7 @@ gint gsb_qif_recupere_operations_from_account ( FILE *qif_file,
                 gchar *new_str;
 
                 new_str = utils_str_localise_decimal_point_from_string ( string + 1 );
-                imported_splitted -> montant = gsb_real_get_from_string ( new_str );
+                imported_splitted -> montant = utils_real_get_from_string ( new_str );
 
                 g_free ( new_str );
             }
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index 2eaeef4..124fdaf 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -12,10 +12,12 @@ cunit_tests_SOURCES = \
 	gsb_data_account_cunit.c	\
 	gsb_real_cunit.c	\
 	utils_dates_cunit.c	\
+	utils_real_cunit.c	\
 	\
 	gsb_data_account_cunit.h	\
 	gsb_real_cunit.h	\
-	utils_dates_cunit.h
+	utils_dates_cunit.h	\
+	utils_real_cunit.h
 
 cunit_tests_LDADD = $(top_builddir)/src/libgrisbi.la $(GRISBI_LIBS) $(IGE_MAC_LIBS) $(CUNIT_LIBS)
 
diff --git a/src/tests/gsb_real_cunit.c b/src/tests/gsb_real_cunit.c
index a35406a..767c5a8 100644
--- a/src/tests/gsb_real_cunit.c
+++ b/src/tests/gsb_real_cunit.c
@@ -37,17 +37,13 @@
 
 /* START_INCLUDE */
 #include "gsb_real_cunit.h"
-#include "gsb_locale.h"
 #include "gsb_real.h"
-#include "utils_str.h"
 /* END_INCLUDE */
 
 /* START_STATIC */
 static void gsb_real_cunit__gsb_real_add ( void );
-static void gsb_real_cunit__gsb_real_get_from_string ( void );
 static void gsb_real_cunit__gsb_real_mul();
 static void gsb_real_cunit__gsb_real_normalize();
-static void gsb_real_cunit__gsb_real_get_string_with_currency ( void );
 static void gsb_real_cunit__gsb_real_raw_format_string ( void );
 static void gsb_real_cunit__gsb_real_raw_get_from_string();
 static void gsb_real_cunit__gsb_real_raw_get_from_string__locale();
@@ -76,82 +72,6 @@ int gsb_real_cunit_clean_suite ( void )
     return 0;
 }
 
-void gsb_real_cunit__gsb_real_get_from_string ( void )
-{
-    char *lc_monetary_orig;
-    char *result = setlocale(LC_MONETARY, NULL);
-    if (result != NULL)
-    {
-        lc_monetary_orig = (char *)malloc((strlen(result) + 1) * sizeof(char));
-        strcpy(lc_monetary_orig, result);
-
-        /* C test */
-        result = setlocale(LC_MONETARY, "C");
-        if (result != NULL)
-        {
-            gsb_locale_init();
-
-            gsb_real val = gsb_real_get_from_string("123.45");
-            CU_ASSERT_EQUAL(12345, val.mantissa);
-            CU_ASSERT_EQUAL(2, val.exponent);
-
-            val = gsb_real_get_from_string("21000000");
-            CU_ASSERT_EQUAL(21000000, val.mantissa);
-            CU_ASSERT_EQUAL(0, val.exponent);
-
-            gsb_locale_shutdown();
-        }
-
-        /* French test */
-        result = setlocale(LC_MONETARY, "fr_FR.UTF-8");
-        if (result == NULL)
-            result = setlocale(LC_MONETARY, "fr_FR at euro");
-        if (result == NULL)
-            result = setlocale(LC_MONETARY, "fr_FR");
-        if (result != NULL)
-        {
-            gsb_locale_init();
-
-            gsb_real val = gsb_real_get_from_string("123,45");
-            CU_ASSERT_EQUAL(12345, val.mantissa);
-            CU_ASSERT_EQUAL(2, val.exponent);
-
-            val = gsb_real_get_from_string("21000000");
-            CU_ASSERT_EQUAL(21000000, val.mantissa);
-            CU_ASSERT_EQUAL(0, val.exponent);
-
-            gsb_locale_shutdown();
-        }
-
-        /* English test */
-        result = setlocale(LC_MONETARY, "en_US.UTF-8");
-        if (result == NULL)
-            result = setlocale(LC_MONETARY, "en_GB.UTF-8");
-        if (result == NULL)
-            result = setlocale(LC_MONETARY, "en_US");
-        if (result == NULL)
-            result = setlocale(LC_MONETARY, "en_GB");
-        if (result != NULL)
-        {
-            gsb_locale_init();
-
-            gsb_real val = gsb_real_get_from_string("123.45");
-            CU_ASSERT_EQUAL(12345, val.mantissa);
-            CU_ASSERT_EQUAL(2, val.exponent);
-
-            val = gsb_real_get_from_string("21 000 000");
-            CU_ASSERT_EQUAL(21000000, val.mantissa);
-            CU_ASSERT_EQUAL(0, val.exponent);
-
-            gsb_locale_shutdown();
-        }
-
-        /* Restore current locale and free memory */
-        setlocale(LC_MONETARY, lc_monetary_orig);
-        free(lc_monetary_orig) ;
-    }
-}
-
 void gsb_real_cunit__gsb_real_raw_get_from_string()
 {
     gsb_real val;
@@ -477,38 +397,6 @@ void gsb_real_cunit__gsb_real_raw_format_string ( void )
 }
 
 
-void gsb_real_cunit__gsb_real_get_string_with_currency ( void )
-{
-    gchar *s;
-    gsb_real n;
-    gint currency_number = 1;
-
-    n.mantissa = 0;
-    n.exponent = 0;
-    s = gsb_real_get_string_with_currency ( n, currency_number, FALSE );
-    CU_ASSERT_STRING_EQUAL("0", s);
-    g_free(s);
-
-    n.mantissa = 31415;
-    n.exponent = 100;
-    s = gsb_real_get_string_with_currency ( n, currency_number, FALSE );
-    CU_ASSERT_STRING_EQUAL(ERROR_REAL_STRING, s);
-    g_free(s);
-
-    n.mantissa = 31415;
-    n.exponent = -1;
-    s = gsb_real_get_string_with_currency ( n, currency_number, FALSE );
-    CU_ASSERT_STRING_EQUAL(ERROR_REAL_STRING, s);
-    g_free(s);
-
-    n.mantissa = G_GINT64_CONSTANT(0x8000000000000000);
-    n.exponent = 2;
-    s = gsb_real_get_string_with_currency ( n, currency_number, FALSE );
-    CU_ASSERT_STRING_EQUAL(ERROR_REAL_STRING, s);
-    g_free(s);
-}
-
-
 void gsb_real_cunit__gsb_real_normalize()
 {
     gsb_real a;
@@ -720,8 +608,7 @@ CU_pSuite gsb_real_cunit_create_suite ( void )
     if(NULL == pSuite)
         return NULL;
 
-    if ( ( NULL == CU_add_test( pSuite, "of gsb_real_get_from_string()",     gsb_real_cunit__gsb_real_get_from_string ) )
-      || ( NULL == CU_add_test( pSuite, "of gsb_real_raw_get_from_string()", gsb_real_cunit__gsb_real_raw_get_from_string ) )
+    if ( ( NULL == CU_add_test( pSuite, "of gsb_real_raw_get_from_string()", gsb_real_cunit__gsb_real_raw_get_from_string ) )
       || ( NULL == CU_add_test( pSuite, "of gsb_real_raw_get_from_string() with locale", gsb_real_cunit__gsb_real_raw_get_from_string__locale ) )
       || ( NULL == CU_add_test( pSuite, "of gsb_real_raw_format_string()",   gsb_real_cunit__gsb_real_raw_format_string ) )
       || ( NULL == CU_add_test( pSuite, "of gsb_real_gsb_real_normalize()",  gsb_real_cunit__gsb_real_normalize ) )
@@ -729,7 +616,6 @@ CU_pSuite gsb_real_cunit_create_suite ( void )
       || ( NULL == CU_add_test( pSuite, "of gsb_real_sub()",                 gsb_real_cunit__gsb_real_sub ) )
       || ( NULL == CU_add_test( pSuite, "of gsb_real_mul()",                 gsb_real_cunit__gsb_real_mul ) )
       || ( NULL == CU_add_test( pSuite, "of gsb_real_adjust_exponent()",     gsb_real_cunit__gsb_real_adjust_exponent ) )
-      || ( NULL == CU_add_test( pSuite, "of gsb_real_get_string_with_currency()", gsb_real_cunit__gsb_real_get_string_with_currency ) )
        )
         return NULL;
 
diff --git a/src/tests/main_cunit.c b/src/tests/main_cunit.c
index fb476bb..1ee7741 100644
--- a/src/tests/main_cunit.c
+++ b/src/tests/main_cunit.c
@@ -42,6 +42,7 @@
 #include "gsb_data_account_cunit.h"
 #include "gsb_real_cunit.h"
 #include "utils_dates_cunit.h"
+#include "utils_real_cunit.h"
 #include "structures.h"
 /*END_INCLUDE*/
 
@@ -79,6 +80,7 @@ int gsb_cunit_run_tests()
     if ( ( NULL == gsb_data_account_cunit_create_suite ( ) )
       || ( NULL == gsb_real_cunit_create_suite ( ) )
       || ( NULL == utils_dates_cunit_create_suite ( ) )
+      || ( NULL == utils_real_cunit_create_suite ( ) )
         )
     {
         CU_cleanup_registry();
diff --git a/src/tests/utils_real_cunit.c b/src/tests/utils_real_cunit.c
new file mode 100644
index 0000000..e55f4e7
--- /dev/null
+++ b/src/tests/utils_real_cunit.c
@@ -0,0 +1,176 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                utils_real_cunit                            */
+/*                                                                            */
+/*     Copyright (C)    2000-2007 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2008 Benjamin Drieu (bdrieu at april.org)                       */
+/*                      2009 Mickaël Remars (grisbi at remars.com)               */
+/*          http://www.grisbi.org                                             */
+/*                                                                            */
+/*  This program is free software; you can redistribute it and/or modify      */
+/*  it under the terms of the GNU General Public License as published by      */
+/*  the Free Software Foundation; either version 2 of the License, or         */
+/*  (at your option) any later version.                                       */
+/*                                                                            */
+/*  This program is distributed in the hope that it will be useful,           */
+/*  but WITHOUT ANY WARRANTY; without even the implied warranty of            */
+/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             */
+/*  GNU General Public License for more details.                              */
+/*                                                                            */
+/*  You should have received a copy of the GNU General Public License         */
+/*  along with this program; if not, write to the Free Software               */
+/*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+/*                                                                            */
+/* ************************************************************************** */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "include.h"
+#include <stdlib.h>
+
+/* START_INCLUDE */
+#include "utils_real_cunit.h"
+#include "gsb_locale.h"
+#include "gsb_real.h"
+#include "utils_real.h"
+/* END_INCLUDE */
+
+
+static int utils_real_cunit_init_suite ( void )
+{
+    return 0;
+}
+
+
+static int utils_real_cunit_clean_suite ( void )
+{
+    return 0;
+}
+
+
+void utils_real_cunit__utils_real_get_from_string ( void )
+{
+    char *lc_monetary_orig;
+    char *result = setlocale(LC_MONETARY, NULL);
+    if (result != NULL)
+    {
+        lc_monetary_orig = (char *)malloc((strlen(result) + 1) * sizeof(char));
+        strcpy(lc_monetary_orig, result);
+
+        /* C test */
+        result = setlocale(LC_MONETARY, "C");
+        if (result != NULL)
+        {
+            gsb_locale_init();
+
+            gsb_real val = utils_real_get_from_string("123.45");
+            CU_ASSERT_EQUAL(12345, val.mantissa);
+            CU_ASSERT_EQUAL(2, val.exponent);
+
+            val = utils_real_get_from_string("21000000");
+            CU_ASSERT_EQUAL(21000000, val.mantissa);
+            CU_ASSERT_EQUAL(0, val.exponent);
+
+            gsb_locale_shutdown();
+        }
+
+        /* French test */
+        result = setlocale(LC_MONETARY, "fr_FR.UTF-8");
+        if (result == NULL)
+            result = setlocale(LC_MONETARY, "fr_FR at euro");
+        if (result == NULL)
+            result = setlocale(LC_MONETARY, "fr_FR");
+        if (result != NULL)
+        {
+            gsb_locale_init();
+
+            gsb_real val = utils_real_get_from_string("123,45");
+            CU_ASSERT_EQUAL(12345, val.mantissa);
+            CU_ASSERT_EQUAL(2, val.exponent);
+
+            val = utils_real_get_from_string("21000000");
+            CU_ASSERT_EQUAL(21000000, val.mantissa);
+            CU_ASSERT_EQUAL(0, val.exponent);
+
+            gsb_locale_shutdown();
+        }
+
+        /* English test */
+        result = setlocale(LC_MONETARY, "en_US.UTF-8");
+        if (result == NULL)
+            result = setlocale(LC_MONETARY, "en_GB.UTF-8");
+        if (result == NULL)
+            result = setlocale(LC_MONETARY, "en_US");
+        if (result == NULL)
+            result = setlocale(LC_MONETARY, "en_GB");
+        if (result != NULL)
+        {
+            gsb_locale_init();
+
+            gsb_real val = utils_real_get_from_string("123.45");
+            CU_ASSERT_EQUAL(12345, val.mantissa);
+            CU_ASSERT_EQUAL(2, val.exponent);
+
+            val = utils_real_get_from_string("21 000 000");
+            CU_ASSERT_EQUAL(21000000, val.mantissa);
+            CU_ASSERT_EQUAL(0, val.exponent);
+
+            gsb_locale_shutdown();
+        }
+
+        /* Restore current locale and free memory */
+        setlocale(LC_MONETARY, lc_monetary_orig);
+        free(lc_monetary_orig) ;
+    }
+}
+
+
+void utils_real_cunit__utils_real_get_string_with_currency ( void )
+{
+    gchar *s;
+    gsb_real n;
+    gint currency_number = 1;
+
+    n.mantissa = 0;
+    n.exponent = 0;
+    s = utils_real_get_string_with_currency ( n, currency_number, FALSE );
+    CU_ASSERT_STRING_EQUAL("0", s);
+    g_free(s);
+
+    n.mantissa = 31415;
+    n.exponent = 100;
+    s = utils_real_get_string_with_currency ( n, currency_number, FALSE );
+    CU_ASSERT_STRING_EQUAL(ERROR_REAL_STRING, s);
+    g_free(s);
+
+    n.mantissa = 31415;
+    n.exponent = -1;
+    s = utils_real_get_string_with_currency ( n, currency_number, FALSE );
+    CU_ASSERT_STRING_EQUAL(ERROR_REAL_STRING, s);
+    g_free(s);
+
+    n.mantissa = G_GINT64_CONSTANT(0x8000000000000000);
+    n.exponent = 2;
+    s = utils_real_get_string_with_currency ( n, currency_number, FALSE );
+    CU_ASSERT_STRING_EQUAL(ERROR_REAL_STRING, s);
+    g_free(s);
+}
+
+
+CU_pSuite utils_real_cunit_create_suite ( void )
+{
+    CU_pSuite pSuite = CU_add_suite("utils_real",
+                                    utils_real_cunit_init_suite,
+                                    utils_real_cunit_clean_suite);
+    if(NULL == pSuite)
+        return NULL;
+
+    if ( ! CU_add_test( pSuite, "of utils_real_get_from_string()",     utils_real_cunit__utils_real_get_from_string )
+      || ! CU_add_test( pSuite, "of utils_real_get_string_with_currency()", utils_real_cunit__utils_real_get_string_with_currency )
+       )
+        return NULL;
+
+    return pSuite;
+}
diff --git a/src/tests/utils_real_cunit.h b/src/tests/utils_real_cunit.h
new file mode 100644
index 0000000..d28d73f
--- /dev/null
+++ b/src/tests/utils_real_cunit.h
@@ -0,0 +1,8 @@
+#ifndef _UTILS_REAL_CUNIT_H
+#define _UTILS_REAL_CUNIT_H
+
+#include <CUnit/Basic.h>
+
+CU_pSuite utils_real_cunit_create_suite ( void );
+
+#endif
diff --git a/src/transaction_list.c b/src/transaction_list.c
index 3e70a78..db6b96c 100644
--- a/src/transaction_list.c
+++ b/src/transaction_list.c
@@ -57,6 +57,7 @@
 #include "transaction_list_sort.h"
 #include "transaction_model.h"
 #include "utils_dates.h"
+#include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
@@ -156,9 +157,9 @@ void transaction_list_append_transaction ( gint transaction_number )
 	white_record -> row_bg = gsb_color_get_couleur ( "split_background" );
 
 	/* as we append just now the white line, there are no child split, so the total is 0 */
-	amount_string = gsb_real_get_string_with_currency (null_real,
+	amount_string = utils_real_get_string_with_currency (null_real,
 							   gsb_data_transaction_get_currency_number (transaction_number), TRUE);
-	variance_string = gsb_real_get_string_with_currency (gsb_data_transaction_get_amount (transaction_number),
+	variance_string = utils_real_get_string_with_currency (gsb_data_transaction_get_amount (transaction_number),
 							     gsb_data_transaction_get_currency_number (transaction_number), TRUE);
 	white_record -> visible_col[2] = g_strdup_printf ( _("Total : %s (variance : %s)"),
 							   amount_string,
@@ -339,7 +340,7 @@ void transaction_list_append_archive ( gint archive_store_number )
     else
         amount_col = find_element_col (ELEMENT_CREDIT);
 
-    newrecord -> visible_col[amount_col] = gsb_real_get_string_with_currency (
+    newrecord -> visible_col[amount_col] = utils_real_get_string_with_currency (
                         gsb_data_archive_store_get_balance (archive_store_number),
                         gsb_data_account_get_currency (
                         gsb_data_archive_store_get_account_number ( archive_store_number ) ),
@@ -958,7 +959,7 @@ void transaction_list_set_balances ( void )
 
         /* calculate the new balance */
         current_total = gsb_real_add ( current_total, amount );
-        record -> visible_col[column_balance] = gsb_real_get_string_with_currency ( current_total,
+        record -> visible_col[column_balance] = utils_real_get_string_with_currency ( current_total,
                                                  currency_number , TRUE);
         if (current_total.mantissa >= 0)
             record -> amount_color = NULL;
@@ -1050,9 +1051,9 @@ gboolean transaction_list_update_transaction ( gint transaction_number )
 	white_record -> row_bg = gsb_color_get_couleur ( "split_background" );
 
 	/* as we append just now the white line, there are no child split, so the total is 0 */
-	amount_string = gsb_real_get_string_with_currency (null_real,
+	amount_string = utils_real_get_string_with_currency (null_real,
 							   gsb_data_transaction_get_currency_number (transaction_number), TRUE);
-	variance_string = gsb_real_get_string_with_currency (gsb_data_transaction_get_amount (transaction_number),
+	variance_string = utils_real_get_string_with_currency (gsb_data_transaction_get_amount (transaction_number),
 							     gsb_data_transaction_get_currency_number (transaction_number), TRUE);
 	white_record -> visible_col[2] = g_strdup_printf ( _("Total : %s (variance : %s)"),
 							   amount_string,
@@ -1956,9 +1957,9 @@ static gboolean transaction_list_update_white_child ( CustomRecord *white_record
     variance = gsb_real_sub ( gsb_data_transaction_get_amount (transaction_number),
 			      total_split);
     /* update the white line */
-    amount_string = gsb_real_get_string_with_currency (total_split,
+    amount_string = utils_real_get_string_with_currency (total_split,
 						       gsb_data_transaction_get_currency_number (transaction_number), TRUE);
-    variance_string = gsb_real_get_string_with_currency (variance,
+    variance_string = utils_real_get_string_with_currency (variance,
 							 gsb_data_transaction_get_currency_number (transaction_number), TRUE);
 
     /* show the variance and sub-total only if different of the transaction */
diff --git a/src/utils_editables.c b/src/utils_editables.c
index 4430571..579769b 100644
--- a/src/utils_editables.c
+++ b/src/utils_editables.c
@@ -32,6 +32,7 @@
 /*START_INCLUDE*/
 #include "utils_editables.h"
 #include "gsb_real.h"
+#include "utils_real.h"
 #include "utils_str.h"
 /*END_INCLUDE*/
 
@@ -171,14 +172,14 @@ gsb_real gsb_utils_edit_calculate_entry ( GtkWidget *entry )
                  pointeur[0] == '-' )
             {
                 total = gsb_real_add ( total,
-                            gsb_real_get_from_string ( pointeur ) );
+                            utils_real_get_from_string ( pointeur ) );
                 pointeur[0] = 0;
             }
             
             pointeur--;
         }
         total = gsb_real_add ( total,
-                        gsb_real_get_from_string ( pointeur ) );
+                        utils_real_get_from_string ( pointeur ) );
     }
     else if ( g_utf8_strchr ( string, -1, '*' ) )
     {
@@ -190,14 +191,14 @@ gsb_real gsb_utils_edit_calculate_entry ( GtkWidget *entry )
             if ( pointeur[0] == '*' )
             {
                 total = gsb_real_mul ( total,
-                            gsb_real_get_from_string ( pointeur + 1 ) );
+                            utils_real_get_from_string ( pointeur + 1 ) );
                 pointeur[0] = 0;
             }
             
             pointeur--;
         }
         total = gsb_real_mul ( total,
-                        gsb_real_get_from_string ( pointeur ) );
+                        utils_real_get_from_string ( pointeur ) );
     }
     else if ( g_utf8_strchr ( string, -1, '/' ) )
     {
@@ -205,13 +206,13 @@ gsb_real gsb_utils_edit_calculate_entry ( GtkWidget *entry )
 
         tab = g_strsplit ( string, "/", 2 );
 
-        total = gsb_real_div ( gsb_real_get_from_string ( tab[0] ),
-                        gsb_real_get_from_string ( tab[1] ) );
+        total = gsb_real_div ( utils_real_get_from_string ( tab[0] ),
+                        utils_real_get_from_string ( tab[1] ) );
 
         g_strfreev ( tab );
     }
     else
-        total = gsb_real_get_from_string ( string );
+        total = utils_real_get_from_string ( string );
 
     g_free ( string );
 
diff --git a/src/utils_real.c b/src/utils_real.c
new file mode 100644
index 0000000..0184eee
--- /dev/null
+++ b/src/utils_real.c
@@ -0,0 +1,134 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*     Copyright (C)         2011 Grisbi Development Team                     */
+/*             http://www.grisbi.org                                          */
+/*                                                                            */
+/*  This program is free software; you can redistribute it and/or modify      */
+/*  it under the terms of the GNU General Public License as published by      */
+/*  the Free Software Foundation; either version 2 of the License, or         */
+/*  (at your option) any later version.                                       */
+/*                                                                            */
+/*  This program is distributed in the hope that it will be useful,           */
+/*  but WITHOUT ANY WARRANTY; without even the implied warranty of            */
+/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             */
+/*  GNU General Public License for more details.                              */
+/*                                                                            */
+/*  You should have received a copy of the GNU General Public License         */
+/*  along with this program; if not, write to the Free Software               */
+/*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+/*                                                                            */
+/* ************************************************************************** */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "include.h"
+#include "gsb_data_currency.h"
+#include "gsb_locale.h"
+
+#include "utils_real.h"
+
+
+
+/*START_EXTERN*/
+extern gsb_real error_real;
+/*END_EXTERN*/
+
+
+/**
+ * Return the real in a formatted string, according to the currency 
+ * regarding decimal separator, thousands separator and positive or
+ * negative sign.
+ * this is directly the number coded in the real wich is returned
+ * usually, utils_real_get_string_with_currency is better to adapt the format
+ * 	of the number to the currency format
+ * 
+ * \param number	Number to format.
+ *
+ * \return		A newly allocated string of the number (this
+ *			function will never return NULL) 
+*/
+gchar *utils_real_get_string ( gsb_real number )
+{
+    struct lconv *locale = gsb_locale_get_locale ();
+
+    return gsb_real_raw_format_string ( number, locale, NULL );
+}
+
+
+/**
+ * Return the real in a formatted string with an optional currency
+ * symbol, according to the locale regarding decimal separator,
+ * thousands separator and positive or negative sign.
+ *
+ * \param number		Number to format.
+ * \param currency_number 	the currency we want to adapt the number, 0 for no adaptation
+ * \param show_symbol 		TRUE to add the currency symbol in the string
+ *
+ * \return		A newly allocated string of the number (this
+ *			function will never return NULL)
+ */
+gchar *utils_real_get_string_with_currency ( gsb_real number,
+                        gint currency_number,
+                        gboolean show_symbol )
+{
+    struct lconv *locale = gsb_locale_get_locale ( );
+    gint floating_point;
+
+    const gchar *currency_symbol = (currency_number && show_symbol)
+                                   ? gsb_data_currency_get_code_or_isocode (currency_number)
+                                   : NULL;
+
+    /* First of all if number = 0 I return 0 with the symbol of the currency if necessary */
+    if (number.mantissa == 0)
+    {
+        if (currency_symbol && locale -> p_cs_precedes)
+            return g_strdup_printf ( "%s %s", currency_symbol, "0" );
+        else if (currency_symbol && ! locale -> p_cs_precedes)
+            return g_strdup_printf ( "%s %s", "0", currency_symbol );
+        else
+            return g_strdup ("0");
+    }
+    else if ( (number.exponent < 0)
+    || (number.exponent > EXPONENT_MAX )
+    || (number.mantissa == error_real.mantissa) )
+        return g_strdup ( ERROR_REAL_STRING );
+
+    /* first we need to adapt the exponent to the currency */
+    /* if the exponent of the real is not the same of the currency, need to adapt it */
+    floating_point = gsb_data_currency_get_floating_point ( currency_number );
+    if ( currency_number && number.exponent != floating_point )
+        number = gsb_real_adjust_exponent ( number, floating_point );
+
+    return gsb_real_raw_format_string ( number, locale, currency_symbol );
+}
+
+
+/**
+ * get a real number from a string
+ * the string can be formatted :
+ * - handle , or . as separator
+ * - spaces are ignored
+ * - another character makes a 0 return
+ *
+ *   there is no ask for any exponent, so the gsb_real will be exactly the
+ *   same as the string
+ *
+ * \param string
+ *
+ * \return the number in the string transformed to gsb_real
+ * */
+gsb_real utils_real_get_from_string ( const gchar *string )
+{
+    gsb_real result;
+    gchar *thousands_sep = gsb_locale_get_mon_thousands_sep ( );
+    gchar *decimal_point = gsb_locale_get_mon_decimal_point ( );
+
+    result =  gsb_real_raw_get_from_string ( string, thousands_sep, decimal_point );
+
+    g_free ( decimal_point );
+    g_free ( thousands_sep );
+
+    return result;
+}
diff --git a/src/utils_real.h b/src/utils_real.h
new file mode 100644
index 0000000..36b8c0b
--- /dev/null
+++ b/src/utils_real.h
@@ -0,0 +1,15 @@
+#ifndef _UTILS_REAL_H
+#define _UTILS_REAL_H
+
+#include <glib.h>
+#include "gsb_real.h"
+
+gchar *utils_real_get_string ( gsb_real number );
+
+gchar *utils_real_get_string_with_currency ( gsb_real number,
+                        gint currency_number,
+                        gboolean show_symbol );
+
+gsb_real utils_real_get_from_string ( const gchar *string );
+
+#endif
diff --git a/src/utils_str.c b/src/utils_str.c
index df0536b..d68761c 100644
--- a/src/utils_str.c
+++ b/src/utils_str.c
@@ -37,6 +37,8 @@
 #include "gsb_data_report.h"
 #include "gsb_data_currency.h"
 #include "gsb_locale.h"
+#include "gsb_real.h"
+#include "utils_real.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -45,11 +47,6 @@ static gchar * gsb_string_truncate_n ( gchar * string, int n, gboolean hard_trun
 /*END_STATIC*/
 
 
-/*START_EXTERN*/
-extern gsb_real error_real;
-/*END_EXTERN*/
-
-
 /**
  * @brief convert an integer into a gchar based string
  * 
@@ -952,7 +949,7 @@ gdouble utils_str_strtod ( const gchar *str_number, gchar **endptr )
     if ( str_number == NULL )
         return 0.0;
 
-    real = gsb_real_get_from_string ( str_number );
+    real = utils_real_get_from_string ( str_number );
 
     number = gsb_real_real_to_double ( real );
 
@@ -1021,54 +1018,6 @@ gchar *utils_str_incremente_number_from_str ( const gchar *str_number, gint incr
 }
 
 
-/**
- * Return the real in a formatted string with an optional currency
- * symbol, according to the locale regarding decimal separator,
- * thousands separator and positive or negative sign.
- *
- * \param number		Number to format.
- * \param currency_number 	the currency we want to adapt the number, 0 for no adaptation
- * \param show_symbol 		TRUE to add the currency symbol in the string
- *
- * \return		A newly allocated string of the number (this
- *			function will never return NULL)
- */
-gchar *gsb_real_get_string_with_currency ( gsb_real number,
-                        gint currency_number,
-                        gboolean show_symbol )
-{
-    struct lconv *locale = gsb_locale_get_locale ( );
-    gint floating_point;
-
-    const gchar *currency_symbol = (currency_number && show_symbol)
-                                   ? gsb_data_currency_get_code_or_isocode (currency_number)
-                                   : NULL;
-
-    /* First of all if number = 0 I return 0 with the symbol of the currency if necessary */
-    if (number.mantissa == 0)
-    {
-        if (currency_symbol && locale -> p_cs_precedes)
-            return g_strdup_printf ( "%s %s", currency_symbol, "0" );
-        else if (currency_symbol && ! locale -> p_cs_precedes)
-            return g_strdup_printf ( "%s %s", "0", currency_symbol );
-        else
-            return g_strdup ("0");
-    }
-    else if ( (number.exponent < 0)
-    || (number.exponent > EXPONENT_MAX )
-    || (number.mantissa == error_real.mantissa) )
-        return g_strdup ( ERROR_REAL_STRING );
-
-    /* first we need to adapt the exponent to the currency */
-    /* if the exponent of the real is not the same of the currency, need to adapt it */
-    floating_point = gsb_data_currency_get_floating_point ( currency_number );
-    if ( currency_number && number.exponent != floating_point )
-        number = gsb_real_adjust_exponent ( number, floating_point );
-
-    return gsb_real_raw_format_string ( number, locale, currency_symbol );
-}
-
-
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/utils_str.h b/src/utils_str.h
index dc76db8..9042027 100644
--- a/src/utils_str.h
+++ b/src/utils_str.h
@@ -1,22 +1,17 @@
 #ifndef _UTILS_STR_H
 #define _UTILS_STR_H (1)
 
+#include <glib.h>
+#include <gmodule.h>
+
+
 #ifdef _WIN32
 #define NEW_LINE "\r\n"
 #else
 #define NEW_LINE "\n"
 #endif
 
-
-/* START_INCLUDE_H */
-#include "gsb_real.h"
-/* END_INCLUDE_H */
-
-
 /* START_DECLARATION */
-gchar *gsb_real_get_string_with_currency ( gsb_real number,
-                        gint currency_number,
-                        gboolean show_symbol );
 gchar *gsb_string_extract_int ( const gchar *chaine );
 GSList *gsb_string_get_categ_budget_struct_list_from_string ( const gchar *string );
 GSList *gsb_string_get_int_list_from_string ( const gchar *string,


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list