diff options
author | Jeff Law <law@gcc.gnu.org> | 2000-05-23 22:57:22 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2000-05-23 22:57:22 -0600 |
commit | db9aed0ed672a0886f5c5aa7b0dde2209be9f827 (patch) | |
tree | 0c627ad4feac7d2c50762bfd4f18677a3ecfc65c | |
parent | 53e2d84900c96eee202ca7515641d3fb86ff29d7 (diff) | |
download | gcc-db9aed0ed672a0886f5c5aa7b0dde2209be9f827.zip gcc-db9aed0ed672a0886f5c5aa7b0dde2209be9f827.tar.gz gcc-db9aed0ed672a0886f5c5aa7b0dde2209be9f827.tar.bz2 |
iostream.cc (endl): Verify stream can accept characters before writing its eol.
* iostream.cc (endl): Verify stream can accept characters
before writing its eol.
From-SVN: r34122
-rw-r--r-- | libio/ChangeLog | 5 | ||||
-rw-r--r-- | libio/iostream.cc | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libio/ChangeLog b/libio/ChangeLog index fdbdf06..8735e8f 100644 --- a/libio/ChangeLog +++ b/libio/ChangeLog @@ -1,3 +1,8 @@ +Tue May 23 22:56:56 2000 Jerry Quinn + + * iostream.cc (endl): Verify stream can accept characters + before writing its eol. + 2000-05-15 David Edelsohn <edelsohn@gnu.org> * config.shared: Change "pic" to depend on $(PICFLAG), not diff --git a/libio/iostream.cc b/libio/iostream.cc index 4b75fca..cabda6b 100644 --- a/libio/iostream.cc +++ b/libio/iostream.cc @@ -963,7 +963,9 @@ ostream& ends(ostream& outs) ostream& endl(ostream& outs) { - return flush(outs.put('\n')); + if (opfx) + flush(outs.put('\n')); + return outs; } istream& lock(istream& ins) |