[grisbi-cvs] grisbi/src accueil.c, 1.218, 1.218.2.1 balance_estimate_tab.c, 1.23, 1.23.2.1 etats_affiche.c, 1.108, 1.108.2.1 etats_calculs.c, 1.133, 1.133.2.1 export_csv.c, 1.25, 1.25.2.1 file_obfuscate.c, 1.12, 1.12.2.1 gsb_account.c, 1.47, 1.47.2.1 gsb_account_property.c, 1.48, 1.48.2.1 gsb_autofunc.c, 1.24, 1.24.2.1 gsb_currency.c, 1.54, 1.54.2.1 gsb_currency_link_config.c, 1.18, 1.18.2.1 gsb_data_account.c, 1.91, 1.91.2.1 gsb_data_archive_store.c, 1.16, 1.16.2.1 gsb_data_budget.c, 1.54, 1.54.2.1 gsb_data_category.c, 1.71, 1.71.2.1 gsb_data_currency_link.c, 1.17, 1.17.2.1 gsb_data_partial_balance.c, 1.10, 1.10.2.1 gsb_data_payee.c, 1.50, 1.50.2.1 gsb_data_reconcile.c, 1.20, 1.20.2.1 gsb_data_report_amout_comparison.c, 1.14, 1.14.2.1 gsb_data_scheduled.c, 1.30, 1.30.2.1 gsb_data_transaction.c, 1.76, 1.76.2.1 gsb_debug.c, 1.14, 1.14.2.1 gsb_file_load.c, 1.192, 1.192.2.1 gsb_file_save.c, 1.143, 1.143.2.1 gsb_form.c, 1.137, 1.137.2.1 gsb_form_transaction.c, 1.51, 1.51.2.1 gsb_real.c, 1.59, 1.59.2.1 gsb_reconcile.c, 1.42, 1.42.2.1 gsb_rec oncile_config.c, 1.30, 1.30.2.1 gsb_reconcile_list.c, 1.10, 1.10.2.1 gsb_scheduler_list.c, 1.74, 1.74.2.1 gsb_transactions_list.c, 1.189, 1.189.2.1 gsb_transactions_list_sort.c, 1.21, 1.21.2.1 import.c, 1.308, 1.308.2.1 meta_budgetary.c, 1.37, 1.37.2.1 meta_categories.c, 1.48, 1.48.2.1 meta_payee.c, 1.35, 1.35.2.1 transaction_list.c, 1.52, 1.52.2.1 utils_editables.c, 1.32, 1.32.2.1

Gunee guneemwelloeux at users.sourceforge.net
Tue Dec 1 13:16:17 CET 2009


Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13786

Modified Files:
      Tag: version_0_6_0-new_gsb_real
	accueil.c balance_estimate_tab.c etats_affiche.c 
	etats_calculs.c export_csv.c file_obfuscate.c gsb_account.c 
	gsb_account_property.c gsb_autofunc.c gsb_currency.c 
	gsb_currency_link_config.c gsb_data_account.c 
	gsb_data_archive_store.c gsb_data_budget.c gsb_data_category.c 
	gsb_data_currency_link.c gsb_data_partial_balance.c 
	gsb_data_payee.c gsb_data_reconcile.c 
	gsb_data_report_amout_comparison.c gsb_data_scheduled.c 
	gsb_data_transaction.c gsb_debug.c gsb_file_load.c 
	gsb_file_save.c gsb_form.c gsb_form_transaction.c gsb_real.c 
	gsb_reconcile.c gsb_reconcile_config.c gsb_reconcile_list.c 
	gsb_scheduler_list.c gsb_transactions_list.c 
	gsb_transactions_list_sort.c import.c meta_budgetary.c 
	meta_categories.c meta_payee.c transaction_list.c 
	utils_editables.c 
Log Message:
with new gsb_real type

Index: gsb_currency_link_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_currency_link_config.c,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -u -d -r1.18 -r1.18.2.1
--- gsb_currency_link_config.c	16 Nov 2009 20:19:19 -0000	1.18
+++ gsb_currency_link_config.c	1 Dec 2009 12:16:15 -0000	1.18.2.1
@@ -516,9 +516,9 @@
 					 "exchange_entry" );
 
     number = gsb_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY (exchange_entry) ) );
-    if ( number.exponent > 8 )
+    /*if ( number.exponent > 8 )
         gtk_entry_set_max_length (GTK_ENTRY (exchange_entry),
-                        strlen( gtk_entry_get_text ( GTK_ENTRY ( exchange_entry ) ) - 1) );
+                        strlen( gtk_entry_get_text ( GTK_ENTRY ( exchange_entry ) ) - 1) );*/
 
     gsb_data_currency_link_set_first_currency ( link_number,
 						gsb_currency_get_currency_from_combobox (combobox_1));

Index: gsb_scheduler_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_scheduler_list.c,v
retrieving revision 1.74
retrieving revision 1.74.2.1
diff -u -d -r1.74 -r1.74.2.1
--- gsb_scheduler_list.c	23 Sep 2009 20:28:20 -0000	1.74
+++ gsb_scheduler_list.c	1 Dec 2009 12:16:15 -0000	1.74.2.1
@@ -952,7 +952,7 @@
 		scheduled_number > 0)
 	    {
 		/* it's a transfer */
-		if (gsb_data_scheduled_get_amount (scheduled_number).mantissa < 0)
+		if (GSB_REAL_SIGN(gsb_data_scheduled_get_amount (scheduled_number)) < 0)
 		    line[COL_NB_PARTY] = g_strdup_printf ( _("Transfer to %s"),
 							   gsb_data_account_get_name (gsb_data_scheduled_get_account_number_transfer (scheduled_number)));
 		else

Index: gsb_reconcile_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_reconcile_list.c,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -d -r1.10 -r1.10.2.1
--- gsb_reconcile_list.c	29 Aug 2009 08:36:41 -0000	1.10
+++ gsb_reconcile_list.c	1 Dec 2009 12:16:15 -0000	1.10.2.1
@@ -143,7 +143,7 @@
 	 &&
 	 gsb_data_payment_get_sign (payment_number_1) == GSB_PAYMENT_NEUTRAL
 	 &&
-	 gsb_data_transaction_get_amount (transaction_number_1).mantissa < 0 )
+	 GSB_REAL_SIGN(gsb_data_transaction_get_amount (transaction_number_1)) < 0 )
 	payment_number_1 = -payment_number_1;
     position_1 = g_slist_index ( gsb_data_account_get_sort_list (account_number),
 				 GINT_TO_POINTER (payment_number_1));
