]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
Fix my breakage. Sorry guys.
[lyx.git] / src / buffer.C
index af247044241baeb79d624790f38b939cfbba4327..fabaa9e0ed15f27ae49e780c66fbecd9c9848892 100644 (file)
@@ -65,7 +65,9 @@
 
 #include "support/FileInfo.h"
 #include "support/filetools.h"
-#include "support/gzstream.h"
+#ifdef USE_COMPRESSION
+# include "support/gzstream.h"
+#endif
 #include "support/lyxlib.h"
 #include "support/os.h"
 #include "support/path.h"
@@ -79,6 +81,7 @@
 #include <iomanip>
 #include <stack>
 #include <sstream>
+#include <fstream>
 
 
 using lyx::pos_type;
@@ -143,8 +146,9 @@ int const LYX_FORMAT = 239;
 
 typedef std::map<string, bool> DepClean;
 
-struct Buffer::Impl
+class Buffer::Impl
 {
+public:
        Impl(Buffer & parent, string const & file, bool readonly);
 
        limited_stack<Undo> undostack;
@@ -416,7 +420,7 @@ int Buffer::readHeader(LyXLex & lex)
 
                string unknown = params().readToken(lex, token);
                if (!unknown.empty()) {
-                       if (unknown[0] != '\\' and token == "\\textclass") {
+                       if (unknown[0] != '\\' && token == "\\textclass") {
                                unknownClass(unknown);
                        } else {
                                ++unknown_tokens;
@@ -757,12 +761,15 @@ bool Buffer::writeFile(string const & fname) const
        bool retval = false;
 
        if (params().compressed) {
+#ifdef USE_COMPRESSION
                gz::ogzstream ofs(fname.c_str());
                if (!ofs)
                        return false;
 
                retval = do_writeFile(ofs);
-
+#else
+               return false;
+#endif
        } else {
                ofstream ofs(fname.c_str());
                if (!ofs)
@@ -1458,7 +1465,9 @@ bool Buffer::isUnnamed() const
 }
 
 
+#ifdef WITH_WARNINGS
 #warning this function should be moved to buffer_pimpl.C
+#endif
 void Buffer::markDirty()
 {
        if (pimpl_->lyx_clean) {