-int Literate::scanLiterateLogFile(TeXErrors &terr)
-{
- LString token;
- int retval = NO_ERRORS;
-
- LyXLex lex(NULL, 0);
-
- LString 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(token, Error::LATEX);
-
- if (token.prefixIs("Build Warning:")) {
- // Here shall we handle different
- // types of warnings
- retval |= LATEX_WARNING;
- lyxerr.debug("Build Warning.", Error::LATEX);
- } else if (token.prefixIs("! Build Error:")) {
- // Here shall we handle different
- // types of errors
- retval |= LATEX_ERROR;
- lyxerr.debug("Build Error.", Error::LATEX);
- // this is not correct yet
- terr.scanError(lex);
- num_errors++;
- }
- }
- return retval;
-}
-
-
-int Literate::scanBuildLogFile(TeXErrors &terr)
-{
- LString token;
- int retval = NO_ERRORS;
-
- LyXLex lex(NULL, 0);
-
- LString 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(token, Error::LATEX);
-
- if (token.prefixIs("Build Warning:")) {
- // Here shall we handle different
- // types of warnings
- retval |= LATEX_WARNING;
- lyxerr.debug("Build Warning.", Error::LATEX);
- } else if (token.prefixIs("! Build Error:")) {
- // Here shall we handle different
- // types of errors
- retval |= LATEX_ERROR;
- lyxerr.debug("Build Error.", Error::LATEX);
- // this is not correct yet
- terr.scanError(lex);
- num_errors++;
- }
- }
- return retval;