# HG changeset patch # User jwe # Date 1171091442 0 # Node ID 85eb75190e01c317c42f4b81bc8766e2320bd096 # Parent 0fcce0872e02ee2dd8a5173aa01c09b03cd8baf7 [project @ 2007-02-10 07:10:42 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2007-02-10 John W. Eaton + + * oct-stream.cc (octave_stream::rewind): Call seek (0, SEEK_SET) + instead of rep->rewind. + (octave_base_stream::rewind): Delete Function. + * oct-stream.h (octave_base_stream::rewind): Delete decl. + 2007-02-09 John W. Eaton * ls-mat5.cc (PAD): Adjust to change in write_mat5_tag. diff --git a/src/oct-stream.cc b/src/oct-stream.cc --- a/src/oct-stream.cc +++ b/src/oct-stream.cc @@ -932,7 +932,7 @@ octave_base_stream::error (const std::string& who, const std::string& msg) { fail = true; - errmsg = who + msg; + errmsg = who + ": " + msg; } void @@ -2709,12 +2709,6 @@ return retval; } -int -octave_base_stream::rewind (void) -{ - return seek (0, std::ios::beg); -} - // Return current error message for this stream. std::string @@ -2735,7 +2729,7 @@ { // Note that this is not ::error () ! - error (who + ": stream not open for " + rw); + error (who, "stream not open for " + rw); } octave_stream::octave_stream (octave_base_stream *bs) @@ -2975,12 +2969,7 @@ int octave_stream::rewind (void) { - int retval = -1; - - if (stream_ok ()) - retval = rep->rewind (); - - return retval; + return seek (0, SEEK_SET); } bool diff --git a/src/oct-stream.h b/src/oct-stream.h --- a/src/oct-stream.h +++ b/src/oct-stream.h @@ -467,8 +467,6 @@ // We can always do this in terms of seek(), so the derived class // only has to provide that. - int rewind (void); - void invalid_operation (const std::string& who, const char *rw); // No copying!