]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlex_pimpl.C
Fix fuer #209
[lyx.git] / src / lyxlex_pimpl.C
index b385ef8d53e8c7f3d4e86d5dc84afc74ec7336a7..1dc807724e00ff4470132b768b7386a1ee3fdb63 100644 (file)
@@ -40,7 +40,7 @@ LyXLex::Pimpl::Pimpl(keyword_item * tab, int num)
 }
 
 
-string const LyXLex::Pimpl::GetString() const
+string const LyXLex::Pimpl::getString() const
 {
        return string(buff);
 }
@@ -48,7 +48,7 @@ string const LyXLex::Pimpl::GetString() const
 
 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;
 }
@@ -311,7 +311,10 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                                                // escape the next char
                                                is.get(cc);
                                                c = cc;
-                                               escaped = true;
+                                               if (c == '\"' || c == '\\')
+                                                       escaped = true;
+                                               else
+                                                       buff[++i] = '\\';
                                        }
                                        buff[++i] = c;
                                        
@@ -393,12 +396,12 @@ int LyXLex::Pimpl::lex()
 }
 
        
-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: `"