comparison src/oct-strstrm.cc @ 3544:71bd2d124119

[project @ 2000-02-02 21:02:31 by jwe]
author jwe
date Wed, 02 Feb 2000 21:02:41 +0000
parents b80bbb43a1a9
children 6dfdded73a7e
comparison
equal deleted inserted replaced
3543:c5b996022ef7 3544:71bd2d124119
27 #include "oct-strstrm.h" 27 #include "oct-strstrm.h"
28 28
29 // Position a stream at OFFSET relative to ORIGIN. 29 // Position a stream at OFFSET relative to ORIGIN.
30 30
31 int 31 int
32 octave_base_strstream::seek (streamoff offset, ios::seek_dir origin) 32 octave_base_strstream::seek (streamoff offset, std::ios::seek_dir origin)
33 { 33 {
34 int retval = -1; 34 int retval = -1;
35 35
36 if (! bad ()) 36 if (! bad ())
37 { 37 {
62 62
63 std::streambuf *sb = (const_cast<octave_base_strstream *>(this))->rdbuf (); 63 std::streambuf *sb = (const_cast<octave_base_strstream *>(this))->rdbuf ();
64 64
65 if (sb) 65 if (sb)
66 { 66 {
67 retval = static_cast<long> (sb->seekoff (0, ios::cur)); 67 retval = static_cast<long> (sb->seekoff (0, std::ios::cur));
68 68
69 if (bad ()) 69 if (bad ())
70 retval = -1; 70 retval = -1;
71 } 71 }
72 } 72 }
73 73
74 return retval; 74 return retval;
75 } 75 }
76 76
77 octave_stream 77 octave_stream
78 octave_istrstream::create (const char *data, ios::openmode arg_md, 78 octave_istrstream::create (const char *data, std::ios::openmode arg_md,
79 oct_mach_info::float_format flt_fmt) 79 oct_mach_info::float_format flt_fmt)
80 { 80 {
81 return octave_stream (new octave_istrstream (data, arg_md, flt_fmt)); 81 return octave_stream (new octave_istrstream (data, arg_md, flt_fmt));
82 } 82 }
83 83
84 octave_stream 84 octave_stream
85 octave_istrstream::create (const std::string& data, ios::openmode arg_md, 85 octave_istrstream::create (const std::string& data, std::ios::openmode arg_md,
86 oct_mach_info::float_format flt_fmt) 86 oct_mach_info::float_format flt_fmt)
87 { 87 {
88 return octave_stream (new octave_istrstream (data, arg_md, flt_fmt)); 88 return octave_stream (new octave_istrstream (data, arg_md, flt_fmt));
89 } 89 }
90 90
91 octave_stream 91 octave_stream
92 octave_ostrstream::create (ios::openmode arg_md, 92 octave_ostrstream::create (std::ios::openmode arg_md,
93 oct_mach_info::float_format flt_fmt) 93 oct_mach_info::float_format flt_fmt)
94 { 94 {
95 return octave_stream (new octave_ostrstream (arg_md, flt_fmt)); 95 return octave_stream (new octave_ostrstream (arg_md, flt_fmt));
96 } 96 }
97 97