Mercurial > hg > octave-lyh
annotate libinterp/corefcn/oct-strstrm.cc @ 17535:c12c688a35ed default tip lyh
Fix warnings
author | LYH <lyh.kernel@gmail.com> |
---|---|
date | Fri, 27 Sep 2013 17:43:27 +0800 |
parents | 68fc671a9339 |
children |
rev | line source |
---|---|
2081 | 1 /* |
2 | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
3 Copyright (C) 1996-2012 John W. Eaton |
2081 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
2081 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
2081 | 20 |
21 */ | |
22 | |
23 #ifdef HAVE_CONFIG_H | |
24 #include <config.h> | |
25 #endif | |
26 | |
27 #include "oct-strstrm.h" | |
28 | |
29 // Position a stream at OFFSET relative to ORIGIN. | |
30 | |
31 int | |
16011
8122286c69a9
initial large file support for 32-bit systems
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
32 octave_base_strstream::seek (off_t, int) |
2081 | 33 { |
4797 | 34 error ("fseek: invalid operation"); |
35 return -1; | |
2081 | 36 } |
37 | |
38 // Return current stream position. | |
39 | |
16011
8122286c69a9
initial large file support for 32-bit systems
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
40 off_t |
4797 | 41 octave_base_strstream::tell (void) |
2081 | 42 { |
4797 | 43 error ("ftell: invalid operation"); |
44 return -1; | |
2081 | 45 } |
46 | |
3340 | 47 octave_stream |
3544 | 48 octave_istrstream::create (const char *data, std::ios::openmode arg_md, |
10315
57a59eae83cc
untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents:
10160
diff
changeset
|
49 oct_mach_info::float_format flt_fmt) |
3340 | 50 { |
51 return octave_stream (new octave_istrstream (data, arg_md, flt_fmt)); | |
52 } | |
53 | |
54 octave_stream | |
3544 | 55 octave_istrstream::create (const std::string& data, std::ios::openmode arg_md, |
10315
57a59eae83cc
untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents:
10160
diff
changeset
|
56 oct_mach_info::float_format flt_fmt) |
3340 | 57 { |
58 return octave_stream (new octave_istrstream (data, arg_md, flt_fmt)); | |
59 } | |
60 | |
61 octave_stream | |
3544 | 62 octave_ostrstream::create (std::ios::openmode arg_md, |
10315
57a59eae83cc
untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents:
10160
diff
changeset
|
63 oct_mach_info::float_format flt_fmt) |
3340 | 64 { |
65 return octave_stream (new octave_ostrstream (arg_md, flt_fmt)); | |
66 } |