[grisbi-cvs] grisbi/src gsb_real.c, 1.56, 1.57 import_csv.c, 1.57, 1.58

Gunee guneemwelloeux at users.sourceforge.net
Mon Nov 23 18:04:10 CET 2009


Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13765

Modified Files:
	gsb_real.c import_csv.c 
Log Message:
Fixed the gsb_real_div function
Lingo fix (in english) --> run po update

Index: gsb_real.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_real.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- gsb_real.c	13 Nov 2009 20:57:49 -0000	1.56
+++ gsb_real.c	23 Nov 2009 17:04:08 -0000	1.57
@@ -807,13 +807,15 @@
     gdouble tmp_double, decimal;
     gdouble maxlong;
 
-    gsb_real real_number = null_real;
+	gsb_real real_number = {0, exp_add};
     maxlong = G_MAXLONG / 10;
 
 	if(exp_add >=9)
 		return null_real;
 
-    while (modf (number, &tmp_double) && real_number.exponent < (9-exp_add) )
+	while ( (modf (number, &tmp_double) ||
+		real_number.exponent < 0 ) &&
+		real_number.exponent < (9-exp_add))
     {
 	number = number * 10;
 	real_number.exponent++;
@@ -826,7 +828,7 @@
 		real_number.mantissa = ((glong) number ) + 1;
 	
     real_number.mantissa = (glong) (number);
-	real_number.exponent += exp_add;
+	real_number.exponent;
     return real_number;
 }
 

Index: import_csv.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import_csv.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- import_csv.c	23 Nov 2009 15:15:48 -0000	1.57
+++ import_csv.c	23 Nov 2009 17:04:08 -0000	1.58
@@ -83,8 +83,8 @@
     { N_("Voucher number"), 0.0, csv_import_validate_number, csv_import_parse_voucher, "" },
     { N_("Category"),	    0.0, csv_import_validate_string, csv_import_parse_category, "" },
     { N_("Sub-Category"),   0.0, csv_import_validate_string, csv_import_parse_sub_category, "" },
-	{ N_("Imputation"),	    0.0, csv_import_validate_string, csv_import_parse_budget, "" },
-	{ N_("Sub-Imputation"),	    0.0, csv_import_validate_string, csv_import_parse_sub_budget, "" },
+	{ N_("Budget"),	    0.0, csv_import_validate_string, csv_import_parse_budget, "" },
+	{ N_("Sub-budget"),	    0.0, csv_import_validate_string, csv_import_parse_sub_budget, "" },
     { N_("Balance"),	    0.0, csv_import_validate_amount, csv_import_parse_balance, "" },
     { N_("Credit (amount)"),0.0, csv_import_validate_amount, csv_import_parse_credit, "" },
     { N_("Debit (absolute)"),0.0, csv_import_validate_amount, csv_import_parse_debit,



More information about the cvs mailing list