diff src/oct-stream.cc @ 6296:85eb75190e01

[project @ 2007-02-10 07:10:42 by jwe]
author jwe
date Sat, 10 Feb 2007 07:10:42 +0000
parents c68896f193e3
children a943cb9c8068
line wrap: on
line diff
--- 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