-
-
-int Literate::scanLiterateLogFile(TeXErrors &terr)
-{
- string token;
- int retval = NO_ERRORS;
-
- LyXLex lex(0, 0);
-
- string tmp = litfile + ".log";
-
- if (!lex.setFile(tmp)) {
- // unable to open file
- // return at once
- retval |= NO_LOGFILE;
- return retval;
- }
-
- while (lex.IsOK()) {
- if (lex.EatLine())
- token = lex.GetString();
- else // blank line in the file being read
- continue;
-
- lyxerr[Debug::LATEX] << token << endl;
-
- if (prefixIs(token, "Build Warning:")) {
- // Here shall we handle different
- // types of warnings
- retval |= LATEX_WARNING;
- lyxerr[Debug::LATEX] << "Build Warning." << endl;
- } else if (prefixIs(token, "! Build Error:")) {
- // Here shall we handle different
- // types of errors
- retval |= LATEX_ERROR;
- lyxerr[Debug::LATEX] << "Build Error." << endl;
- // this is not correct yet
- terr.scanError(lex);
- num_errors++;
- }
- }
- return retval;
-}
-
-
-int Literate::scanBuildLogFile(TeXErrors &terr)
-{
- string token;
- int retval = NO_ERRORS;
-
- LyXLex lex(0, 0);
-
- string tmp = litfile + ".log";
-
- if (!lex.setFile(tmp)) {
- // unable to open file
- // return at once
- retval |= NO_LOGFILE;
- return retval;
- }
-
- while (lex.IsOK()) {
- if (lex.EatLine())
- token = lex.GetString();
- else // blank line in the file being read
- continue;
-
- lyxerr[Debug::LATEX] << token << endl;
-
- if (prefixIs(token, "Build Warning:")) {
- // Here shall we handle different
- // types of warnings
- retval |= LATEX_WARNING;
- lyxerr[Debug::LATEX] << "Build Warning." << endl;
- } else if (prefixIs(token, "! Build Error:")) {
- // Here shall we handle different
- // types of errors
- retval |= LATEX_ERROR;
- lyxerr[Debug::LATEX] << "Build Error." << endl;
- // this is not correct yet
- terr.scanError(lex);
- num_errors++;
- }
- }
- return retval;
-}
-
-