write.c (write_float): Fix field width checks for printing 'Infinity' or 'Inf'.

2005-07-14  Jerry DeLisle  <jvdelisle@verizon.net>

    * io/write.c (write_float): Fix field width checks for
    printing 'Infinity' or 'Inf'.
    (output_float): Fix typo in comment.

From-SVN: r102115
This commit is contained in:
Jerry DeLisle 2005-07-17 20:28:14 +00:00 committed by Jerry DeLisle
parent 3b1355f3bc
commit 2c01a7204f
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2005-07-14 Jerry DeLisle <jvdelisle@verizon.net>
* io/write.c (write_float): Fix field width checks for
printing 'Infinity' or 'Inf'.
(output_float): Fix typo in comment.
2005-07-12 Paul Thomas <pault@gcc.gnu.org>
PR libfortran/16435

View file

@ -649,7 +649,7 @@ output_float (fnode *f, GFC_REAL_LARGEST value)
else
leadzero = 0;
/* Padd to full field width. */
/* Pad to full field width. */
if ( ( nblanks > 0 ) && !no_leading_blank )
@ -788,11 +788,11 @@ write_float (fnode *f, const char *source, int len)
else
fin = '+';
if (nb > 7)
if (nb > 8)
memcpy(p + nb - 8, "Infinity", 8);
else
memcpy(p + nb - 3, "Inf", 3);
if (nb < 8 && nb > 3)
if (nb < 9 && nb > 3)
p[nb - 4] = fin;
else if (nb > 8)
p[nb - 9] = fin;