AUDIT: r17576 - gnucash/trunk/src/app-utils - Revision to simplify r17555 (no functional change).

Charles Day cedayiv at cvs.gnucash.org
Fri Sep 19 16:51:54 EDT 2008


Author: cedayiv
Date: 2008-09-19 16:51:53 -0400 (Fri, 19 Sep 2008)
New Revision: 17576
Trac: http://svn.gnucash.org/trac/changeset/17576

Modified:
   gnucash/trunk/src/app-utils/gnc-ui-util.c
Log:
Revision to simplify r17555 (no functional change).
BP


Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c	2008-09-19 20:45:23 UTC (rev 17575)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c	2008-09-19 20:51:53 UTC (rev 17576)
@@ -1253,9 +1253,7 @@
 
 /* Utility function for printing non-negative amounts */
 static int
-PrintAmountInternal(char *buf, gnc_numeric val,
-                    const GNCPrintAmountInfo *info,
-                    gboolean print_absolute)
+PrintAmountInternal(char *buf, gnc_numeric val, const GNCPrintAmountInfo *info)
 {
   struct lconv *lc = gnc_localeconv();
   int num_whole_digits;
@@ -1403,7 +1401,7 @@
 
     if (whole.num == 0)
       *buf = '\0';
-    else if (value_is_negative && !print_absolute)
+    else if (value_is_negative)
       strcat(buf, " - ");
     else
       strcat(buf, " + ");
@@ -1579,7 +1577,9 @@
    }
 
    /* Now print the value */
-   bufp += PrintAmountInternal(bufp, val, &info, print_absolute);
+   bufp += PrintAmountInternal(bufp,
+                               print_absolute? gnc_numeric_abs(val) : val,
+                               &info);
 
    /* Now see if we print parentheses */
    if (print_sign && (sign_posn == 0))



More information about the gnucash-changes mailing list