diff src/oct-fstrm.cc @ 4797:19b8225bdaa2

[project @ 2004-02-23 22:10:31 by jwe]
author jwe
date Mon, 23 Feb 2004 22:10:32 +0000
parents ef3a14fb6847
children 4c8a2e4e0717
line wrap: on
line diff
--- a/src/oct-fstrm.cc	Mon Feb 23 15:35:00 2004 +0000
+++ b/src/oct-fstrm.cc	Mon Feb 23 22:10:32 2004 +0000
@@ -66,41 +66,19 @@
 // Position a stream at OFFSET relative to ORIGIN.
 
 int
-octave_fstream::seek (std::streamoff offset, std::ios::seekdir origin)
+octave_fstream::seek (long, int)
 {
-  int retval = -1;
-
-  if (! fs.bad ())
-    {
-      fs.clear ();
-
-      std::filebuf *fb = fs.rdbuf ();
-
-      if (fb)
-	{
-	  fb->pubseekoff (offset, origin);
-	  retval = fs.bad () ? -1 : 0;
-	}
-    }
-
-  return retval;
+  error ("fseek: invalid_operation");
+  return -1;
 }
 
 // Return current stream position.
 
-std::streamoff
-octave_fstream::tell (void) const
+long
+octave_fstream::tell (void)
 {
-  std::streamoff retval = -1;
-
-  if (fs)
-    {
-      std::filebuf *fb = fs.rdbuf ();
-
-      retval = std::streamoff (fb->pubseekoff (0, std::ios::cur));
-    }
-
-  return retval;
+  error ("ftell: invalid_operation");
+  return -1;
 }
 
 // Return non-zero if EOF has been reached on this stream.