@@ -153,7 +153,7 @@
 	 &&
 	 gsb_data_payment_get_sign (payment_number_2) == GSB_PAYMENT_NEUTRAL
 	 &&
-	 gsb_data_transaction_get_amount (transaction_number_2).mantissa < 0 )
+	 GSB_REAL_SIGN(gsb_data_transaction_get_amount (transaction_number_2)) < 0 )
 	payment_number_2 = -payment_number_2;
     position_2 = g_slist_index ( gsb_data_account_get_sort_list (account_number),
 				 GINT_TO_POINTER (payment_number_2));

Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.143
retrieving revision 1.143.2.1
diff -u -d -r1.143 -r1.143.2.1
--- gsb_file_save.c	18 Oct 2009 17:46:21 -0000	1.143
+++ gsb_file_save.c	1 Dec 2009 12:16:15 -0000	1.143.2.1
@@ -182,7 +182,7 @@
         0,
         0,
 	};
-	return gsb_real_raw_format_string(number, &conv, NULL);
+	return gsb_real_raw_format_string(number, &conv, NULL,9);
 }
 
 

Index: etats_affiche.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_affiche.c,v
retrieving revision 1.108
retrieving revision 1.108.2.1
diff -u -d -r1.108 -r1.108.2.1
--- etats_affiche.c	30 Aug 2009 20:36:10 -0000	1.108
+++ etats_affiche.c	1 Dec 2009 12:16:15 -0000	1.108.2.1
@@ -104,7 +104,6 @@
 extern const gchar *nom_ss_categ_en_cours;
 extern const gchar *nom_ss_ib_en_cours;
 extern const gchar *nom_tiers_en_cours;
-extern gsb_real null_real;
 extern gint titres_affiches;
 /*END_EXTERN*/
 
@@ -1395,7 +1394,7 @@
 		    /* c'est un virement */
 
 		    gchar* fmtstr;
-		    if ( gsb_data_transaction_get_amount ( transaction_number).mantissa < 0 )
+		    if ( GSB_REAL_SIGN(gsb_data_transaction_get_amount ( transaction_number) ) < 0 )
 			fmtstr = _("Transfer to %s");
 		    else
 			fmtstr =  _("Transfer from %s");

Index: gsb_data_budget.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_budget.c,v
retrieving revision 1.54
retrieving revision 1.54.2.1
diff -u -d -r1.54 -r1.54.2.1
--- gsb_data_budget.c	22 Nov 2009 18:45:52 -0000	1.54
+++ gsb_data_budget.c	1 Dec 2009 12:16:15 -0000	1.54.2.1
@@ -103,7 +103,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 /** contains the g_slist of struct_budget */
@@ -1537,7 +1536,7 @@
 	/* we don't mind if tab_char exists and others, all the checks will be done in ...get_number_by_name */
 	budget_number = gsb_data_budget_get_number_by_name ( g_strstrip (tab_char[0]),
 							     TRUE,
-							     gsb_data_transaction_get_amount (transaction_number).mantissa <0 );
+							     GSB_REAL_SIGN (gsb_data_transaction_get_amount (transaction_number)) <0 );
 	gsb_data_transaction_set_budgetary_number ( transaction_number,
 						    budget_number );
     if ( tab_char[1] )
@@ -1562,7 +1561,7 @@
 	/* we don't mind if tab_char exists and others, all the checks will be done in ...get_number_by_name */
 	budget_number = gsb_data_budget_get_number_by_name ( tab_char[0],
 							     TRUE,
-							     gsb_data_scheduled_get_amount (transaction_number).mantissa <0 );
+							     GSB_REAL_SIGN(gsb_data_scheduled_get_amount (transaction_number)) <0 );
 	gsb_data_scheduled_set_budgetary_number ( transaction_number,
 						    budget_number );
     if ( tab_char[1] )

Index: gsb_data_archive_store.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_archive_store.c,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -d -r1.16 -r1.16.2.1
--- gsb_data_archive_store.c	22 Aug 2009 15:34:51 -0000	1.16
+++ gsb_data_archive_store.c	1 Dec 2009 12:16:15 -0000	1.16.2.1
@@ -77,7 +77,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 /** contains the g_slist of struct_store_archive */

Index: transaction_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list.c,v
retrieving revision 1.52
retrieving revision 1.52.2.1
diff -u -d -r1.52 -r1.52.2.1
--- transaction_list.c	29 Nov 2009 18:53:40 -0000	1.52
+++ transaction_list.c	1 Dec 2009 12:16:15 -0000	1.52.2.1
@@ -73,7 +73,6 @@
 extern gint display_one_line;
 extern gint display_three_lines;
 extern gint display_two_lines;
-extern gsb_real null_real;
 extern GSList *orphan_child_transactions;
 extern GdkColor split_background;
 extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
@@ -336,7 +335,7 @@
                         gsb_data_archive_store_get_transactions_number (
                         archive_store_number ) );
     printf ("texte archive = %s\n", newrecord -> visible_col[find_element_col (ELEMENT_PARTY)] );
-    if ((gsb_data_archive_store_get_balance (archive_store_number)).mantissa < 0)
+    if (GSB_REAL_SIGN(gsb_data_archive_store_get_balance (archive_store_number)) < 0)
 	amount_col = find_element_col (ELEMENT_DEBIT);
     else
 	amount_col = find_element_col (ELEMENT_CREDIT);
@@ -908,7 +907,7 @@
 				       amount);
 	record -> visible_col[column_balance] = gsb_real_get_string_with_currency ( current_total,
 										    gsb_data_account_get_currency (account_number), TRUE);
-	if (current_total.mantissa >= 0)
+	if (GSB_REAL_SIGN(current_total) >= 0)
 	    record -> amount_color = NULL;
 	else
 	    record -> amount_color = "red";
@@ -1888,7 +1887,7 @@
 							 gsb_data_transaction_get_currency_number (transaction_number), TRUE);
 
     /* show the variance and sub-total only if different of the transaction */
