-int LyXLex::findToken(char const * str[])
-{
- int i = -1;
-
- if (next()) {
- if (compare(pimpl_->buff, "default")) {
- for (i = 0; str[i][0] && compare(str[i], pimpl_->buff); ++i);
- if (!str[i][0]) {
- pimpl_->printError("Unknown argument `$$Token'");
- i = -1;
- }
- }
- } else
- pimpl_->printError("file ended while scanning string token");
- return i;
-}
-
-
-int LyXLex::checkToken(char const * str[], int print_error)
-{
- int i = -1;
-
- if (compare(pimpl_->buff, "default")) {
- for (i = 0; str[i][0] && compare(str[i], pimpl_->buff); ++i);
- if (!str[i][0]) {
- if (print_error)
- pimpl_->printError("Unknown argument `$$Token'");
- i = -1;
- }
- }
- return i;