*
* LyX, The Document Processor
*
- * Copyright 2000 The LyX Team.
+ * Copyright 2000-2001 The LyX Team.
*
* @author: Jürgen Vigna
*
using std::getline;
using std::endl;
+#ifndef CXX_GLOBAL_CSTD
+using std::strlen;
+#endif
-static
-bool getTokenValue(string const & str, const char * token, string & ret)
+namespace {
+
+bool getTokenValue(string const & str, char const * token, string & ret)
{
size_t token_length = strlen(token);
string::size_type pos = str.find(token);
- if (pos == string::npos || pos+token_length+1 >= str.length()
- || str[pos+token_length] != '=')
+ if (pos == string::npos || pos + token_length + 1 >= str.length()
+ || str[pos + token_length] != '=')
return false;
ret.erase();
pos += token_length + 1;
}
-static
-bool getTokenValue(string const & str, const char * token, int & num)
+bool getTokenValue(string const & str, char const * token, int & num)
{
string::size_type pos = str.find(token);
char ch = str[pos + strlen(token)];
}
-static
-bool getTokenValue(string const & str, const char * token, LyXAlignment & num)
+bool getTokenValue(string const & str, char const * token, LyXAlignment & num)
{
int tmp;
bool const ret = getTokenValue(str, token, tmp);
}
-static
-bool getTokenValue(string const & str, const char * token,
+bool getTokenValue(string const & str, char const * token,
LyXTabular::VAlignment & num)
{
int tmp;
}
-static
-bool getTokenValue(string const & str, const char * token,
+bool getTokenValue(string const & str, char const * token,
LyXTabular::BoxType & num)
{
int tmp;
}
-static
-bool getTokenValue(string const & str, const char * token, bool & flag)
+bool getTokenValue(string const & str, char const * token, bool & flag)
{
string::size_type pos = str.find(token);
char ch = str[pos + strlen(token)];
}
-static inline
+inline
void l_getline(istream & is, string & str)
{
+#ifdef WITH_WARNINGS
+#warning old l_getline
+#endif
getline(is, str);
while(str.empty())
getline(is, str);
}
+} // namespace anon
+
void LyXTabular::ReadOld(Buffer const * buf, istream & is,
LyXLex & lex, string const & l)
getTokenValue(line, "special", cell_info[i][j].align_special);
l_getline(is, line);
if (prefixIs(line, "\\begin_inset")) {
- cell_info[i][j].inset.Read(buf, lex);
+ cell_info[i][j].inset.read(buf, lex);
l_getline(is, line);
}
if (line != "</Cell>") {