Commit 2c01a720 by Jerry DeLisle Committed by Jerry DeLisle

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
parent 3b1355f3
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> 2005-07-12 Paul Thomas <pault@gcc.gnu.org>
PR libfortran/16435 PR libfortran/16435
......
...@@ -649,7 +649,7 @@ output_float (fnode *f, GFC_REAL_LARGEST value) ...@@ -649,7 +649,7 @@ output_float (fnode *f, GFC_REAL_LARGEST value)
else else
leadzero = 0; leadzero = 0;
/* Padd to full field width. */ /* Pad to full field width. */
if ( ( nblanks > 0 ) && !no_leading_blank ) if ( ( nblanks > 0 ) && !no_leading_blank )
...@@ -788,11 +788,11 @@ write_float (fnode *f, const char *source, int len) ...@@ -788,11 +788,11 @@ write_float (fnode *f, const char *source, int len)
else else
fin = '+'; fin = '+';
if (nb > 7) if (nb > 8)
memcpy(p + nb - 8, "Infinity", 8); memcpy(p + nb - 8, "Infinity", 8);
else else
memcpy(p + nb - 3, "Inf", 3); memcpy(p + nb - 3, "Inf", 3);
if (nb < 8 && nb > 3) if (nb < 9 && nb > 3)
p[nb - 4] = fin; p[nb - 4] = fin;
else if (nb > 8) else if (nb > 8)
p[nb - 9] = fin; p[nb - 9] = fin;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment