write.c (write_float): Fix field width checks for printing 'Infinity' or 'Inf'.
authorJerry DeLisle <jvdelisle@verizon.net>
Sun, 17 Jul 2005 20:28:14 +0000 (20:28 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 17 Jul 2005 20:28:14 +0000 (20:28 +0000)
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

libgfortran/ChangeLog
libgfortran/io/write.c

index 48788f197cb97ebe19dedc1d5c598cf842fc7473..f4f0616c3ddc1e29c5c3fc9ef8c8073e924dbf5d 100644 (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
index c7abf2bbd7d8abace4c59b6fa45928eb26fa477d..54bf480fdf3de3e2ef4446cb74f7da554871861f 100644 (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;