#include "bufferlist.h"
#include "minibuffer.h"
#include "gettext.h"
+#include "lyx_gui_misc.h"
using std::ifstream;
using std::getline;
// What files do we have to delete?
// This will at least make latex do all the runs
- ::unlink(depfile.c_str());
+ lyx::unlink(depfile);
// but the reason for the error might be in a generated file...
// bibtex file
string bbl = ChangeExtension(ofname, ".bbl");
- ::unlink(bbl.c_str());
+ lyx::unlink(bbl);
// makeindex file
string ind = ChangeExtension(ofname, ".ind");
- ::unlink(ind.c_str());
+ lyx::unlink(ind);
// Also remove the aux file
string aux = ChangeExtension(ofname, ".aux");
- ::unlink(aux.c_str());
+ lyx::unlink(aux);
}
bool rerun = false; // rerun requested
// The class LaTeX does not know the temp path.
- bufferlist.updateIncludedTeXfiles(GetCWD());
+ bufferlist.updateIncludedTeXfiles(lyx::getcwd()); //GetCWD());
// Never write the depfile if an error was encountered.
<< "Dependency file has changed" << endl;
lyxerr[Debug::LATEX]
<< "Run #" << count << endl;
- minib->Set(string(_("LaTeX run number ")) + tostr(count));
- minib->Store();
+ WriteStatus(minib,
+ string(_("LaTeX run number ")) + tostr(count));
this->operator()();
scanres = scanLogFile(terr);
if (scanres & LaTeX::ERRORS) {
lyxerr[Debug::LATEX]
<< "Run #" << count << endl;
head.insert(file, true);
- minib->Set(string(_("LaTeX run number ")) + tostr(count));
- minib->Store();
+ WriteStatus(minib,
+ string(_("LaTeX run number ")) + tostr(count));
this->operator()();
scanres = scanLogFile(terr);
if (scanres & LaTeX::ERRORS) {
if (head.haschanged(OnlyFilename(ChangeExtension(file, ".idx")))) {
// no checks for now
lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
- minib->Set(_("Running MakeIndex."));
- minib->Store();
+ WriteStatus(minib, _("Running MakeIndex."));
rerun = runMakeIndex(OnlyFilename(ChangeExtension(file, ".idx")));
}
// tags is found -> run bibtex and set rerun = true;
// no checks for now
lyxerr[Debug::LATEX] << "Running BibTeX." << endl;
- minib->Set(_("Running BibTeX."));
- minib->Store();
+ WriteStatus(minib, _("Running BibTeX."));
rerun = runBibTeX(OnlyFilename(ChangeExtension(file, ".aux")),
head);
}
<< "Dep. file has changed or rerun requested" << endl;
lyxerr[Debug::LATEX]
<< "Run #" << count << endl;
- minib->Set(string(_("LaTeX run number ")) + tostr(count));
- minib->Store();
+ WriteStatus(minib,
+ string(_("LaTeX run number ")) + tostr(count));
this->operator()();
scanres = scanLogFile(terr);
if (scanres & LaTeX::ERRORS) {
if (head.haschanged(OnlyFilename(ChangeExtension(file, ".idx")))) {
// no checks for now
lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
- minib->Set(_("Running MakeIndex."));
- minib->Store();
+ WriteStatus(minib, _("Running MakeIndex."));
rerun = runMakeIndex(OnlyFilename(ChangeExtension(file, ".idx")));
}
rerun = false;
++count;
lyxerr[Debug::LATEX] << "Run #" << count << endl;
- minib->Set(string(_("LaTeX run number ")) + tostr(count));
- minib->Store();
+ WriteStatus(minib, string(_("LaTeX run number ")) + tostr(count));
this->operator()();
scanres = scanLogFile(terr);
if (scanres & LaTeX::ERRORS) {
string logfile = OnlyFilename(ChangeExtension(file, ".log"));
- LRegex reg1(")* *\\(([^ ]+).*");
+ LRegex reg1(")* *\\(([^ \\)]+).*");
LRegex reg2("File: ([^ ]+).*");
LRegex reg3("No file ([^ ]+)\\..*");
LRegex reg4("\\\\openout[0-9]+.*=.*`([^ ]+)'\\..*");