]> git.lyx.org Git - features.git/blobdiff - src/LaTeX.C
fix crossref label list, some debug messages + various
[features.git] / src / LaTeX.C
index 411519627e95491480c560e88ee241dd5a60f9e9..73bf70c380df874a15712dc88146af0e1f04c485 100644 (file)
@@ -51,7 +51,7 @@ extern BufferList bufferlist;
 
 struct texfile_struct {
        LaTeX::TEX_FILES file;
-       char const *extension;
+       char const * extension;
 };
 
 static
@@ -139,11 +139,12 @@ int LaTeX::run(TeXErrors & terr, MiniBuffer * minib)
                // Update the checksums
                head.update();
                
-               lyxerr[Debug::LATEX] << "Dependency file exists" << endl;
+               lyxerr[Debug::DEPEND] << "Dependency file exists" << endl;
                if (head.sumchange()) {
                        ++count;
+                       lyxerr[Debug::DEPEND]
+                               << "Dependency file has changed" << endl;
                        lyxerr[Debug::LATEX]
-                               << "Dependency file has changed\n"
                                << "Run #" << count << endl; 
                        minib->Set(string(_("LaTeX run number ")) + tostr(count));
                        minib->Store();
@@ -152,15 +153,18 @@ int LaTeX::run(TeXErrors & terr, MiniBuffer * minib)
                        if (scanres & LaTeX::ERRORS) return scanres; // return on error
                        run_bibtex = scanAux(head);
                        if (run_bibtex)
-                               lyxerr << "Bibtex demands rerun" << endl;
+                               lyxerr[Debug::DEPEND]
+                                       << "Bibtex demands rerun" << endl;
                } else {
-                       lyxerr[Debug::LATEX] << "return no_change" << endl;
+                       lyxerr[Debug::DEPEND] << "return no_change" << endl;
                        return LaTeX::NO_CHANGE;
                }
        } else {
                ++count;
-               lyxerr[Debug::LATEX] << "Dependency file does not exist\n"
-                                    << "Run #" << count << endl;
+               lyxerr[Debug::DEPEND]
+                       << "Dependency file does not exist" << endl;
+               lyxerr[Debug::LATEX]
+                       << "Run #" << count << endl;
                head.insert(file, true);
                minib->Set(string(_("LaTeX run number ")) + tostr(count));
                minib->Store();
@@ -219,8 +223,9 @@ int LaTeX::run(TeXErrors & terr, MiniBuffer * minib)
        if (rerun || head.sumchange()) {
                rerun = false;
                ++count;
+               lyxerr[Debug::DEPEND]
+                       << "Dep. file has changed or rerun requested" << endl;
                lyxerr[Debug::LATEX]
-                       << "Dep. file has changed or rerun requested\n"
                        << "Run #" << count << endl;
                minib->Set(string(_("LaTeX run number ")) + tostr(count));
                minib->Store();
@@ -231,7 +236,7 @@ int LaTeX::run(TeXErrors & terr, MiniBuffer * minib)
                deplog(head); // reads the latex log
                head.update();
        } else {
-               lyxerr[Debug::LATEX] << "Dep. file has NOT changed" << endl;
+               lyxerr[Debug::DEPEND] << "Dep. file has NOT changed" << endl;
        }
 
        // 1.5
@@ -570,7 +575,7 @@ void LaTeX::deplog(DepTable & head)
                                break;
                        foundfile += c;
                }
-               lyxerr[Debug::LATEX] << "Found file: " 
+               lyxerr[Debug::DEPEND] << "Found file: " 
                                     << foundfile << endl;
                
                // Ok now we found a file.
@@ -582,7 +587,7 @@ void LaTeX::deplog(DepTable & head)
                //     absolute path and should
                //     be inserted.
                if (AbsolutePath(foundfile)) {
-                       lyxerr[Debug::LATEX] << "AbsolutePath file: " 
+                       lyxerr[Debug::DEPEND] << "AbsolutePath file: " 
                                             << foundfile << endl;
                        // On inital insert we want to do the update at once
                        // since this file can not be a file generated by
@@ -595,7 +600,7 @@ void LaTeX::deplog(DepTable & head)
                //     insert it into head
                if (FileInfo(OnlyFilename(foundfile)).exist()) {
                        if (suffixIs(foundfile, ".aux")) {
-                               lyxerr[Debug::LATEX] << "We don't want "
+                               lyxerr[Debug::DEPEND] << "We don't want "
                                                     << OnlyFilename(foundfile)
                                                     << " in the dep file"
                                                     << endl;
@@ -603,19 +608,19 @@ void LaTeX::deplog(DepTable & head)
                                // This is a tex file generated by LyX
                                // and latex is not likely to change this
                                // during its runs.
-                               lyxerr[Debug::LATEX] << "Tmpdir TeX file: "
+                               lyxerr[Debug::DEPEND] << "Tmpdir TeX file: "
                                                     << OnlyFilename(foundfile)
                                                     << endl;
                                head.insert(foundfile, true);
                        } else {
-                               lyxerr[Debug::LATEX] << "In tmpdir file:"
+                               lyxerr[Debug::DEPEND] << "In tmpdir file:"
                                                     << OnlyFilename(foundfile)
                                                     << endl;
                                head.insert(OnlyFilename(foundfile));
                        }
                        continue;
                }
-               lyxerr[Debug::LATEX]
+               lyxerr[Debug::DEPEND]
                        << "Not a file or we are unable to find it."
                        << endl;
        }
@@ -632,10 +637,9 @@ void LaTeX::deptex(DepTable & head)
                        tmp = ChangeExtension(file,
                                              all_files[i].extension,
                                              true);
-                       lyxerr[Debug::LATEX] << "deptex: " << tmp << endl;
+                       lyxerr[Debug::DEPEND] << "deptex: " << tmp << endl;
                        if (fi.newFile(tmp).exist())
                                head.insert(tmp);
                }
        }
 }
-