-    if (variance.mantissa)
+    if (GSB_REAL_SIGN(variance))
     {
 	white_record -> visible_col[2] = g_strdup_printf ( _("Total : %s (variance : %s)"),
 							   amount_string,

Index: gsb_reconcile_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_reconcile_config.c,v
retrieving revision 1.30
retrieving revision 1.30.2.1
diff -u -d -r1.30 -r1.30.2.1
--- gsb_reconcile_config.c	23 Aug 2009 16:45:05 -0000	1.30
+++ gsb_reconcile_config.c	1 Dec 2009 12:16:15 -0000	1.30.2.1
@@ -57,7 +57,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 /* the tree view used to modify the reconciles */

Index: gsb_data_transaction.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_transaction.c,v
retrieving revision 1.76
retrieving revision 1.76.2.1
diff -u -d -r1.76 -r1.76.2.1
--- gsb_data_transaction.c	28 Nov 2009 19:58:12 -0000	1.76
+++ gsb_data_transaction.c	1 Dec 2009 12:16:15 -0000	1.76.2.1
@@ -107,7 +107,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 
@@ -782,7 +781,7 @@
     else
     {
 	    /* no hard link between the 2 currencies, the exchange must have been saved in the transaction itself */
-        if ( transaction -> exchange_rate.mantissa )
+        if ( !GSB_REAL_NULL(transaction -> exchange_rate) )
         {
             if ( transaction -> change_between_account_and_transaction )
             amount = gsb_real_div ( transaction -> transaction_amount,

Index: gsb_account_property.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_account_property.c,v
retrieving revision 1.48
retrieving revision 1.48.2.1
diff -u -d -r1.48 -r1.48.2.1
--- gsb_account_property.c	3 Oct 2009 22:14:56 -0000	1.48
+++ gsb_account_property.c	1 Dec 2009 12:16:15 -0000	1.48.2.1
@@ -178,7 +178,6 @@
 extern gint mise_a_jour_liste_comptes_accueil;
 extern gint mise_a_jour_liste_echeances_manuelles_accueil;
 extern gint mise_a_jour_soldes_minimaux;
-extern gsb_real null_real;
 extern gchar *titre_fichier;
 /*END_EXTERN*/
 

Index: utils_editables.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_editables.c,v
retrieving revision 1.32
retrieving revision 1.32.2.1
diff -u -d -r1.32 -r1.32.2.1
--- utils_editables.c	24 Aug 2009 13:46:54 -0000	1.32
+++ utils_editables.c	1 Dec 2009 12:16:15 -0000	1.32.2.1
@@ -34,7 +34,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 

Index: meta_budgetary.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/meta_budgetary.c,v
retrieving revision 1.37
retrieving revision 1.37.2.1
diff -u -d -r1.37 -r1.37.2.1
--- meta_budgetary.c	22 Jul 2009 19:45:43 -0000	1.37
+++ meta_budgetary.c	1 Dec 2009 12:16:15 -0000	1.37.2.1
@@ -51,7 +51,6 @@
 
 /*START_EXTERN*/
 extern gint no_devise_totaux_ib;
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 

Index: gsb_data_category.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_category.c,v
retrieving revision 1.71
retrieving revision 1.71.2.1
diff -u -d -r1.71 -r1.71.2.1
--- gsb_data_category.c	30 Aug 2009 17:59:47 -0000	1.71
+++ gsb_data_category.c	1 Dec 2009 12:16:15 -0000	1.71.2.1
@@ -103,7 +103,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 
@@ -672,7 +671,7 @@
     {
 	category_number = gsb_data_category_get_number_by_name ( tab_char[0],
                         TRUE,
-                        gsb_data_mix_get_amount (transaction_number, is_transaction).mantissa <0 );
+                        GSB_REAL_SIGN(gsb_data_mix_get_amount (transaction_number, is_transaction)) <0 );
 	gsb_data_mix_set_category_number ( transaction_number,
 					   category_number,
 					   is_transaction );

Index: gsb_data_reconcile.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_reconcile.c,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -u -d -r1.20 -r1.20.2.1
--- gsb_data_reconcile.c	21 Nov 2009 11:06:52 -0000	1.20
+++ gsb_data_reconcile.c	1 Dec 2009 12:16:15 -0000	1.20.2.1
@@ -65,7 +65,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 

Index: gsb_data_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.c,v
retrieving revision 1.91
retrieving revision 1.91.2.1
diff -u -d -r1.91 -r1.91.2.1
--- gsb_data_account.c	14 Oct 2009 20:09:12 -0000	1.91
+++ gsb_data_account.c	1 Dec 2009 12:16:15 -0000	1.91.2.1
@@ -128,8 +128,6 @@
 
 /*START_EXTERN*/
 extern gboolean balances_with_scheduled;
-extern gsb_real error_real;
-extern gsb_real null_real;
 extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
 /*END_EXTERN*/
 
@@ -1004,7 +1002,7 @@
         gsb_real adjusted_amout = gsb_data_transaction_get_adjusted_amount (transaction_number, floating_point);
 
         gsb_real tmp_balance = gsb_real_add ( current_balance, adjusted_amout );
-	    if( tmp_balance.mantissa != error_real.mantissa )
+	    if( GSB_REAL_VALID(tmp_balance) )
 	        current_balance = tmp_balance;
         else
             current_balance_later = gsb_real_add ( current_balance_later, adjusted_amout);
@@ -1012,7 +1010,7 @@
 	    if ( gsb_data_transaction_get_marked_transaction (transaction_number))
 	    {
             tmp_balance = gsb_real_add ( marked_balance, adjusted_amout );
-    	    if( tmp_balance.mantissa != error_real.mantissa )
+    	    if( GSB_REAL_VALID(tmp_balance) )
 	            marked_balance = tmp_balance;
             else
                 marked_balance_later = gsb_real_add ( marked_balance_later, adjusted_amout);
@@ -2666,7 +2664,7 @@
 {
     gchar *string;
 
-	if (gsb_data_account_get_current_balance (account_number).mantissa < 0)
+	if (GSB_REAL_SIGN (gsb_data_account_get_current_balance (account_number)) < 0)
 	    string = g_strdup_printf ( "<span color=\"red\">%s</span>",
                         gsb_real_get_string_with_currency (
                         gsb_data_account_get_current_balance (account_number),

Index: balance_estimate_tab.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_tab.c,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -d -r1.23 -r1.23.2.1
--- balance_estimate_tab.c	29 Aug 2009 08:36:40 -0000	1.23
+++ balance_estimate_tab.c	1 Dec 2009 12:16:15 -0000	1.23.2.1
@@ -63,7 +63,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 extern GtkWidget *window;
 /*END_EXTERN*/
 
@@ -628,7 +627,7 @@
 	gchar* str_value = gsb_real_get_string (amount);
 	gchar* str_debit = NULL;
 	gchar* str_credit = NULL;
-	if (amount.mantissa < 0)
+	if (GSB_REAL_SIGN(amount) < 0)
 	    str_debit = gsb_real_get_string_with_currency (gsb_real_abs (amount),
 							   gsb_data_transaction_get_currency_number (transaction_number), TRUE);
 	else
@@ -696,7 +695,7 @@
 	gchar* str_value = gsb_real_get_string (amount);
 	gchar* str_debit = NULL;
 	gchar* str_credit = NULL;
-	if (amount.mantissa < 0)
+	if (GSB_REAL_SIGN(amount) < 0)
 	    str_debit = gsb_real_get_string_with_currency (gsb_real_abs (amount),
 							   gsb_data_scheduled_get_currency_number (scheduled_number), TRUE);
 	else

Index: meta_categories.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/meta_categories.c,v
retrieving revision 1.48
retrieving revision 1.48.2.1
diff -u -d -r1.48 -r1.48.2.1
--- meta_categories.c	22 Jul 2009 19:45:43 -0000	1.48
+++ meta_categories.c	1 Dec 2009 12:16:15 -0000	1.48.2.1
@@ -55,7 +55,6 @@
 
 /*START_EXTERN*/
 extern gint no_devise_totaux_categ;
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 static MetatreeInterface _category_interface = {

Index: gsb_data_payee.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_payee.c,v
retrieving revision 1.50
retrieving revision 1.50.2.1
diff -u -d -r1.50 -r1.50.2.1
--- gsb_data_payee.c	30 Aug 2009 17:59:47 -0000	1.50
+++ gsb_data_payee.c	1 Dec 2009 12:16:15 -0000	1.50.2.1
@@ -71,7 +71,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 /** contains the g_slist of struct_payee */

Index: file_obfuscate.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/file_obfuscate.c,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -u -d -r1.12 -r1.12.2.1
--- file_obfuscate.c	8 May 2009 09:35:10 -0000	1.12
+++ file_obfuscate.c	1 Dec 2009 12:16:15 -0000	1.12.2.1
@@ -56,7 +56,6 @@
 
 /*START_EXTERN*/
 extern gchar *nom_fichier_comptes;
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 

Index: meta_payee.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/meta_payee.c,v
retrieving revision 1.35
retrieving revision 1.35.2.1
diff -u -d -r1.35 -r1.35.2.1
--- meta_payee.c	9 Aug 2009 18:31:42 -0000	1.35
+++ meta_payee.c	1 Dec 2009 12:16:15 -0000	1.35.2.1
@@ -66,7 +66,6 @@
 
 /*START_EXTERN*/
 extern gint no_devise_totaux_tiers;
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 

Index: gsb_real.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_real.c,v
retrieving revision 1.59
retrieving revision 1.59.2.1
diff -u -d -r1.59 -r1.59.2.1
--- gsb_real.c	26 Nov 2009 17:20:29 -0000	1.59
+++ gsb_real.c	1 Dec 2009 12:16:15 -0000	1.59.2.1
@@ -32,95 +32,220 @@
 
 
 #include "include.h"
-#include <assert.h>
 
 /*START_INCLUDE*/
 #include "gsb_real.h"
 #include "./gsb_data_currency.h"
 /*END_INCLUDE*/
 
-gsb_real null_real = { 0 , 0 };
[...1122 lines suppressed...]
-	if( *err != '\0' )
-	{
-		return error_real;
-	}
-	if( !nombre )
-	return null_real;
-	while( (! (nombre % 10)) )
-	{
-		nombre /= 10;
-		decimals --;
-	}
-	resu.mantissa = nombre;
-	resu.exponent = decimals;
-	return resu;
-}
-
+}*/
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */

Index: import.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import.c,v
retrieving revision 1.308
retrieving revision 1.308.2.1
diff -u -d -r1.308 -r1.308.2.1
--- import.c	29 Nov 2009 20:47:52 -0000	1.308
+++ import.c	1 Dec 2009 12:16:15 -0000	1.308.2.1
@@ -2414,7 +2414,7 @@
             tab_str[0] = g_strstrip (tab_str[0]);
         category_number = gsb_data_category_get_number_by_name ( tab_str[0],
                         TRUE,
-                        imported_transaction -> montant.mantissa < 0 );
+                        GSB_REAL_SIGN(imported_transaction -> montant) < 0 );
         gsb_data_transaction_set_category_number ( transaction_number,
                         category_number );
         if (tab_str[1])
@@ -2592,7 +2592,7 @@
     gint payment_number;
     gint sign;
 
-    if ( gsb_data_transaction_get_amount (transaction_number).mantissa < 0 )
+    if ( GSB_REAL_SIGN(gsb_data_transaction_get_amount (transaction_number)) < 0 )
     {
         sign = GSB_PAYMENT_DEBIT;
         payment_number = gsb_data_account_get_default_debit (account_number);
@@ -2660,7 +2660,7 @@
     else
     {
     /* comme ce n'est pas un chèque, on met sur le type par défaut */
-    if ( gsb_data_transaction_get_amount (transaction_number).mantissa < 0 )
+    if ( GSB_REAL_SIGN(gsb_data_transaction_get_amount (transaction_number)) < 0 )
         gsb_data_transaction_set_method_of_payment_number ( transaction_number,
                         gsb_data_account_get_default_debit (account_number));
     else
@@ -4506,7 +4506,7 @@
 		tab_str[0] = g_strstrip (tab_str[0]);
 	budget_number = gsb_data_budget_get_number_by_name ( tab_str[0],
 					TRUE,
-					imported_transaction -> montant.mantissa < 0 );
+					GSB_REAL_SIGN(imported_transaction -> montant) < 0 );
 	gsb_data_transaction_set_budgetary_number ( transaction_number,
 					budget_number );
 	if (tab_str[1])

Index: etats_calculs.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_calculs.c,v
retrieving revision 1.133
retrieving revision 1.133.2.1
diff -u -d -r1.133 -r1.133.2.1
--- etats_calculs.c	29 Aug 2009 08:36:40 -0000	1.133
+++ etats_calculs.c	1 Dec 2009 12:16:15 -0000	1.133.2.1
@@ -133,7 +133,6 @@
 extern const gchar *nom_ss_ib_en_cours;
 extern const gchar *nom_tiers_en_cours;
 extern GtkWidget *notebook_general;
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 
@@ -486,7 +485,7 @@
 
 		    if ( gsb_data_report_get_amount_comparison_only_report_non_null (report_number)
 			 &&
-			 !gsb_data_transaction_get_amount (transaction_number_tmp).mantissa )
+			 GSB_REAL_NULL ( gsb_data_transaction_get_amount (transaction_number_tmp) ) )
 			goto operation_refusee;
 
 
@@ -1367,28 +1366,28 @@
 	case 6:
 	    /* nul  */
 
-	    if ( !montant_ope.mantissa )
+	    if ( GSB_REAL_NULL ( montant_ope ) )
 		return_value = 1;
 	    break;
 
 	case 7:
 	    /* non nul  */
 
-	    if ( montant_ope.mantissa )
+	    if ( ! GSB_REAL_NULL ( montant_ope ) )
 		return_value = 1;
 	    break;
 
 	case 8:
 	    /* positif  */
 
-	    if ( montant_ope.mantissa > 0 )
+	    if ( GSB_REAL_SIGN(montant_ope) > 0 )
 		return_value = 1;
 	    break;
 
 	case 9:
 	    /* négatif  */
 
-	    if ( montant_ope.mantissa < 0 )
+	    if ( GSB_REAL_SIGN(montant_ope) < 0 )
 		return_value = 1;
 	    break;
     }
@@ -2016,7 +2015,7 @@
 		}
 		else
 		{
-		    if ( gsb_data_transaction_get_amount (transaction_number).mantissa < 0 )
+		    if ( GSB_REAL_SIGN ( gsb_data_transaction_get_amount (transaction_number) ) < 0 )
 			liste_ope_depenses = g_slist_append ( liste_ope_depenses,
 							      gsb_data_transaction_get_pointer_of_transaction (transaction_number));
 		    else
@@ -2028,7 +2027,7 @@
 	    {
 		/* le classement racine n'est pas la catég, on sépare en fonction du montant */
 
-		if ( gsb_data_transaction_get_amount (transaction_number).mantissa < 0 )
+		if ( GSB_REAL_SIGN ( gsb_data_transaction_get_amount (transaction_number) ) < 0 )
 		    liste_ope_depenses = g_slist_append ( liste_ope_depenses,
 							  gsb_data_transaction_get_pointer_of_transaction (transaction_number) );
 		else

Index: gsb_data_report_amout_comparison.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_report_amout_comparison.c,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -d -r1.14 -r1.14.2.1
--- gsb_data_report_amout_comparison.c	27 Apr 2009 19:41:03 -0000	1.14
+++ gsb_data_report_amout_comparison.c	1 Dec 2009 12:16:15 -0000	1.14.2.1
@@ -3,7 +3,7 @@
 /*                                                                            */
 /*                                  gsb_data_report_amount_comparison         */
 /*                                                                            */
-/*     Copyright (C)	2000-2007 Cédric Auger (cedric at grisbi.org)	      */
+/*     Copyright (C)	2000-2007 Cédric Auger (cedric at grisbi.org)	      */
 /*			2003-2007 Benjamin Drieu (bdrieu at april.org)	      */
 /* 			http://www.grisbi.org				      */
 /*                                                                            */
@@ -73,7 +73,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 

Index: gsb_data_currency_link.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_currency_link.c,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -d -r1.17 -r1.17.2.1
--- gsb_data_currency_link.c	18 Oct 2009 17:46:20 -0000	1.17
+++ gsb_data_currency_link.c	1 Dec 2009 12:16:15 -0000	1.17.2.1
@@ -66,7 +66,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 /** contains the g_slist of struct_currency_link */

Index: export_csv.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/export_csv.c,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -u -d -r1.25 -r1.25.2.1
--- export_csv.c	19 Nov 2009 20:13:45 -0000	1.25
+++ export_csv.c	1 Dec 2009 12:16:15 -0000	1.25.2.1
@@ -302,7 +302,7 @@
     /* ok the balance is now good, can write it */
     CSV_CLEAR_FIELD (csv_field_solde);
     csv_field_solde = gsb_real_get_string (current_balance);
-    if ( current_balance.mantissa >= 0 )
+    if ( GSB_REAL_SIGN ( current_balance ) >= 0 )
     {
 	CSV_CLEAR_FIELD (csv_field_credit);
 	csv_field_credit = gsb_real_get_string (current_balance);
@@ -497,7 +497,7 @@
 	amount = gsb_data_transaction_get_adjusted_amount ( transaction_number,
 							    return_exponent);
 	CSV_CLEAR_FIELD (csv_field_credit);
-	if (amount.mantissa >= 0 )
+	if (GSB_REAL_SIGN ( amount ) >= 0 )
 	    csv_field_credit = gsb_real_get_string (amount);
 	else
 	    csv_field_debit  = gsb_real_get_string (gsb_real_abs (amount));

Index: gsb_autofunc.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_autofunc.c,v
retrieving revision 1.24
retrieving revision 1.24.2.1
diff -u -d -r1.24 -r1.24.2.1
--- gsb_autofunc.c	24 Aug 2009 13:11:48 -0000	1.24
+++ gsb_autofunc.c	1 Dec 2009 12:16:15 -0000	1.24.2.1
@@ -73,7 +73,6 @@
 
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 

Index: gsb_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_account.c,v
retrieving revision 1.47
retrieving revision 1.47.2.1
diff -u -d -r1.47 -r1.47.2.1
--- gsb_account.c	24 Aug 2009 13:11:48 -0000	1.47
+++ gsb_account.c	1 Dec 2009 12:16:15 -0000	1.47.2.1
@@ -108,12 +108,12 @@
     gsb_data_account_set_currency ( account_number, currency_number);
     gsb_data_account_set_bank (account_number, bank_number);
     gsb_data_account_set_init_balance (account_number, init_amount);
-    gsb_data_account_set_mini_balance_wanted ( account_number, 
-					       gsb_real_new ( 0, 
-							      gsb_data_currency_get_floating_point (currency_number) ) );
-    gsb_data_account_set_mini_balance_authorized (account_number, 
-						  gsb_real_new ( 0, 
-								 gsb_data_currency_get_floating_point (currency_number) ) );
+    gsb_data_account_set_mini_balance_wanted ( account_number, null_real);
+					       //gsb_real_new ( 0, 
+							      //gsb_data_currency_get_floating_point (currency_number) ) );
+    gsb_data_account_set_mini_balance_authorized (account_number, null_real);
+						  //gsb_real_new ( 0, 
+								 //gsb_data_currency_get_floating_point (currency_number) ) );
     gsb_data_account_set_name (account_number, name);
 
     /* update the combofix for categ */ 

Index: gsb_data_scheduled.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_scheduled.c,v
retrieving revision 1.30
retrieving revision 1.30.2.1
diff -u -d -r1.30 -r1.30.2.1
--- gsb_data_scheduled.c	12 Jun 2009 19:06:56 -0000	1.30
+++ gsb_data_scheduled.c	1 Dec 2009 12:16:15 -0000	1.30.2.1
@@ -1,6 +1,6 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
 /*          2003-2008 Benjamin Drieu (bdrieu at april.org)                       */
 /*          http://www.grisbi.org                                             */
 /*                                                                            */
@@ -92,7 +92,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 

Index: gsb_form_transaction.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form_transaction.c,v
retrieving revision 1.51
retrieving revision 1.51.2.1
diff -u -d -r1.51 -r1.51.2.1
--- gsb_form_transaction.c	7 Nov 2009 19:13:59 -0000	1.51
+++ gsb_form_transaction.c	1 Dec 2009 12:16:15 -0000	1.51.2.1
@@ -61,7 +61,6 @@
 
 /*START_EXTERN*/
 extern GtkWidget *form_button_recover_split;
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 
@@ -177,7 +176,7 @@
         /* ok, now number contains either the transaction_number, either the mother transaction number,
          * we can check the sign with it */
         widget = gsb_form_widget_get_widget ( TRANSACTION_FORM_TYPE );
-        if ( gsb_data_mix_get_amount ( number, TRUE ).mantissa < 0 )
+        if ( GSB_REAL_SIGN(gsb_data_mix_get_amount ( number, TRUE )) < 0 )
             gsb_payment_method_create_combo_list ( widget,
                                    GSB_PAYMENT_DEBIT,
                                    account_number, 0 );

Index: gsb_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.c,v
retrieving revision 1.189
retrieving revision 1.189.2.1
diff -u -d -r1.189 -r1.189.2.1
--- gsb_transactions_list.c	29 Nov 2009 18:53:39 -0000	1.189
+++ gsb_transactions_list.c	1 Dec 2009 12:16:15 -0000	1.189.2.1
@@ -706,11 +706,11 @@
 	    /* give the amount of the transaction on the transaction currency */
 	    if ( (cell_content_number == ELEMENT_DEBIT
 		  &&
-		  gsb_data_transaction_get_amount ( transaction_number).mantissa < 0 )
+		  GSB_REAL_SIGN(gsb_data_transaction_get_amount ( transaction_number)) < 0 )
 		 ||
 		 (cell_content_number == ELEMENT_CREDIT
 		  &&
-		  gsb_data_transaction_get_amount ( transaction_number).mantissa >= 0 ))
+		  GSB_REAL_SIGN(gsb_data_transaction_get_amount ( transaction_number)) >= 0 ))
 		return gsb_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
@@ -3227,7 +3227,7 @@
 	{
 	    case -1:
 		/* transfer to deleted account */
-		if ( gsb_data_transaction_get_amount ( transaction_number).mantissa < 0 )
+		if ( GSB_REAL_SIGN(gsb_data_transaction_get_amount ( transaction_number)) < 0 )
 		    tmp = g_strdup(_("Transfer to a deleted account"));
 		else
 		    tmp = g_strdup(_("Transfer from a deleted account"));
@@ -3240,7 +3240,7 @@
 		break;
 	    default:
 		/* transfer */
-		if ( gsb_data_transaction_get_amount (transaction_number).mantissa < 0 )
+		if ( GSB_REAL_SIGN(gsb_data_transaction_get_amount (transaction_number)) < 0 )
 		    tmp = g_strdup_printf ( _("Transfer to %s"),
 					    gsb_data_account_get_name ( gsb_data_transaction_get_account_number (contra_transaction_number)));
 		else

Index: gsb_form.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form.c,v
retrieving revision 1.137
retrieving revision 1.137.2.1
diff -u -d -r1.137 -r1.137.2.1
--- gsb_form.c	28 Nov 2009 12:56:18 -0000	1.137
+++ gsb_form.c	1 Dec 2009 12:16:15 -0000	1.137.2.1
@@ -686,7 +686,7 @@
 	    break;
 
 	case TRANSACTION_FORM_DEBIT:
-	    if (gsb_data_mix_get_amount (transaction_number, is_transaction).mantissa < 0)
+	    if (GSB_REAL_SIGN(gsb_data_mix_get_amount (transaction_number, is_transaction)) < 0)
 	    {
 		char_tmp = gsb_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),
@@ -700,7 +700,7 @@
 	    break;
 
 	case TRANSACTION_FORM_CREDIT:
-	    if (gsb_data_mix_get_amount (transaction_number, is_transaction).mantissa >= 0)
+	    if (GSB_REAL_SIGN(gsb_data_mix_get_amount (transaction_number, is_transaction)) >= 0)
 	    {
 		char_tmp = gsb_real_get_string_with_currency (gsb_data_mix_get_amount (transaction_number, is_transaction),
 							      gsb_data_mix_get_currency_number (transaction_number, is_transaction),
@@ -792,7 +792,7 @@
 
 	    /* ok, now number contains either the transaction_number, either the mother transaction number,
 	     * we can check the sign with it */
-	    if (gsb_data_mix_get_amount (number, is_transaction).mantissa < 0)
+	    if (GSB_REAL_SIGN(gsb_data_mix_get_amount (number, is_transaction)) < 0)
 		gsb_payment_method_create_combo_list ( widget,
 						       GSB_PAYMENT_DEBIT,
 						       account_number, 0 );
@@ -867,7 +867,7 @@
 	    {
 		number = gsb_data_mix_get_account_number_transfer (transaction_number, is_transaction);
 
-		if ( gsb_data_mix_get_amount (transaction_number, is_transaction).mantissa < 0 )
+		if ( GSB_REAL_SIGN(gsb_data_mix_get_amount (transaction_number, is_transaction)) < 0 )
 		    gsb_payment_method_create_combo_list ( widget,
 							   GSB_PAYMENT_CREDIT,
 							   number, 0);

Index: gsb_data_partial_balance.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_partial_balance.c,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -d -r1.10 -r1.10.2.1
--- gsb_data_partial_balance.c	15 Nov 2009 05:37:12 -0000	1.10
+++ gsb_data_partial_balance.c	1 Dec 2009 12:16:15 -0000	1.10.2.1
@@ -82,7 +82,6 @@
 
 /*START_EXTERN*/
 extern GtkWidget *main_vbox;
-extern gsb_real null_real;
 extern GtkWidget *window;
 /*END_EXTERN*/
 
@@ -1057,7 +1056,7 @@
         account_currency = gsb_data_account_get_currency ( account_nb );
         tmp_real = gsb_data_account_get_marked_balance ( account_nb );
 
-        if ( tmp_real.mantissa != 0 && partial_balance -> currency != account_currency )
+        if ( GSB_REAL_SIGN(tmp_real) != 0 && partial_balance -> currency != account_currency )
         {
             if ( ( link_number = gsb_data_currency_link_search ( account_currency,
                         partial_balance -> currency ) ) )
@@ -1075,7 +1074,7 @@
         solde = gsb_real_add ( solde, tmp_real );
     }
 
-    if ( partial_balance -> colorise && solde.mantissa < 0 )
+    if ( partial_balance -> colorise && GSB_REAL_SIGN(solde) < 0 )
         string = g_strdup_printf ( "<span color=\"red\">%s</span>",
                         gsb_real_get_string_with_currency (
                         solde, partial_balance -> currency, TRUE) );
@@ -1119,7 +1118,7 @@
         account_currency = gsb_data_account_get_currency ( account_nb );
         tmp_real = gsb_data_account_get_current_balance ( account_nb );
 
-        if ( tmp_real.mantissa != 0 && partial_balance -> currency != account_currency )
+        if ( GSB_REAL_SIGN(tmp_real) != 0 && partial_balance -> currency != account_currency )
         {
             if ( ( link_number = gsb_data_currency_link_search ( account_currency,
                         partial_balance -> currency ) ) )
@@ -1136,7 +1135,7 @@
         solde = gsb_real_add ( solde, tmp_real );
     }
 
-    if ( partial_balance -> colorise && solde.mantissa < 0 )
+    if ( partial_balance -> colorise && GSB_REAL_SIGN(solde) < 0 )
         string = g_strdup_printf ( "<span color=\"red\">%s</span>",
                         gsb_real_get_string_with_currency (
                         solde, partial_balance -> currency, TRUE) );

Index: accueil.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/accueil.c,v
retrieving revision 1.218
retrieving revision 1.218.2.1
diff -u -d -r1.218 -r1.218.2.1
--- accueil.c	7 Nov 2009 19:13:59 -0000	1.218
+++ accueil.c	1 Dec 2009 12:16:15 -0000	1.218.2.1
@@ -95,7 +95,6 @@
 extern GdkColor couleur_solde_alarme_verte_normal;
 extern GdkColor couleur_solde_alarme_verte_prelight;
 extern GtkWidget *form_transaction_part;
-extern gsb_real null_real;
 extern GSList *scheduled_transactions_taken;
 extern GSList *scheduled_transactions_to_take;
 extern gchar *titre_fichier;
@@ -1296,7 +1295,7 @@
 	    gtk_widget_show ( label  );
 
 	    /* label à droite */
-	    if ( gsb_data_scheduled_get_amount (scheduled_number).mantissa >= 0 )
+	    if ( GSB_REAL_SIGN (gsb_data_scheduled_get_amount (scheduled_number)) >= 0 )
 	    {
 		gchar* tmpstr2 = gsb_real_get_string_with_currency (
 			gsb_data_scheduled_get_amount (scheduled_number), currency_number, TRUE);
@@ -1419,7 +1418,7 @@
 
 	    /* label à droite */
 
-	    if ( gsb_data_transaction_get_amount (transaction_number).mantissa >= 0 )
+	    if ( GSB_REAL_SIGN( gsb_data_transaction_get_amount (transaction_number)) >= 0 )
 	    {
 		gchar* tmpstr2 = gsb_real_get_string_with_currency (
 			gsb_data_transaction_get_amount (transaction_number), currency_number, TRUE);
@@ -1791,7 +1790,7 @@
 
 	if ( gsb_data_account_get_kind (i) == GSB_TYPE_LIABILITIES
 	     &&
-	     gsb_data_account_get_current_balance (i).mantissa >= 0 )
+	     GSB_REAL_SIGN ( gsb_data_account_get_current_balance (i) ) >= 0 )
 	    liste_tmp = g_slist_append ( liste_tmp, gsb_data_account_get_name (i) );
 
 	list_tmp = list_tmp -> next;
@@ -1871,7 +1870,7 @@
 
     /* label à droite */
 
-    if ( gsb_data_scheduled_get_amount (scheduled_number).mantissa >= 0 )
+    if ( GSB_REAL_SIGN ( gsb_data_scheduled_get_amount (scheduled_number)) >= 0 )
     {
 	gchar* tmpstr2 = gsb_real_get_string_with_currency ( gsb_data_scheduled_get_amount (
 		scheduled_number), currency_number, TRUE );

Index: gsb_reconcile.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_reconcile.c,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -u -d -r1.42 -r1.42.2.1
--- gsb_reconcile.c	3 Oct 2009 22:14:56 -0000	1.42
+++ gsb_reconcile.c	1 Dec 2009 12:16:15 -0000	1.42.2.1
@@ -480,9 +480,9 @@
 
     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_NULL(gsb_real_sub ( gsb_real_add ( gsb_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 )
+			gsb_real_get_from_string (gtk_entry_get_text ( GTK_ENTRY ( reconcile_final_balance_entry ))))))
     {
 	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.") );
@@ -711,7 +711,7 @@
     tmpstr = gsb_real_get_string (amount);
     gtk_label_set_text ( GTK_LABEL ( reconcile_variation_balance_label ), tmpstr);
     g_free ( tmpstr );
-    if ( amount.mantissa )
+    if ( !GSB_REAL_NULL(amount) )
 	gtk_widget_set_sensitive ( GTK_WIDGET ( reconcile_ok_button ),
 				   FALSE );
     else

Index: gsb_debug.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_debug.c,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -d -r1.14 -r1.14.2.1
--- gsb_debug.c	24 Aug 2009 13:40:57 -0000	1.14
+++ gsb_debug.c	1 Dec 2009 12:16:15 -0000	1.14.2.1
@@ -58,7 +58,6 @@
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 
@@ -426,8 +425,8 @@
             pTransactionList = pTransactionList -> next;
         }
 
-        if ( gsb_real_abs ( gsb_real_sub ( reconcilied_amount,
-					     gsb_data_reconcile_get_final_balance (reconcile_number))).mantissa > 0 )
+        if ( GSB_REAL_SIGN(gsb_real_abs ( gsb_real_sub ( reconcilied_amount,
+					     gsb_data_reconcile_get_final_balance (reconcile_number)))) > 0 )
         {
             affected_accounts ++;
 

Index: gsb_transactions_list_sort.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list_sort.c,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -u -d -r1.21 -r1.21.2.1
--- gsb_transactions_list_sort.c	22 Nov 2009 08:32:00 -0000	1.21
+++ gsb_transactions_list_sort.c	1 Dec 2009 12:16:15 -0000	1.21.2.1
@@ -429,7 +429,7 @@
         /* no difference in the dates, sort by amount of transaction */
         amount_1 = gsb_data_transaction_get_amount ( transaction_number_1 );
         amount_2 = gsb_data_transaction_get_amount ( transaction_number_2 );
-        return_value = amount_2.mantissa - amount_1.mantissa;
+        return_value = gsb_real_cmp(amount_1, amount_2);
         if ( return_value == 0 )
             return_value = transaction_number_1 - transaction_number_2;
     }

Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.192
retrieving revision 1.192.2.1
diff -u -d -r1.192 -r1.192.2.1
--- gsb_file_load.c	18 Oct 2009 17:46:21 -0000	1.192
+++ gsb_file_load.c	1 Dec 2009 12:16:15 -0000	1.192.2.1
@@ -171,7 +171,6 @@
 extern gint no_devise_totaux_categ;
 extern gint no_devise_totaux_ib;
 extern gint no_devise_totaux_tiers;
-extern gsb_real null_real;
 extern gint scheduler_col_width[SCHEDULER_COL_VISIBLE_COLUMNS];
 extern GdkColor split_background;
 extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
@@ -5330,7 +5329,7 @@
         /* create now the link between currencies if necessary
          * don't create if the exchange is null event if the link was created before,
          * else we will become very rich in grisbi !!! */
-        if (tmp_currency_link.contra_currency && tmp_currency_link.exchange.mantissa != 0)
+        if (tmp_currency_link.contra_currency && GSB_REAL_SIGN(tmp_currency_link.exchange) != 0)
         {
             gint  link_number;
 

Index: gsb_currency.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_currency.c,v
retrieving revision 1.54
retrieving revision 1.54.2.1
diff -u -d -r1.54 -r1.54.2.1
--- gsb_currency.c	29 Nov 2009 21:53:43 -0000	1.54
+++ gsb_currency.c	1 Dec 2009 12:16:15 -0000	1.54.2.1
@@ -107,7 +107,6 @@
 extern gint mise_a_jour_liste_comptes_accueil;
 extern gint mise_a_jour_liste_echeances_auto_accueil;
 extern gint mise_a_jour_liste_echeances_manuelles_accueil;
-extern gsb_real null_real;
 extern GtkWidget *window;
 /*END_EXTERN*/
 
@@ -426,14 +425,14 @@
 
     if ( link_number )
     {
-        if ( current_exchange_fees.mantissa )
+        if ( !GSB_REAL_NULL ( current_exchange_fees ) )
             gsb_data_transaction_set_exchange_fees ( transaction_number,
                         current_exchange_fees );
         else
             gsb_data_transaction_set_exchange_fees ( transaction_number,
                         null_real );
 
-        if ( current_exchange.mantissa == 0 )
+        if ( GSB_REAL_NULL(current_exchange) )
             gsb_data_transaction_set_exchange_rate ( transaction_number,
                     gsb_real_abs (
                     gsb_data_currency_link_get_change_rate (
@@ -451,7 +450,7 @@
         return;
     }
 
-    if ( current_exchange.mantissa == 0 )
+    if ( GSB_REAL_NULL(current_exchange) )
         gsb_currency_exchange_dialog ( account_currency_number,
                         transaction_currency_number,
                         0,
@@ -461,7 +460,7 @@
 
     gsb_data_transaction_set_exchange_rate ( transaction_number,
                         gsb_real_abs (current_exchange));
-    if ( current_exchange_fees.mantissa )
+    if ( !GSB_REAL_NULL(current_exchange_fees) )
         gsb_data_transaction_set_exchange_fees ( transaction_number,
                         current_exchange_fees );
     else
@@ -671,14 +670,14 @@
                GTK_SHRINK | GTK_FILL, 0, 0, 0 );
 
     /* if the rate or fees exist already, fill them here */
-    if ( exchange_rate.mantissa )
+    if ( !GSB_REAL_NULL(exchange_rate) )
     {
         tmpstr = gsb_real_get_string ( exchange_rate );
         gtk_entry_set_text ( GTK_ENTRY ( entry ), tmpstr );
         g_free ( tmpstr );
     }
 
-    if ( exchange_fees.mantissa )
+    if ( !GSB_REAL_NULL(exchange_fees) )
     {
         tmpstr = gsb_real_get_string (gsb_real_abs (exchange_fees));
         gtk_entry_set_text ( GTK_ENTRY ( fees_entry ), tmpstr );
@@ -709,7 +708,7 @@
         else
             current_exchange_fees = null_real ;
 
-        if ( current_exchange.mantissa == 0 )
+        if ( GSB_REAL_NULL(current_exchange) )
         {
             tmpstr = g_strdup_printf ( _("The exchange rate or the transaction amount in "
                         "%s must be filled."),
@@ -968,8 +967,8 @@
 		else
         {
             gtk_widget_set_sensitive ( GTK_WIDGET ( entry ), FALSE );
-            amount_1 = gsb_str_to_real ( gtk_entry_get_text ( GTK_ENTRY ( entry_1 ) ) );
-            amount_2 = gsb_str_to_real ( gtk_entry_get_text ( GTK_ENTRY ( entry_2 ) ) );
+            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 ) ) );
             taux = gsb_real_div ( amount_2, amount_1 );
             gtk_entry_set_text ( GTK_ENTRY ( entry ), gsb_real_get_string ( taux ) );
         }



More information about the cvs mailing list