changeset 6296:85eb75190e01

[project @ 2007-02-10 07:10:42 by jwe]
author jwe
date Sat, 10 Feb 2007 07:10:42 +0000
parents 0fcce0872e02
children a943cb9c8068
files src/ChangeLog src/oct-stream.cc src/oct-stream.h
diffstat 3 files changed, 10 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat Feb 10 02:10:21 2007 +0000
+++ b/src/ChangeLog	Sat Feb 10 07:10:42 2007 +0000
@@ -1,3 +1,10 @@
+2007-02-10  John W. Eaton  <jwe@octave.org>
+
+	* 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  <jwe@octave.org>
 
 	* ls-mat5.cc (PAD): Adjust to change in write_mat5_tag.
--- a/src/oct-stream.cc	Sat Feb 10 02:10:21 2007 +0000
+++ b/src/oct-stream.cc	Sat Feb 10 07:10:42 2007 +0000
@@ -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
--- a/src/oct-stream.h	Sat Feb 10 02:10:21 2007 +0000
+++ b/src/oct-stream.h	Sat Feb 10 07:10:42 2007 +0000
@@ -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!