[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gnucash: [PATCH] Fixed the "missing cents" bug



Chris Baker wrote:

> Adam C Powell IV <hazelsct@mit.edu> writes:
>
> [...]
>
> > Is someone else going to test it without -fsigned_char, and debug if it fails?  If
> > nobody replies, I'll get around to it "eventually" (it takes several hours to
> > build on my 160 MHz 603e at home with 1.3 MB/sec disk bandwidth, otherwise I'd do
> > it sooner), but this fix works for now until there's something better.
>
> It builds okay without -fsigned-char.  Now, instead of not printing
> any fractional decimal places, it prints too many:
>
> 14.110000000
>
> Still, better than nothing....

True.  It's probably setting the precision to 127 or 255 now!  (It's automatically
truncated to between 0 and 9 by util_fptostr.)  I'll look into it, probably by the end
of the week, this sounds easy to fix.  If you want to look into it, check out
src/engine/util.c around line 400, which is where the char attributes in the lconv
structure are set (it's called by the subroutine below).  The default values are
255/-1, which should be equal to CHAR_MAX if it's built without -fsigned_char.

If you could keep testing this version, and let me know if any other problems come up,
I'll send you a patch to fix the precision problem.

I hope you don't mind that I'm CCing this back to the bug and both lists, I think it's
helpful information that someone else can build on.

Zeen,

-Adam P.

                 Welcome to the best software in the world today cafe!


-- 
To UNSUBSCRIBE, email to debian-arm-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: