+2005-01-20 Asger Ottar Alstrup <aalstrup@laerdal.dk>
+
+ * buffer.C:
+ * lyxlex_pimpl.[Ch]: use USE_COMPRESSION guard.
+
+ * output_plaintext.C: remove unneeded #include gzstream.h.
+
2005-01-20 Angus Leeming <leeming@lyx.org>
* SpellBase.h: rename some of the elements of the Result enum.
#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"
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)
if (format == "gzip" || format == "zip" || format == "compress") {
lyxerr[Debug::LYXLEX] << "lyxlex: compressed" << endl;
+#ifdef USE_COMPRESSION
// The check only outputs a debug message, because it triggers
// a bug in compaq cxx 6.2, where is_open() returns 'true' for
// a fresh new filebuf. (JMarc)
name = filename;
lineno = 0;
return gz_.is_open() && is.good();
+#else
+ return false;
+#endif
} else {
lyxerr[Debug::LYXLEX] << "lyxlex: UNcompressed" << endl;
#include "lyxlex.h"
-#include "support/gzstream.h"
+#ifdef USE_COMPRESSION
+# include "support/gzstream.h"
+#endif
#include <boost/utility.hpp>
+#include <istream>
#include <stack>
#include <vector>
void pushToken(std::string const &);
/// fb_ is only used to open files, the stream is accessed through is.
std::filebuf fb_;
+
+#ifdef HAVE_COMPRESSION
/// gz_ is only used to open files, the stream is accessed through is.
gz::gzstreambuf gz_;
+#endif
/// the stream that we use.
std::istream is;
#include "ParagraphList_fwd.h"
#include "ParagraphParameters.h"
-#include "support/gzstream.h"
#include "support/lstrings.h"
+#include <fstream>
+
using lyx::support::ascii_lowercase;
using lyx::support::compare_ascii_no_case;
using lyx::support::compare_no_case;