diff options
author | Janne Blomqvist <jblomqvi@cc.hut.fi> | 2004-05-16 16:27:48 +0300 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-05-16 13:27:48 +0000 |
commit | 000aa32a49ae77b3703599eb9a66b9f7d0ab7032 (patch) | |
tree | 98bc62ebf30b17a551677a60581e8a1ed4703037 /libgfortran/io/transfer.c | |
parent | 1ab106cdc46e598261d9ffa0673936d35af923db (diff) | |
download | gcc-000aa32a49ae77b3703599eb9a66b9f7d0ab7032.zip gcc-000aa32a49ae77b3703599eb9a66b9f7d0ab7032.tar.gz gcc-000aa32a49ae77b3703599eb9a66b9f7d0ab7032.tar.bz2 |
io.h (flush): Add prototype.
* io/io.h (flush): Add prototype.
* io/transfer.c (finalize_transfer): Flush partial records.
* io/unix.c (flush): New function.
From-SVN: r81913
Diffstat (limited to 'libgfortran/io/transfer.c')
-rw-r--r-- | libgfortran/io/transfer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 2440aea..da2e615 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -1338,7 +1338,13 @@ finalize_transfer (void) free_fnodes (); if (advance_status == ADVANCE_NO) - return; + { + /* Most systems buffer lines, so force the partial record + to be written out. */ + flush (current_unit->s); + return; + } + next_record (1); current_unit->current_record = 0; } |