[grisbi-cvs] grisbi/src gsb_real.c,1.40,1.41

Mickaƫl Remars mykeul at users.sourceforge.net
Wed May 20 22:40:44 CEST 2009


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

Modified Files:
	gsb_real.c 
Log Message:
Rewrote gsb_real_sub() using gsb_real_add() to avoid duplicated code

Index: gsb_real.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_real.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- gsb_real.c	20 May 2009 20:27:31 -0000	1.40
+++ gsb_real.c	20 May 2009 20:40:42 -0000	1.41
@@ -563,13 +563,8 @@
 gsb_real gsb_real_sub ( gsb_real number_1,
                         gsb_real number_2 )
 {
-    gsb_real number = number_1;
-    
-    gsb_real_normalize ( &number,
-			 &number_2 );
-
-    number.mantissa = number.mantissa - number_2.mantissa;
-    return number;
+    number_2.mantissa = -number_2.mantissa;
+    return gsb_real_add ( number_1, number_2 );
 }
 
 



More information about the cvs mailing list