aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/write.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2005-07-14 06:21:59 +0000
committerPaul Thomas <pault@gcc.gnu.org>2005-07-14 06:21:59 +0000
commitbe0cc7e21cee56062492d6e11014b827ab39c342 (patch)
tree3a6abdf272c0e410094c15917247aec5ab5c7909 /libgfortran/io/write.c
parent93e261acea9db4975e505d7cbdf42572d3c8557d (diff)
downloadgcc-be0cc7e21cee56062492d6e11014b827ab39c342.zip
gcc-be0cc7e21cee56062492d6e11014b827ab39c342.tar.gz
gcc-be0cc7e21cee56062492d6e11014b827ab39c342.tar.bz2
[multiple changes]
2005-07-12 Paul Thomas <pault@gcc.gnu.org> PR libfortran/16435 * transfer.c (formatted_transfer): Correct the problems with X- and T-editting that caused TLs followed by TRs to overwrite data, which caused NIST FM908.FOR to fail on many tests. (data_transfer_init): Zero X- and T-editting counters at the start of formatted IO. * write.c (write_x): Write specified number of skips with specified number of spaces at the end. 2005-07-12 Paul Thomas <pault@gcc.gnu.org> PR libfortran/16435 * gfortran.dg/tl_editting.f90: New. * gfortran.dg/g77/f77-edit-x-out.f: Remove XFAIL. From-SVN: r102008
Diffstat (limited to 'libgfortran/io/write.c')
-rw-r--r--libgfortran/io/write.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c
index a24d293..c7abf2b 100644
--- a/libgfortran/io/write.c
+++ b/libgfortran/io/write.c
@@ -1110,15 +1110,16 @@ write_es (fnode *f, const char *p, int len)
/* Take care of the X/TR descriptor. */
void
-write_x (fnode * f)
+write_x (int len, int nspaces)
{
char *p;
- p = write_block (f->u.n);
+ p = write_block (len);
if (p == NULL)
return;
- memset (p, ' ', f->u.n);
+ if (nspaces > 0)
+ memset (&p[len - nspaces], ' ', nspaces);
}