X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftabular-old.C;h=6b943119dfac2a30518a302006b407e45740e2af;hb=32ef0d04c48a1751abbb5e3b17d1bec25f22c255;hp=7ec6fbd2d0ce5d5b80b7d932025d35a5db55e5c6;hpb=4e61c013f4155f9f477b9ceca6df65eef5de624e;p=lyx.git diff --git a/src/tabular-old.C b/src/tabular-old.C index 7ec6fbd2d0..6b943119df 100644 --- a/src/tabular-old.C +++ b/src/tabular-old.C @@ -3,7 +3,7 @@ * * LyX, The Document Processor * - * Copyright 2000 The LyX Team. + * Copyright 2000-2001 The LyX Team. * * @author: Jürgen Vigna * @@ -20,16 +20,19 @@ using std::istream; using std::getline; using std::endl; +#ifndef CXX_GLOBAL_CSTD +using std::strlen; +#endif namespace { -bool getTokenValue(string const & str, const char * token, string & ret) +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; @@ -45,7 +48,7 @@ bool getTokenValue(string const & str, const char * token, string & ret) } -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)]; @@ -69,7 +72,7 @@ bool getTokenValue(string const & str, const char * token, int & num) } -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); @@ -78,7 +81,7 @@ bool getTokenValue(string const & str, const char * token, LyXAlignment & num) } -bool getTokenValue(string const & str, const char * token, +bool getTokenValue(string const & str, char const * token, LyXTabular::VAlignment & num) { int tmp; @@ -88,7 +91,7 @@ bool getTokenValue(string const & str, const char * token, } -bool getTokenValue(string const & str, const char * token, +bool getTokenValue(string const & str, char const * token, LyXTabular::BoxType & num) { int tmp; @@ -98,7 +101,7 @@ bool getTokenValue(string const & str, const char * token, } -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)]; @@ -203,7 +206,7 @@ void LyXTabular::ReadOld(Buffer const * buf, istream & is, 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 != "") {