23 #if !defined (octave_ls_oct_ascii_h)
24 #define octave_ls_oct_ascii_h 1
36 #define CELL_ELT_TAG "<cell-element>"
41 #define OCT_RBV (std::numeric_limits<double>::max () / 100.0)
46 const bool next_only =
false);
49 read_ascii_data (std::istream& is,
const std::string& filename,
bool& global,
54 const std::string& name,
bool mark_as_global,
int precision);
58 const std::string& name);
62 bool parametric =
false);
74 const bool next_only =
false)
82 if (c ==
'%' || c ==
'#')
84 std::ostringstream buf;
86 while (is.get (c) && (c ==
' ' || c ==
'\t' || c ==
'%' || c ==
'#'))
92 while (is.get (c) && isalpha (c))
95 std::string tmp = buf.str ();
96 bool match = (tmp.compare (0, strlen (keyword), keyword) == 0);
100 while (is.get (c) && (c ==
' ' || c ==
'\t' || c ==
':'))
104 if (c !=
'\n' && c !=
'\r')
121 const bool next_only =
false)
137 std::string& kw, T& value,
const bool next_only =
false)
146 if (c ==
'%' || c ==
'#')
148 std::ostringstream buf;
150 while (is.get (c) && (c ==
' ' || c ==
'\t' || c ==
'%' || c ==
'#'))
156 while (is.get (c) && isalpha (c))
159 std::string tmp = buf.str ();
161 for (
int i = 0; i < keywords.
length (); i++)
163 int match = (tmp == keywords[i]);
169 while (is.get (c) && (c ==
' ' || c ==
'\t' || c ==
':'))
173 if (c !=
'\n' && c !=
'\r')