r15300 - gnucash/trunk/lib/libqof/qof - Make math128 test program compilable again

Christian Stimming cstim at cvs.gnucash.org
Tue Jan 2 12:18:26 EST 2007


Author: cstim
Date: 2007-01-02 12:18:19 -0500 (Tue, 02 Jan 2007)
New Revision: 15300
Trac: http://svn.gnucash.org/trac/changeset/15300

Modified:
   gnucash/trunk/lib/libqof/qof/qofmath128.c
Log:
Make math128 test program compilable again

Modified: gnucash/trunk/lib/libqof/qof/qofmath128.c
===================================================================
--- gnucash/trunk/lib/libqof/qof/qofmath128.c	2007-01-02 06:30:48 UTC (rev 15299)
+++ gnucash/trunk/lib/libqof/qof/qofmath128.c	2007-01-02 17:18:19 UTC (rev 15300)
@@ -347,9 +347,15 @@
 
 int main ()
 {
+  gint64 x;
+  qofint128 n;
+  gint64 d;
+  qofint128 quot;
+  int i;
+
   pr (2,2);
 
-  gint64 x = 1<<30;
+  x = 1<<30;
   x <<= 2;
 
   pr (x,x);
@@ -366,7 +372,7 @@
   pr (x,x);
   pr (x,-x);
 
-  pr (1000000, 10000000000000);
+  pr (1000000, G_GINT64_CONSTANT(10000000000000));
 
   prd (x,x,2);
   prd (x,x,3);
@@ -384,16 +390,14 @@
   prd (1111,x,11);
 
   /* Really test division */
-  qofint128 n;
   n.hi = 0xdd91;
   n.lo = 0x6c5abefbb9e13480ULL;
 
-  gint64 d = 0x2ae79964d3ae1d04ULL;
+  d = 0x2ae79964d3ae1d04ULL;
   
-  int i;
   for (i=0; i<20; i++) {
 
-  qofint128 quot = div128 (n, d);
+  quot = div128 (n, d);
   printf ("%d result = %llx %llx\n", i, quot.hi, quot.lo);
     d >>=1;
     n = shift128 (n);



More information about the gnucash-changes mailing list