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

[project @ 2004-02-23 22:10:31 by jwe]
author jwe
date Mon, 23 Feb 2004 22:10:32 +0000
parents 3387590ed11d
children c69a6a16932b
line wrap: on
line diff
--- a/src/oct-stream.cc
+++ b/src/oct-stream.cc
@@ -2692,7 +2692,7 @@
 }
 
 int
-octave_stream::seek (std::streamoff offset, std::ios::seekdir origin)
+octave_stream::seek (long offset, int origin)
 {
   int retval = -1;
 
@@ -2708,24 +2708,24 @@
 {
   int retval = -1;
 
-  std::streamoff xoffset = tc_offset.streamoff_value ();
+  long xoffset = tc_offset.long_value (true);
 
   if (! error_state)
     {
       int conv_err = 0;
 
-      std::ios::seekdir origin = std::ios::beg;
+      int origin = SEEK_SET;
 
       if (tc_origin.is_string ())
 	{
 	  std::string xorigin = tc_origin.string_value ();
 
 	  if (xorigin == "bof")
-	    origin = std::ios::beg;
+	    origin = SEEK_SET;
 	  else if (xorigin == "cof")
-	    origin = std::ios::cur;
+	    origin = SEEK_CUR;
 	  else if (xorigin == "eof")
-	    origin = std::ios::end;
+	    origin = SEEK_END;
 	  else
 	    conv_err = -1;
 	}
@@ -2736,11 +2736,11 @@
 	  if (! conv_err)
 	    {
 	      if (xorigin == -1)
-		origin = std::ios::beg;
+		origin = SEEK_SET;
 	      else if (xorigin == 0)
-		origin = std::ios::cur;
+		origin = SEEK_CUR;
 	      else if (xorigin == 1)
-		origin = std::ios::end;
+		origin = SEEK_END;
 	      else
 		conv_err = -1;
 	    }
@@ -2757,10 +2757,10 @@
   return retval;
 }
 
-std::streamoff
-octave_stream::tell (void) const
+long
+octave_stream::tell (void)
 {
-  std::streamoff retval = -1;
+  long retval = -1;
 
   if (stream_ok ("tell"))
     retval = rep->tell ();