X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLaTeX.C;h=b1758d2749634a7e49bd69b3d7dbd7da588a73d2;hb=a858be7332e331e0244e4dba7b0931b6072ffd3d;hp=f21dfc91cfc938e061d1ccefe56103c17248c913;hpb=35584afc1162dec2cf9fff79305e95cb3b75aefb;p=lyx.git diff --git a/src/LaTeX.C b/src/LaTeX.C index f21dfc91cf..b1758d2749 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -28,7 +28,7 @@ #include "support/lyxlib.h" #include "support/syscall.h" #include "support/syscontr.h" -#include "pathstack.h" +#include "support/path.h" #include "bufferlist.h" #include "minibuffer.h" #include "gettext.h" @@ -132,7 +132,7 @@ void TeXErrors::scanError(LyXLex &lex) // msg. if (contains(errstr, "l.")) { // We make a const copy to make [] fast. (Asger) - string const es = errstr; + string const es(errstr); for (string::size_type i = 2; i < es.length(); ++i) { if (es[i-2] == 'l' && es[i-1] == '.' && (es[i] >= '0' && es[i]<= '9')) { @@ -198,9 +198,6 @@ void TeXErrors::printErrors() << tmperr->error_in_line << ": " << tmperr->error_desc << '\n' << tmperr->error_text << endl; - //%d: %s\n%s\n", tmperr->error_in_line, - // tmperr->error_desc.c_str(), - // tmperr->error_text.c_str()); tmperr = tmperr->next_error; } while (tmperr); } @@ -428,7 +425,7 @@ int LaTeX::operator()() string tmp = cmd + ' ' + file + " > nul"; #endif Systemcalls one; - return one.Startscript(Systemcalls::System, tmp); + return one.startscript(Systemcalls::System, tmp); } @@ -445,7 +442,7 @@ bool LaTeX::runMakeIndex(string const &file) string tmp = "makeindex -c -q "; tmp += file; Systemcalls one; - one.Startscript(Systemcalls::System, tmp); + one.startscript(Systemcalls::System, tmp); return true; } @@ -471,7 +468,7 @@ bool LaTeX::runBibTeX(string const &file) string tmp="bibtex "; tmp += ChangeExtension(file, string(), true); Systemcalls one; - one.Startscript(Systemcalls::System, tmp); + one.startscript(Systemcalls::System, tmp); return true; } @@ -483,20 +480,18 @@ bool LaTeX::runBibTeX(string const &file) int LaTeX::scanLogFile(TeXErrors &terr) { - string token; int retval = NO_ERRORS; - - LyXLex lex(0, 0); - string tmp = ChangeExtension(file, ".log", true); + LyXLex lex(0, 0); if (!lex.setFile(tmp)) { // unable to open file // return at once retval |= NO_LOGFILE; return retval; } - + + string token; while (lex.IsOK()) { if (lex.EatLine()) token = lex.GetString(); @@ -687,7 +682,7 @@ void LaTeX::deplog(DepTable & head) // found in the same dir // as the .lyx file and // should be inserted. - PathPush(path); + Path p(path); if (FileInfo(foundfile).exist()) { lyxerr << "LyX Strange: this should actually never" " happen anymore, this it should be" @@ -696,10 +691,8 @@ void LaTeX::deplog(DepTable & head) lyxerr[Debug::LATEX] << "Same Directory file: " << foundfile << endl; head.insert(foundfile); - PathPop(); continue; } - PathPop(); lyxerr[Debug::LATEX] << "Not a file or we are unable to find it."