#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"
// 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')) {
<< 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);
}
string tmp = cmd + ' ' + file + " > nul";
#endif
Systemcalls one;
- return one.Startscript(Systemcalls::System, tmp);
+ return one.startscript(Systemcalls::System, tmp);
}
string tmp = "makeindex -c -q ";
tmp += file;
Systemcalls one;
- one.Startscript(Systemcalls::System, tmp);
+ one.startscript(Systemcalls::System, tmp);
return true;
}
string tmp="bibtex ";
tmp += ChangeExtension(file, string(), true);
Systemcalls one;
- one.Startscript(Systemcalls::System, tmp);
+ one.startscript(Systemcalls::System, tmp);
return true;
}
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();
// 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"
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."