// That is not fast... (Lgb)
string dummy;
getline(is, dummy);
-
+
lyxerr[Debug::LYXLEX] << "Comment read: `" << c
<< dummy << '\'' << endl;
#else
if (c == '\"') {
buff.clear();
-
+
do {
is.get(cc);
c = cc;
// lot better to use the functions from cctype
if (c > ' ' && is) {
buff.clear();
-
+
do {
buff.push_back(c);
is.get(cc);
if (c == '\\') {
// escape
buff.clear();
-
+
do {
if (c == '\\') {
// escape the next char
// That is still not fast... (Lgb)
string dummy;
getline(is, dummy);
-
+
lyxerr[Debug::LYXLEX] << "Comment read: `" << c
<< dummy << '\'' << endl;
#else
// string
if (c == '\"') {
buff.clear();
-
+
bool escaped = false;
do {
escaped = false;
if (c > ' ' && is) {
buff.clear();
-
+
do {
if (c == '\\') {
// escape the next char
bool LyXLex::Pimpl::eatLine()
{
buff.clear();
-
+
unsigned char c = '\0';
char cc = 0;
while (is && c != '\n') {
c = cc;
if (c >= ' ' && is) {
buff.clear();
-
+
if (c == '\\') { // first char == '\\'
do {
buff.push_back(c);
lex.eatLine();
#if USE_BOOST_FORMAT
boost::format fmt(_("Unknown token: %1$s %2$s\n"));
- fmt % token % lex.text();
+ fmt % token % lex.getString();
string const s = fmt.str();
#else
string const s = _("Unknown token: ") + token
- + ' ' + lex.text() + '\n';
+ + ' ' + lex.getString() + '\n';
#endif
// we can do this here this way because we're actually reading
// the buffer and don't care about LyXText right now.
case KMOD:
{
if (lyxerr.debugging(Debug::KBMAP))
- lyxerr << "KMOD:\t" << lex.text() << endl;
+ lyxerr << "KMOD:\t" << lex.getString() << endl;
if (lex.next(true)) {
if (lyxerr.debugging(Debug::KBMAP))
- lyxerr << "key\t`" << lex.text()
+ lyxerr << "key\t`" << lex.getString()
<< '\'' << endl;
} else
return -1;
if (lex.next(true)) {
if (lyxerr.debugging(Debug::KBMAP))
- lyxerr << "accent\t`" << lex.text()
+ lyxerr << "accent\t`" << lex.getString()
<< '\'' << endl;
} else
return -1;
// so that this field is not present anymore.
if (lex.next(true)) {
if (lyxerr.debugging(Debug::KBMAP))
- lyxerr << "allowed\t`" << lex.text()
+ lyxerr << "allowed\t`" << lex.getString()
<< '\'' << endl;
} else
return -1;
lyxerr[Debug::KBMAP] << "KCOMB:" << endl;
if (lex.next(true)) {
- str= lex.text();
+ str = lex.getString();
lyxerr[Debug::KBMAP] << str << endl;
} else
return -1;
if (accent_1 == TEX_NOACCENT) return -1;
if (lex.next(true)) {
- str = lex.text();
+ str = lex.getString();
lyxerr[Debug::KBMAP] << str << endl;
} else
return -1;
unsigned char key_from;
if (lyxerr.debugging(Debug::KBMAP))
- lyxerr << "KMAP:\t" << lex.text() << endl;
+ lyxerr << "KMAP:\t" << lex.getString() << endl;
if (lex.next(true)) {
- key_from = lex.text()[0];
+ key_from = lex.getString()[0];
if (lyxerr.debugging(Debug::KBMAP))
- lyxerr << "\t`" << lex.text() << '\''
+ lyxerr << "\t`" << lex.getString() << '\''
<< endl;
} else
return -1;
if (lex.next(true)) {
- string string_to = lex.text();
+ string const string_to = lex.getString();
keymap_[key_from] = string_to;
if (lyxerr.debugging(Debug::KBMAP))
lyxerr << "\t`" << string_to << '\''
string str;
if (lyxerr.debugging(Debug::KBMAP))
- lyxerr << "KXMOD:\t" << lex.text() << endl;
+ lyxerr << "KXMOD:\t" << lex.getString() << endl;
if (lex.next(true)) {
if (lyxerr.debugging(Debug::KBMAP))
- lyxerr << "\t`" << lex.text() << '\''
+ lyxerr << "\t`" << lex.getString() << '\''
<< endl;
accent = getkeymod(lex.getString());
} else
if (lex.next(true)) {
if (lyxerr.debugging(Debug::KBMAP))
- lyxerr << "\t`" << lex.text() << '\''
+ lyxerr << "\t`" << lex.getString() << '\''
<< endl;
- key = lex.text()[0];
+ key = lex.getString()[0];
} else
return -1;
if (lex.next(true)) {
if (lyxerr.debugging(Debug::KBMAP))
- lyxerr << "\t`" << lex.text() << '\''
+ lyxerr << "\t`" << lex.getString() << '\''
<< endl;
- str = lex.text();
+ str = lex.getString();
} else
return -1;