Jean-Marc Lasgouttes wrote:
> I think you should put it in.
Will do. I guess also in 1.4?
> At first I was really confused about the transformation of \0 to \r,
> but it seems there is no really easier way.
I should have added a comment (which I just did).
Georg
Log:
* src/LaTeX.C
(LaTeX::scanLogFile): remove \0 characters inserted by MikTeX before
further processing
(LaTeX::deplog): likewise
Index: src/LaTeX.C
===================================================================
--- src/LaTeX.C (Revision 13736)
+++ src/LaTeX.C (Arbeitskopie)
@@ -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;