X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLaTeX.C;h=8908812d6fe5cf683a7300190fa033b79c6dfa6f;hb=dbef37d5223a727b860a83ff4155f05b013c97a3;hp=65f45b9458e0f9bba926dedea2ea739e2ba4a003;hpb=e36eb8f6748eb394c546d29917e3e950198fd163;p=lyx.git diff --git a/src/LaTeX.C b/src/LaTeX.C index 65f45b9458..8908812d6f 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -21,6 +21,7 @@ #include "funcrequest.h" #include "support/filetools.h" #include "support/FileInfo.h" +#include "support/tostr.h" #include "support/lstrings.h" #include "support/lyxlib.h" #include "support/systemcall.h" @@ -28,7 +29,6 @@ #include "support/path.h" #include -#include "BoostFormat.h" #include #include // sscanf @@ -70,13 +70,8 @@ namespace { void showRunMessage(LyXFunc * lf, unsigned int count) { - ostringstream str; -#if USE_BOOST_FORMAT - str << boost::format(_("Waiting for LaTeX run number %1$d")) % count; -#else - str << _("Waiting for LaTeX run number ") << count; -#endif - lf->dispatch(FuncRequest(LFUN_MESSAGE, STRCONV(str.str()))); + string str = bformat(_("Waiting for LaTeX run number %1$s"), tostr(count)); + lf->dispatch(FuncRequest(LFUN_MESSAGE, str)); } @@ -92,6 +87,22 @@ void TeXErrors::insertError(int line, string const & error_desc, errors.push_back(newerr); } + +bool operator==(Aux_Info const & a, Aux_Info const & o) +{ + return a.aux_file == o.aux_file && + a.citations == o.citations && + a.databases == o.databases && + a.styles == o.styles; +} + + +bool operator!=(Aux_Info const & a, Aux_Info const & o) +{ + return !(a == o); +} + + /* * CLASS LaTeX */ @@ -219,11 +230,11 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun) showRunMessage(lfun, count); } - this->operator()(); + startscript(); scanres = scanLogFile(terr); if (scanres & ERROR_RERUN) { lyxerr[Debug::LATEX] << "Rerunning LaTeX" << endl; - this->operator()(); + startscript(); scanres = scanLogFile(terr); } @@ -302,7 +313,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun) showRunMessage(lfun, count); } - this->operator()(); + startscript(); scanres = scanLogFile(terr); if (scanres & ERRORS) { deleteFilesOnError(); @@ -356,7 +367,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun) showRunMessage(lfun, count); } - this->operator()(); + startscript(); scanres = scanLogFile(terr); if (scanres & ERRORS) { deleteFilesOnError(); @@ -374,7 +385,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun) } -int LaTeX::operator()() +int LaTeX::startscript() { #ifndef __EMX__ string tmp = cmd + ' ' + QuoteName(file) + " > /dev/null";