comparison src/oct-stream.cc @ 4645:bd2067547b40

[project @ 2003-11-23 08:07:52 by jwe]
author jwe
date Sun, 23 Nov 2003 08:07:53 +0000
parents ef3a14fb6847
children f7ce581b27fb
comparison
equal deleted inserted replaced
4644:3b74f1a86750 4645:bd2067547b40
41 #include "error.h" 41 #include "error.h"
42 #include "input.h" 42 #include "input.h"
43 #include "oct-stdstrm.h" 43 #include "oct-stdstrm.h"
44 #include "oct-stream.h" 44 #include "oct-stream.h"
45 #include "oct-obj.h" 45 #include "oct-obj.h"
46 #include "ov-streamoff.h"
46 #include "utils.h" 47 #include "utils.h"
47 48
48 // Possible values for conv_err: 49 // Possible values for conv_err:
49 // 50 //
50 // 1 : not a real scalar 51 // 1 : not a real scalar
2695 octave_stream::seek (const octave_value& tc_offset, 2696 octave_stream::seek (const octave_value& tc_offset,
2696 const octave_value& tc_origin) 2697 const octave_value& tc_origin)
2697 { 2698 {
2698 int retval = -1; 2699 int retval = -1;
2699 2700
2700 int conv_err = 0; 2701 std::streamoff xoffset = tc_offset.streamoff_value ();
2701 2702
2702 int xoffset = convert_to_valid_int (tc_offset, conv_err); 2703 if (! error_state)
2703 2704 {
2704 if (! conv_err) 2705 int conv_err = 0;
2705 { 2706
2706 std::ios::seekdir origin = std::ios::beg; 2707 std::ios::seekdir origin = std::ios::beg;
2707 2708
2708 if (tc_origin.is_string ()) 2709 if (tc_origin.is_string ())
2709 { 2710 {
2710 std::string xorigin = tc_origin.string_value (); 2711 std::string xorigin = tc_origin.string_value ();