implement asnprintf, take 2

Eric Blake ebb9@byu.net
Tue May 1 13:11:00 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Jeff Johnston on 4/30/2007 3:28 PM:
> Hi Eric,
> 
>   I'm not seeing an explanation for the following code change you have
> made in vfprintf.c:
> 
> @@ -1247,13 +1201,13 @@ number:                 if ((dprec = prec) >= 0)
>                                 if (_fpvalue == 0) {
>                                         /* kludge for __dtoa
> irregularity */
>                                         PRINT ("0", 1);
> -                                       if (expt < ndig || (flags & ALT)
> != 0) {
> +                                       if (ndig || flags & ALT) {

Hmm, I think that leaked in from some of my experimentations that I was
trying, but shouldn't be part of the patch.  I was thinking that if dtoa
set expt to 0 when _fpvalue is 0, then this simplified the expression; but
looking closer at dtoa, it sets expt to 1 when _fpvalue is 0, so this hunk
of the patch is bogus, and should not be committed.  Thanks for catching that.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGNzOk84KuGfSFAYARAmeLAKCbAJvQ4j1BTf5TuJvZ9wFYsEjZ6gCeIvSF
1YX1JNbE3EZEpZjHfzqWz28=
=2X7h
-----END PGP SIGNATURE-----



More information about the Newlib mailing list