]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeX.cpp
Embedding: saving inzip name to .lyx file so that embedded files can always be found...
[lyx.git] / src / LaTeX.cpp
index 5c62824e0e12dd5a5d8e8d3d57119e593218eb5c..082872a57aee76c67458764ac828ce0c918af912 100644 (file)
 #include "support/debug.h"
 #include "DepTable.h"
 
-#include "support/filetools.h"
 #include "support/convert.h"
+#include "support/FileName.h"
+#include "support/filetools.h"
 #include "support/lstrings.h"
-#include "support/lyxlib.h"
 #include "support/Systemcall.h"
 #include "support/os.h"
 
@@ -37,29 +37,10 @@ using boost::regex;
 using boost::smatch;
 
 using namespace std;
+using namespace lyx::support;
 
 namespace lyx {
 
-using support::absolutePath;
-using support::bformat;
-using support::changeExtension;
-using support::contains;
-using support::FileName;
-using support::findtexfile;
-using support::getcwd;
-using support::makeAbsPath;
-using support::onlyFilename;
-using support::prefixIs;
-using support::quoteName;
-using support::removeExtension;
-using support::rtrim;
-using support::rsplit;
-using support::split;
-using support::subst;
-using support::suffixIs;
-using support::Systemcall;
-using support::trim;
-
 namespace os = support::os;
 
 // TODO: in no particular order
@@ -178,7 +159,7 @@ int LaTeX::run(TeXErrors & terr)
        bool rerun = false; // rerun requested
 
        // The class LaTeX does not know the temp path.
-       theBufferList().updateIncludedTeXfiles(getcwd().absFilename(),
+       theBufferList().updateIncludedTeXfiles(FileName::getcwd().absFilename(),
                runparams);
 
        // Never write the depfile if an error was encountered.
@@ -405,9 +386,11 @@ int LaTeX::run(TeXErrors & terr)
 int LaTeX::startscript()
 {
        // onlyFilename() is needed for cygwin
-       string tmp = cmd + ' ' + "-max-print-line=200 "
-                               + quoteName(onlyFilename(file.toFilesystemEncoding()));
-       return Systemcall().startscript(Systemcall::Wait, tmp);
+       string tmp = cmd + ' '
+                    + quoteName(onlyFilename(file.toFilesystemEncoding()))
+                    + " > " + os::nulldev();
+       Systemcall one;
+       return one.startscript(Systemcall::Wait, tmp);
 }
 
 
@@ -762,12 +745,12 @@ bool handleFoundFile(string const & ff, DepTable & head)
        // (1) foundfile is an
        //     absolute path and should
        //     be inserted.
-       if (absolutePath(foundfile)) {
+       FileName absname(foundfile);
+       if (absname.isAbsolute()) {
                LYXERR(Debug::DEPEND, "AbsolutePath file: " << foundfile);
                // On initial insert we want to do the update at once
                // since this file cannot be a file generated by
                // the latex run.
-               FileName absname(foundfile);
                if (!insertIfExists(absname, head)) {
                        // check for spaces
                        string strippedfile = foundfile;
@@ -790,7 +773,7 @@ bool handleFoundFile(string const & ff, DepTable & head)
        }
 
        string onlyfile = onlyFilename(foundfile);
-       FileName absname(makeAbsPath(onlyfile));
+       absname = makeAbsPath(onlyfile);
 
        // check for spaces
        while (contains(foundfile, ' ')) {