mirror of git://gcc.gnu.org/git/gcc.git
PR libfortran/52608 Move the removal of initial zeros.
2012-03-17 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/52608 * io/write_float.def (output_float): Move removal of initial zeros until after the scale factor has been applied. From-SVN: r185486
This commit is contained in:
parent
4dc86aa8aa
commit
789ebabf1d
|
@ -1,3 +1,9 @@
|
||||||
|
2012-03-17 Janne Blomqvist <jb@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR libfortran/52608
|
||||||
|
* io/write_float.def (output_float): Move removal of initial zeros
|
||||||
|
until after the scale factor has been applied.
|
||||||
|
|
||||||
2012-03-16 Janne Blomqvist <jb@gcc.gnu.org>
|
2012-03-16 Janne Blomqvist <jb@gcc.gnu.org>
|
||||||
|
|
||||||
* io/unix.h (struct stream): Rename to stream_vtable.
|
* io/unix.h (struct stream): Rename to stream_vtable.
|
||||||
|
|
|
@ -180,12 +180,6 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size,
|
||||||
/* Make sure the decimal point is a '.'; depending on the
|
/* Make sure the decimal point is a '.'; depending on the
|
||||||
locale, this might not be the case otherwise. */
|
locale, this might not be the case otherwise. */
|
||||||
digits[nbefore] = '.';
|
digits[nbefore] = '.';
|
||||||
if (digits[0] == '0' && nbefore == 1)
|
|
||||||
{
|
|
||||||
digits++;
|
|
||||||
nbefore--;
|
|
||||||
ndigits--;
|
|
||||||
}
|
|
||||||
if (p != 0)
|
if (p != 0)
|
||||||
{
|
{
|
||||||
if (p > 0)
|
if (p > 0)
|
||||||
|
@ -229,6 +223,13 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size,
|
||||||
nafter = d;
|
nafter = d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while (digits[0] == '0' && nbefore > 0)
|
||||||
|
{
|
||||||
|
digits++;
|
||||||
|
nbefore--;
|
||||||
|
ndigits--;
|
||||||
|
}
|
||||||
|
|
||||||
expchar = 0;
|
expchar = 0;
|
||||||
/* If we need to do rounding ourselves, get rid of the dot by
|
/* If we need to do rounding ourselves, get rid of the dot by
|
||||||
moving the fractional part. */
|
moving the fractional part. */
|
||||||
|
|
Loading…
Reference in New Issue