}
-string const LyXLex::Pimpl::GetString() const
+string const LyXLex::Pimpl::getString() const
{
return string(buff);
}
void LyXLex::Pimpl::printError(string const & message) const
{
- string const tmpmsg = subst(message, "$$Token", GetString());
+ string const tmpmsg = subst(message, "$$Token", getString());
lyxerr << "LyX: " << tmpmsg << " [around line " << lineno
<< " of file " << MakeDisplayPath(name) << ']' << endl;
}
is.get(cc);
c = cc;
} while (c > ' ' && c != ',' && is
- && (i != LEX_MAX_BUFF - 1) );
+ && (i != LEX_MAX_BUFF - 1));
if (i == LEX_MAX_BUFF - 1) {
printError("Line too long");
}
is.get(cc);
c = cc;
} while (c > ' ' && c != ',' && is
- && (i != LEX_MAX_BUFF - 1) );
+ && (i != LEX_MAX_BUFF - 1));
if (i == LEX_MAX_BUFF - 1) {
printError("Line too long");
}
// escape the next char
is.get(cc);
c = cc;
- escaped = true;
+ if (c == '\"' || c == '\\')
+ escaped = true;
+ else
+ buff[++i] = '\\';
}
buff[++i] = c;
is.get(cc);
c = cc;
} while (c > ' ' && c != ',' && is
- && (i != LEX_MAX_BUFF-1) );
+ && (i != LEX_MAX_BUFF-1));
if (i == LEX_MAX_BUFF-1) {
printError("Line too long");
}
}
-bool LyXLex::Pimpl::EatLine()
+bool LyXLex::Pimpl::eatLine()
{
int i = 0;
unsigned char c = '\0';
char cc = 0;
- while(is && c != '\n' && i != (LEX_MAX_BUFF - 1)) {
+ while (is && c != '\n' && i != (LEX_MAX_BUFF - 1)) {
is.get(cc);
c = cc;
//lyxerr[Debug::LYXLEX] << "LyXLex::EatLine read char: `"