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
2 changed files with 13 additions and 6 deletions
|
@ -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>
|
||||
|
||||
* 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
|
||||
locale, this might not be the case otherwise. */
|
||||
digits[nbefore] = '.';
|
||||
if (digits[0] == '0' && nbefore == 1)
|
||||
{
|
||||
digits++;
|
||||
nbefore--;
|
||||
ndigits--;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
while (digits[0] == '0' && nbefore > 0)
|
||||
{
|
||||
digits++;
|
||||
nbefore--;
|
||||
ndigits--;
|
||||
}
|
||||
|
||||
expchar = 0;
|
||||
/* If we need to do rounding ourselves, get rid of the dot by
|
||||
moving the fractional part. */
|
||||
|
|
Loading…
Add table
Reference in a new issue