X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLiterate.C;h=a91a40b26732eb94267d934a08551a8c29ff4774;hb=a858be7332e331e0244e4dba7b0931b6072ffd3d;hp=da0ad20dbb7bcadefd38a793f1eeebed1cc9b376;hpb=0eccdd1c3613e5170deb77b22174dd0afde833e9;p=lyx.git diff --git a/src/Literate.C b/src/Literate.C index da0ad20dbb..a91a40b267 100644 --- a/src/Literate.C +++ b/src/Literate.C @@ -22,11 +22,11 @@ #include "Literate.h" #include "lyxlex.h" #include "support/FileInfo.h" -#include "error.h" +#include "debug.h" #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" @@ -55,8 +55,7 @@ int Literate::weave(TeXErrors &terr, MiniBuffer *minib) // The class LaTeX does not know the temp path. bufferlist.updateIncludedTeXfiles(GetCWD()); - lyxerr.debug(string(_("Weaving document")), - Error::LATEX); + lyxerr[Debug::LATEX] << "Weaving document" << endl; minib->Set(string(_("Weaving document"))); minib->Store(); @@ -64,9 +63,9 @@ int Literate::weave(TeXErrors &terr, MiniBuffer *minib) // tmp1 = literate_cmd + " < " + litfile + " > " + file + " 2> " + litfile + ".out"; tmp2 = literate_filter + " < " + litfile + ".out" + " > " + litfile + ".log"; - ret1 = one.Startscript(Systemcalls::System, tmp1); - ret2 = two.Startscript(Systemcalls::System, tmp2); - lyxerr.debug(string(_("LITERATE")) + " {" + tmp1 + "} {" + tmp2 + "}"); + ret1 = one.startscript(Systemcalls::System, tmp1); + ret2 = two.startscript(Systemcalls::System, tmp2); + lyxerr.debug() << "LITERATE {" << tmp1 << "} {" << tmp2 << "}" << endl; scanres = scanLiterateLogFile(terr); if (scanres & Literate::ERRORS) return scanres; // return on literate error @@ -89,8 +88,7 @@ int Literate::build(TeXErrors &terr, MiniBuffer *minib) // The class LaTeX does not know the temp path. bufferlist.updateIncludedTeXfiles(GetCWD()); - lyxerr.debug(string(_("Building program")), - Error::LATEX); + lyxerr[Debug::LATEX] << "Building program" << endl; minib->Set(string(_("Building program"))); minib->Store(); @@ -98,10 +96,10 @@ int Literate::build(TeXErrors &terr, MiniBuffer *minib) // tmp1 = build_cmd + ' ' + litfile + " > " + litfile + ".out 2>&1"; tmp2 = build_filter + " < " + litfile + ".out" + " > " + litfile + ".log"; - ret1 = one.Startscript(Systemcalls::System, tmp1); - ret2 = two.Startscript(Systemcalls::System, tmp2); + ret1 = one.startscript(Systemcalls::System, tmp1); + ret2 = two.startscript(Systemcalls::System, tmp2); scanres = scanBuildLogFile(terr); - lyxerr.debug("Done.", Error::LATEX); + lyxerr[Debug::LATEX] << "Done." << endl; return scanres; } @@ -129,18 +127,18 @@ int Literate::scanLiterateLogFile(TeXErrors &terr) else // blank line in the file being read continue; - lyxerr.debug(token, Error::LATEX); + lyxerr[Debug::LATEX] << token << endl; if (prefixIs(token, "Build Warning:")) { // Here shall we handle different // types of warnings retval |= LATEX_WARNING; - lyxerr.debug("Build Warning.", Error::LATEX); + lyxerr[Debug::LATEX] << "Build Warning." << endl; } else if (prefixIs(token, "! Build Error:")) { // Here shall we handle different // types of errors retval |= LATEX_ERROR; - lyxerr.debug("Build Error.", Error::LATEX); + lyxerr[Debug::LATEX] << "Build Error." << endl; // this is not correct yet terr.scanError(lex); num_errors++; @@ -172,18 +170,18 @@ int Literate::scanBuildLogFile(TeXErrors &terr) else // blank line in the file being read continue; - lyxerr.debug(token, Error::LATEX); + lyxerr[Debug::LATEX] << token << endl; if (prefixIs(token, "Build Warning:")) { // Here shall we handle different // types of warnings retval |= LATEX_WARNING; - lyxerr.debug("Build Warning.", Error::LATEX); + lyxerr[Debug::LATEX] << "Build Warning." << endl; } else if (prefixIs(token, "! Build Error:")) { // Here shall we handle different // types of errors retval |= LATEX_ERROR; - lyxerr.debug("Build Error.", Error::LATEX); + lyxerr[Debug::LATEX] << "Build Error." << endl; // this is not correct yet terr.scanError(lex); num_errors++;