]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlex_pimpl.C
forgot these
[lyx.git] / src / lyxlex_pimpl.C
index 6351ec523ba8b933e36aead8a4aa5e780264ca38..fd4cb586a74a4bd98b13b5e729f16ed7013d1d9d 100644 (file)
@@ -222,7 +222,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                                        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");
                                }
@@ -273,7 +273,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                                        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");
                                }
@@ -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;
                                        
@@ -349,7 +352,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                                        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");
                                }
@@ -398,7 +401,7 @@ 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: `"