summaryrefslogtreecommitdiffstats
path: root/libgfortran/io/write.c
diff options
context:
space:
mode:
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-06 16:33:52 +0000
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-06 16:33:52 +0000
commit2e7fc83303f43989797cc30aa57fb0db6590c1f7 (patch)
tree188a0f8ad81aae6b1573cefb38f836c86d98ae1d /libgfortran/io/write.c
parentaff536db2d8751c36f76a1fd747ec4696eed5e15 (diff)
downloadppe42-gcc-2e7fc83303f43989797cc30aa57fb0db6590c1f7.tar.gz
ppe42-gcc-2e7fc83303f43989797cc30aa57fb0db6590c1f7.zip
2004-09-06 Steven G. Kargl <kargls@comcast.net>
* io/write.c (output_float): Typo in comment. Remove debugging printf. Fix format for FP of form 1e10. 2004-09-06 Paul Brook <paul@codesourcery.com> * gfortran.dg/edit_real_1.f90: Add new test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87119 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io/write.c')
-rw-r--r--libgfortran/io/write.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c
index f4d888e50d2..2392b3ca1b2 100644
--- a/libgfortran/io/write.c
+++ b/libgfortran/io/write.c
@@ -292,7 +292,7 @@ output_float (fnode *f, double value, int len)
/* Use sprintf to print the number in the format +D.DDDDe+ddd
For an N digit exponent, this gives us (32-6)-N digits after the
- decimal point, plus annother one before the decimal point. */
+ decimal point, plus another one before the decimal point. */
sign = calculate_sign (value < 0.0);
if (value < 0)
value = -value;
@@ -325,14 +325,11 @@ output_float (fnode *f, double value, int len)
ndigits = 27 - edigits;
}
- sprintf (buffer, "%+-31.*e", ndigits - 1, value);
+ sprintf (buffer, "%+-#31.*e", ndigits - 1, value);
/* Check the resulting string has punctuation in the correct places. */
if (buffer[2] != '.' || buffer[ndigits + 2] != 'e')
- {
- printf ("'%s', %d\n", buffer, ndigits);
internal_error ("printf is broken");
- }
/* Read the exponent back in. */
e = atoi (&buffer[ndigits + 3]) + 1;
OpenPOWER on IntegriCloud