Mercurial > hg > octave-nkf
diff src/oct-stream.h @ 5659:960f4b9a26af
[project @ 2006-03-10 15:35:20 by jwe]
author | jwe |
---|---|
date | Fri, 10 Mar 2006 15:35:21 +0000 |
parents | d24b97246b9b |
children | 7ba9ad1fec11 |
line wrap: on
line diff
--- a/src/oct-stream.h +++ b/src/oct-stream.h @@ -591,8 +591,20 @@ // The actual representation of this stream. octave_base_stream *rep; - bool stream_ok (const std::string& who, bool clear = true, - bool warn = true) const; + bool stream_ok (bool clear = true) const + { + bool retval = true; + + if (rep) + { + if (clear) + rep->clear (); + } + else + retval = false; + + return retval; + } void invalid_operation (const std::string& who, const char *rw) {