]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlex_pimpl.C
ws changes only
[lyx.git] / src / lyxlex_pimpl.C
index 8ad57be9d0b9bf41e5cda4544278e75c4f450d4b..7b8c580e852af363f2ba437ede14c3c709361c7c 100644 (file)
@@ -1,24 +1,39 @@
+/**
+ * \file lyxlex_pimpl.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Lars Gullik Bjønnes
+ * \author Jean-Marc Lasgouttes
+ * \author Jürgen Vigna
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #include <config.h>
 
 #include "lyxlex_pimpl.h"
+
 #include "debug.h"
 
-#include "support/lyxalgo.h"
 #include "support/filetools.h"
+#include "support/lyxalgo.h"
 #include "support/lstrings.h"
 
-#include <algorithm>
-
-using namespace lyx::support;
+using lyx::support::compare_ascii_no_case;
+using lyx::support::getExtFromContents;
+using lyx::support::MakeDisplayPath;
+using lyx::support::split;
+using lyx::support::subst;
 
+using std::endl;
+using std::getline;
+using std::lower_bound;
 using std::sort;
-using std::ostream;
+using std::string;
 using std::ios;
 using std::istream;
-using std::endl;
-using std::lower_bound;
-using std::vector;
-using std::getline;
+using std::ostream;
 
 // namespace {
 struct compare_tags {
@@ -58,7 +73,7 @@ void LyXLex::Pimpl::printError(string const & message) const
 
 void LyXLex::Pimpl::printTable(ostream & os)
 {
-       os << "\nNumber of tags: " << no_items << '\n';
+       os << "\nNumber of tags: " << no_items << endl;
        for (int i= 0; i < no_items; ++i)
                os << "table[" << i
                   << "]:  tag: `" << table[i].tag
@@ -75,11 +90,11 @@ void LyXLex::Pimpl::verifyTable()
                lyxerr << "The table passed to LyXLex is not sorted!\n"
                       << "Tell the developers to fix it!" << endl;
                // We sort it anyway to avoid problems.
-               lyxerr << "\nUnsorted:\n";
+               lyxerr << "\nUnsorted:" << endl;
                printTable(lyxerr);
 
                sort(table, table + no_items, compare_tags());
-               lyxerr << "\nSorted:\n";
+               lyxerr << "\nSorted:" << endl;
                printTable(lyxerr);
        }
 }
@@ -118,7 +133,7 @@ bool LyXLex::Pimpl::setFile(string const & filename)
        string const format = getExtFromContents(filename);
 
        if (format == "gzip" || format == "zip" || format == "compress") {
-               lyxerr << "lyxlex: compressed" << endl;
+               lyxerr[Debug::LYXLEX] << "lyxlex: compressed" << endl;
 
                // The check only outputs a debug message, because it triggers
                // a bug in compaq cxx 6.2, where is_open() returns 'true' for
@@ -132,7 +147,7 @@ bool LyXLex::Pimpl::setFile(string const & filename)
                lineno = 0;
                return gz__.is_open() && is.good();
        } else {
-               lyxerr << "lyxlex: UNcompressed" << endl;
+               lyxerr[Debug::LYXLEX] << "lyxlex: UNcompressed" << endl;
 
                // The check only outputs a debug message, because it triggers
                // a bug in compaq cxx 6.2, where is_open() returns 'true' for