]> git.lyx.org Git - features.git/commitdiff
* src/LaTeX.C
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Tue, 25 Apr 2006 08:22:58 +0000 (08:22 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Tue, 25 Apr 2006 08:22:58 +0000 (08:22 +0000)
(LaTeX::scanLogFile): remove \0 characters inserted by MikTeX before
further processing
(LaTeX::deplog): likewise

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13737 a592a061-630c-0410-9148-cb99ea01b6c8

src/LaTeX.C

index 2c64fd896ee528cde4063d0cbf76e24942a267c2..90092a7cf9b782b795053e8542fa4da1094685eb 100644 (file)
@@ -540,6 +540,13 @@ int LaTeX::scanLogFile(TeXErrors & terr)
 
        string token;
        while (getline(ifs, token)) {
+               // MikTeX sometimes inserts \0 in the log file. They can't be
+               // removed directly with the existing string utility
+               // functions, so convert them first to \r, and remove all
+               // \r's afterwards, since we need to remove them anyway.
+               token = subst(token, '\0', '\r');
+               token = subst(token, "\r", "");
+
                lyxerr[Debug::LATEX] << "Log line: " << token << endl;
 
                if (token.empty())
@@ -760,7 +767,12 @@ void LaTeX::deplog(DepTable & head)
 
                string token;
                getline(ifs, token);
-               token = rtrim(token, "\r");
+               // MikTeX sometimes inserts \0 in the log file. They can't be
+               // removed directly with the existing string utility
+               // functions, so convert them first to \r, and remove all
+               // \r's afterwards, since we need to remove them anyway.
+               token = subst(token, '\0', '\r');
+               token = subst(token, "\r", "");
                if (token.empty())
                        continue;