]> git.lyx.org Git - lyx.git/blobdiff - src/tests/check_layout.cpp
DocBook: fix file inclusion.
[lyx.git] / src / tests / check_layout.cpp
index fca644699c1433ec04f84944c25c97b72803d236..039d51b22289325679fb513565dc93493a7f3708 100644 (file)
 #include "../support/Package.h"
 
 #include <cstdlib>
+#include <fstream>
 #include <iostream>
+#include <sstream>
+using namespace std;
 
 
 namespace lyx {
 namespace frontend {
 namespace Alert {
-void warning(docstring const & title, docstring const & message, bool const &)
+void warning(docstring const & title, docstring const & message, bool)
 {
        LYXERR0(title);
        LYXERR0(message);
 }
-}
-}
+} // namespace Alert
+} // namespace frontend
 
 bool LaTeXFeatures::isAvailable(std::string const &)
 {
@@ -35,7 +38,7 @@ bool Formats::isZippedFile(support::FileName const &) const
 {
        return false;
 }
-}
+} // namespace lyx
 
 
 using namespace lyx::support;
@@ -47,14 +50,14 @@ using namespace std;
 bool test_Layout(string const & input, string const & output)
 {
        FileName const ifn(makeAbsPath(input));
-    LayoutFileList & l = LayoutFileList::get();
+       LayoutFileList & l = LayoutFileList::get();
        LayoutFileIndex i = onlyFileName(l.addLocalLayout(ifn.onlyFileName(), ifn.onlyPath().absFileName()));
        if (i.empty()) {
                cerr << "Could not read layout file " << input << ".layout.\n";
                return false;
        }
        LayoutFile const & f = l[i];
-       ostream * os = NULL;
+       ostream * os = nullptr;
        if (output == "-")
                os = &cout;
        else if (!output.empty())
@@ -115,7 +118,7 @@ bool test_Layout(string const & input, string const & output)
 
 int main(int argc, char * argv[])
 {
-       os::init(argc, argv);
+       os::init(argc, &argv);
        lyxerr.setStream(cerr);
        if (argc < 2 || argc > 3) {
                cerr << "Usage: " << argv[0] << " <input layout file> [<output layout file>]\n";