4634
|
1 /* |
|
2 |
|
3 Copyright (C) 2003 John W. Eaton |
|
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 |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
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 |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
20 |
|
21 */ |
|
22 |
|
23 #if !defined (octave_ls_oct_ascii_h) |
|
24 #define octave_ls_oct_ascii_h 1 |
|
25 |
4687
|
26 #include <cfloat> |
|
27 |
5099
|
28 #include <string> |
|
29 |
|
30 #include "str-vec.h" |
|
31 |
4687
|
32 // Flag for cell elements |
|
33 #define CELL_ELT_TAG "<cell-element>" |
|
34 |
|
35 // Used when converting Inf to something that gnuplot can read. |
|
36 |
|
37 #ifndef OCT_RBV |
|
38 #define OCT_RBV DBL_MAX / 100.0 |
|
39 #endif |
|
40 |
4634
|
41 extern std::string |
4687
|
42 extract_keyword (std::istream& is, const char *keyword, |
|
43 const bool next_only = false); |
|
44 |
|
45 extern bool |
|
46 extract_keyword (std::istream& is, const char *keyword, int& value, |
|
47 const bool next_only = false); |
4634
|
48 |
5099
|
49 extern bool |
|
50 extract_keyword (std::istream& is, const string_vector& keywords, |
|
51 std::string& keyword, int& value, |
|
52 const bool next_only = false); |
|
53 |
4634
|
54 extern std::string |
|
55 read_ascii_data (std::istream& is, const std::string& filename, bool& global, |
|
56 octave_value& tc, int count); |
|
57 |
|
58 extern bool |
|
59 save_ascii_data (std::ostream& os, const octave_value& val_arg, |
|
60 const std::string& name, bool& infnan_warned, |
|
61 bool strip_nan_and_inf, bool mark_as_global, |
|
62 int precision); |
|
63 |
|
64 extern bool |
|
65 save_ascii_data_for_plotting (std::ostream& os, const octave_value& t, |
|
66 const std::string& name); |
|
67 |
|
68 #endif |
|
69 |
|
70 /* |
|
71 ;;; Local Variables: *** |
|
72 ;;; mode: C++ *** |
|
73 ;;; End: *** |
|
74 */ |
|
75 |