X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLaTeX.cpp;h=3436645fec13db6e717d8772bd3b151498d13702;hb=ec84cbfb445413e51472845c3c1a2b5da930492f;hp=294f09e2736bb386872960c19c7ea6d1f38664b3;hpb=027b5dc4af02675997bacc607622032918f62261;p=lyx.git diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index 294f09e273..3436645fec 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -634,8 +634,8 @@ int LaTeX::scanLogFile(TeXErrors & terr) FileName const fn = FileName(makeAbsPath(tmp)); ifstream ifs(fn.toFilesystemEncoding().c_str()); bool fle_style = false; - static regex file_line_error(".+\\.\\D+:[0-9]+: (.+)"); - static regex child_file(".*([0-9]+[A-Za-z]*_.+\\.tex).*"); + static regex const file_line_error(".+\\.\\D+:[0-9]+: (.+)"); + static regex const child_file(".*([0-9]+[A-Za-z]*_.+\\.tex).*"); // Flag for 'File ended while scanning' message. // We need to wait for subsequent processing. string wait_for_error; @@ -816,9 +816,11 @@ int LaTeX::scanLogFile(TeXErrors & terr) // we have a latex error retval |= TEX_ERROR; if (contains(desc, - "Package babel Error: You haven't defined the language") || - contains(desc, - "Package babel Error: You haven't loaded the option")) + "Package babel Error: You haven't defined the language") + || contains(desc, + "Package babel Error: You haven't loaded the option") + || contains(desc, + "Package babel Error: Unknown language")) retval |= ERROR_RERUN; // get the line number: int line = 0; @@ -1013,7 +1015,7 @@ bool completeFilename(string const & ff, DepTable & head) } -int iterateLine(string const token, regex const reg, string const & closing, +int iterateLine(string const & token, regex const & reg, string const & closing, int fragment_pos, DepTable & head) { smatch what; @@ -1213,7 +1215,7 @@ void LaTeX::deplog(DepTable & head) // (and in addition to those above) if (regex_match(token, sub, reg5)) { // search for strings in <...> - static regex reg5_1("<([^>]+)(.)"); + static regex const reg5_1("<([^>]+)(.)"); fragment_pos = iterateLine(token, reg5_1, ">", fragment_pos, head); fragment = (fragment_pos != -1); @@ -1226,7 +1228,7 @@ void LaTeX::deplog(DepTable & head) // where "File: file.ext" would be skipped if (regex_match(token, sub, reg6)) { // search for strings in (...) - static regex reg6_1("\\(([^()]+)(.)"); + static regex const reg6_1("\\(([^()]+)(.)"); fragment_pos = iterateLine(token, reg6_1, ")", fragment_pos, head); fragment = (fragment_pos != -1);