]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlex_pimpl.C
* remove various xforms relicts, in particular:
[lyx.git] / src / lyxlex_pimpl.C
index 81a6e65c010fb0564a10d435b9e5e21b7c1bbc6b..481c579c9bb6a9a84f020f8fec28e8c9f2530ed0 100644 (file)
@@ -24,7 +24,7 @@
 
 using lyx::support::compare_ascii_no_case;
 using lyx::support::getFormatFromContents;
-using lyx::support::MakeDisplayPath;
+using lyx::support::makeDisplayPath;
 using lyx::support::split;
 using lyx::support::subst;
 
@@ -73,7 +73,7 @@ void LyXLex::Pimpl::printError(string const & message) const
 {
        string const tmpmsg = subst(message, "$$Token", getString());
        lyxerr << "LyX: " << tmpmsg << " [around line " << lineno
-              << " of file " << MakeDisplayPath(name) << ']' << endl;
+              << " of file " << makeDisplayPath(name) << ']' << endl;
 }
 
 
@@ -143,14 +143,15 @@ bool LyXLex::Pimpl::setFile(string const & filename)
                // 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)
-               if (gz_.is_open() || istream::off_type(is.tellg()) > -1)
+               if (!gz_.empty() || istream::off_type(is.tellg()) > -1)
                        lyxerr[Debug::LYXLEX] << "Error in LyXLex::setFile: "
                                "file or stream already set." << endl;
-               gz_.open(filename.c_str(), ios::in);
+               gz_.push(io::gzip_decompressor());
+               gz_.push(io::file_source(filename));
                is.rdbuf(&gz_);
                name = filename;
                lineno = 0;
-               return gz_.is_open() && is.good();
+               return gz_.component<io::file_source>(1)->is_open() && is.good();
        } else {
                lyxerr[Debug::LYXLEX] << "lyxlex: UNcompressed" << endl;