Mercurial > hg > octave-thorsten
comparison src/oct-strstrm.cc @ 4643:ef3a14fb6847
[project @ 2003-11-22 12:25:44 by jwe]
author | jwe |
---|---|
date | Sat, 22 Nov 2003 12:25:45 +0000 |
parents | 13905c3a24af |
children | 19b8225bdaa2 |
comparison
equal
deleted
inserted
replaced
4642:7a83d52d2aed | 4643:ef3a14fb6847 |
---|---|
49 return retval; | 49 return retval; |
50 } | 50 } |
51 | 51 |
52 // Return current stream position. | 52 // Return current stream position. |
53 | 53 |
54 long | 54 std::streamoff |
55 octave_base_strstream::tell (void) const | 55 octave_base_strstream::tell (void) const |
56 { | 56 { |
57 long retval = -1; | 57 std::streamoff retval = -1; |
58 | 58 |
59 if (! bad ()) | 59 if (! bad ()) |
60 { | 60 { |
61 // XXX FIXME XXX -- shouldn't have to do this! | 61 // XXX FIXME XXX -- shouldn't have to do this! |
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->pubseekoff (0, std::ios::cur)); | 67 retval = std::streamoff (sb->pubseekoff (0, std::ios::cur)); |
68 | 68 |
69 if (bad ()) | 69 if (bad ()) |
70 retval = -1; | 70 retval = -1; |
71 } | 71 } |
72 } | 72 } |