[grisbi-cvs] grisbi/src gsb_real.c,1.29,1.30
Pierre Biava
pbiava at users.sourceforge.net
Wed Apr 29 22:45:07 CEST 2009
- Previous message: [grisbi-cvs] grisbi/src accueil.c, 1.196, 1.197 affichage.c, 1.155, 1.156 affichage_liste.c, 1.105, 1.106 balance_estimate_tab.c, 1.21, 1.22 barre_outils.c, 1.124, 1.125 categories_onglet.c, 1.192, 1.193 dialog.c, 1.70, 1.71 erreur.c, 1.91, 1.92 etats_affiche.c, 1.105, 1.106 etats_calculs.c, 1.131, 1.132 etats_config.c, 1.169, 1.170 etats_gtktable.c, 1.97, 1.98 etats_onglet.c, 1.133, 1.134 export.c, 1.25, 1.26 fenetre_principale.c, 1.110, 1.111 file_obfuscate.c, 1.10, 1.11 go-optionmenu.c, 1.10, 1.11 gsb_account.c, 1.43, 1.44 gsb_account_property.c, 1.34, 1.35 gsb_archive_config.c, 1.21, 1.22 gsb_assistant.c, 1.45, 1.46 gsb_assistant_archive_export.c, 1.16, 1.17 gsb_assistant_file.c, 1.17, 1.18 gsb_assistant_first.c, 1.23, 1.24 gsb_autofunc.c, 1.20, 1.21 gsb_bank.c, 1.20, 1.21 gsb_calendar_entry.c, 1.24, 1.25 gsb_crypt.c, 1.15, 1.16 gsb_currency.c, 1.39, 1.40 gsb_currency_config.c, 1.49, 1.50 gsb_data_account.c, 1.69, 1.70 gsb_data_archive_store.c, 1.13, 1.14 gsb_data_budget.c, 1.48, 1.49 gsb_data_category.c, 1.67, 1.68 gsb_data_currency_link.c, 1 .14, 1.15 gsb_data_payee.c, 1.46, 1.47 gsb_data_payee.h, 1.22, 1.23 gsb_data_reconcile.c, 1.16, 1.17 gsb_data_report_amout_comparison.c, 1.13, 1.14 gsb_data_scheduled.c, 1.25, 1.26 gsb_data_transaction.c, 1.59, 1.60 gsb_debug.c, 1.10, 1.11 gsb_file.c, 1.44, 1.45 gsb_file_config.c, 1.74, 1.75 gsb_file_load.c, 1.166, 1.167 gsb_file_load.h, 1.6, 1.7 gsb_file_save.c, 1.123, 1.124 gsb_file_util.c, 1.38, 1.39 gsb_form.c, 1.118, 1.119 gsb_form_config.c, 1.28, 1.29 gsb_payment_method_config.c, 1.33, 1.34 gsb_plugins.c, 1.19, 1.20 gsb_reconcile.c, 1.34, 1.35 gsb_reconcile_config.c, 1.26, 1.27 gsb_scheduler_list.c, 1.61, 1.62 gsb_select_icon.c, 1.12, 1.13 gsb_status.c, 1.18, 1.19 gsb_transactions_list.c, 1.158, 1.159 gtk_combofix.c, 1.60, 1.61 help.c, 1.85, 1.86 import.c, 1.274, 1.275 imputation_budgetaire.c, 1.155, 1.156 main.c, 1.140, 1.141 menu.c, 1.145, 1.146 meta_budgetary.c, 1.35, 1.36 meta_categories.c, 1.46, 1.47 meta_payee.c, 1.32, 1.33 metatree.c, 1.133, 1.134 metatree.h, 1.43, 1.44 navigation.c, 1.117, 1.118 parametres.c, 1.191, 1.192 print_conf ig.c, 1.44, 1.45 print_dialog_config.c, 1.7, 1.8 print_report.c, 1.9, 1.10 tiers_onglet.c, 1.158, 1.159 traitement_variables.c, 1.171, 1.172 transaction_list.c, 1.32, 1.33 utils.c, 1.51, 1.52 utils_buttons.c, 1.50, 1.51 utils_editables.c, 1.30, 1.31 utils_files.c, 1.39, 1.40 utils_operations.c, 1.31, 1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8235
Modified Files:
gsb_real.c
Log Message:
fixes the bug 553
Index: gsb_real.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_real.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- gsb_real.c 23 Nov 2008 13:16:41 -0000 1.29
+++ gsb_real.c 29 Apr 2009 20:45:05 -0000 1.30
@@ -2,9 +2,9 @@
/* */
/* gsb_real */
/* */
-/* Copyright (C) 2000-2007 Cédric Auger (cedric at grisbi.org) */
-/* 2003-2008 Benjamin Drieu (bdrieu at april.org) */
-/* http://www.grisbi.org */
+/* Copyright (C) 2000-2007 Cédric Auger (cedric at grisbi.org) */
+/* 2003-2008 Benjamin Drieu (bdrieu at april.org) */
+/* 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 */
@@ -158,43 +158,45 @@
/* Construct the result in the reverse order from right to left, then reverse it. */
do
{
- if ( i == number.exponent)
- {
- *string = 0;
- string = exponent;
- result_div.quot = num;
- }
- else
- {
- if (i > number.exponent)
- j++;
+ if ( i == number.exponent)
+ {
+ *string = 0;
+ string = exponent;
+ result_div.quot = num;
+ }
+ else
+ {
+ if (i > number.exponent)
+ j++;
- if ( j == 4 )
- {
- j=0;
- if ( * (conv -> mon_thousands_sep ) )
- {
- *string++ = * ( conv -> mon_thousands_sep );
- }
- else
- {
- i--;
- }
- result_div.quot = num;
- }
- else
- {
- result_div = div ( num, 10 );
- *string++ = result_div.rem + '0';
- }
- }
- i++;
- /* we check also i < (number.exponent+2)
- * the +2 is for 0. at the left of the separator,
- * with that check, 0 will be 0.00 if exponent = 2,
- * and 0.51 will be 0.51 and no 51 without that check */
+ if ( j == 4 )
+ {
+ j=0;
+ if ( * (conv -> mon_thousands_sep ) )
+ {
+ *string++ = * ( conv -> mon_thousands_sep );
+ }
+ else
+ {
+ i--;
+ }
+ result_div.quot = num;
+ }
+ else
+ {
+ result_div = div ( num, 10 );
+ *string++ = result_div.rem + '0';
+ }
+ }
+ i++;
+ /* we check also i < (number.exponent+2)
+ * the +2 is for 0. at the left of the separator,
+ * with that check, 0 will be 0.00 if exponent = 2,
+ * and 0.51 will be 0.51 and no 51 without that check */
}
while ( ( num = result_div.quot )
+ ||
+ i < number.exponent
||
(currency_number
&&
@@ -204,15 +206,15 @@
/* Add the sign at the end of the string just before to reverse it to avoid
to have to insert it at the begin just after... */
string = g_strdup_printf ( "%s%s%s%s%s%s%s%s",
- ( currency_symbol && conv -> p_cs_precedes ? currency_symbol : "" ),
- ( currency_symbol && conv -> p_sep_by_space ? " " : "" ),
- number.mantissa < 0 ? conv -> negative_sign : conv -> positive_sign,
- strlen (exponent) ? g_strreverse ( exponent ) : "0",
- ( * conv -> mon_decimal_point ? conv -> mon_decimal_point : "." ),
- g_strreverse ( mantissa ),
- ( currency_symbol && ! conv -> p_cs_precedes && conv -> p_sep_by_space ?
- " " : "" ),
- ( currency_symbol && ! conv -> p_cs_precedes ? currency_symbol : "" ) );
+ ( currency_symbol && conv -> p_cs_precedes ? currency_symbol : "" ),
+ ( currency_symbol && conv -> p_sep_by_space ? " " : "" ),
+ number.mantissa < 0 ? conv -> negative_sign : conv -> positive_sign,
+ strlen (exponent) ? g_strreverse ( exponent ) : "0",
+ ( * conv -> mon_decimal_point ? conv -> mon_decimal_point : "." ),
+ g_strreverse ( mantissa ),
+ ( currency_symbol && ! conv -> p_cs_precedes && conv -> p_sep_by_space ?
+ " " : "" ),
+ ( currency_symbol && ! conv -> p_cs_precedes ? currency_symbol : "" ) );
g_free ( exponent );
g_free ( mantissa );
- Previous message: [grisbi-cvs] grisbi/src accueil.c, 1.196, 1.197 affichage.c, 1.155, 1.156 affichage_liste.c, 1.105, 1.106 balance_estimate_tab.c, 1.21, 1.22 barre_outils.c, 1.124, 1.125 categories_onglet.c, 1.192, 1.193 dialog.c, 1.70, 1.71 erreur.c, 1.91, 1.92 etats_affiche.c, 1.105, 1.106 etats_calculs.c, 1.131, 1.132 etats_config.c, 1.169, 1.170 etats_gtktable.c, 1.97, 1.98 etats_onglet.c, 1.133, 1.134 export.c, 1.25, 1.26 fenetre_principale.c, 1.110, 1.111 file_obfuscate.c, 1.10, 1.11 go-optionmenu.c, 1.10, 1.11 gsb_account.c, 1.43, 1.44 gsb_account_property.c, 1.34, 1.35 gsb_archive_config.c, 1.21, 1.22 gsb_assistant.c, 1.45, 1.46 gsb_assistant_archive_export.c, 1.16, 1.17 gsb_assistant_file.c, 1.17, 1.18 gsb_assistant_first.c, 1.23, 1.24 gsb_autofunc.c, 1.20, 1.21 gsb_bank.c, 1.20, 1.21 gsb_calendar_entry.c, 1.24, 1.25 gsb_crypt.c, 1.15, 1.16 gsb_currency.c, 1.39, 1.40 gsb_currency_config.c, 1.49, 1.50 gsb_data_account.c, 1.69, 1.70 gsb_data_archive_store.c, 1.13, 1.14 gsb_data_budget.c, 1.48, 1.49 gsb_data_category.c, 1.67, 1.68 gsb_data_currency_link.c, 1 .14, 1.15 gsb_data_payee.c, 1.46, 1.47 gsb_data_payee.h, 1.22, 1.23 gsb_data_reconcile.c, 1.16, 1.17 gsb_data_report_amout_comparison.c, 1.13, 1.14 gsb_data_scheduled.c, 1.25, 1.26 gsb_data_transaction.c, 1.59, 1.60 gsb_debug.c, 1.10, 1.11 gsb_file.c, 1.44, 1.45 gsb_file_config.c, 1.74, 1.75 gsb_file_load.c, 1.166, 1.167 gsb_file_load.h, 1.6, 1.7 gsb_file_save.c, 1.123, 1.124 gsb_file_util.c, 1.38, 1.39 gsb_form.c, 1.118, 1.119 gsb_form_config.c, 1.28, 1.29 gsb_payment_method_config.c, 1.33, 1.34 gsb_plugins.c, 1.19, 1.20 gsb_reconcile.c, 1.34, 1.35 gsb_reconcile_config.c, 1.26, 1.27 gsb_scheduler_list.c, 1.61, 1.62 gsb_select_icon.c, 1.12, 1.13 gsb_status.c, 1.18, 1.19 gsb_transactions_list.c, 1.158, 1.159 gtk_combofix.c, 1.60, 1.61 help.c, 1.85, 1.86 import.c, 1.274, 1.275 imputation_budgetaire.c, 1.155, 1.156 main.c, 1.140, 1.141 menu.c, 1.145, 1.146 meta_budgetary.c, 1.35, 1.36 meta_categories.c, 1.46, 1.47 meta_payee.c, 1.32, 1.33 metatree.c, 1.133, 1.134 metatree.h, 1.43, 1.44 navigation.c, 1.117, 1.118 parametres.c, 1.191, 1.192 print_conf ig.c, 1.44, 1.45 print_dialog_config.c, 1.7, 1.8 print_report.c, 1.9, 1.10 tiers_onglet.c, 1.158, 1.159 traitement_variables.c, 1.171, 1.172 transaction_list.c, 1.32, 1.33 utils.c, 1.51, 1.52 utils_buttons.c, 1.50, 1.51 utils_editables.c, 1.30, 1.31 utils_files.c, 1.39, 1.40 utils_operations.c, 1.31, 1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list