mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
* lyxlex_pimpl.[Ch]: don't use '__' in identifiers
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8181 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b36207b449
commit
7c12de7d3d
@ -3,6 +3,8 @@
|
||||
|
||||
* lyxlex.[Ch]: make interface more similar to std::stream
|
||||
|
||||
* lyxlex_pimpl.[Ch]: don't use '__' in identifiers
|
||||
|
||||
2003-12-01 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* lyxtextclass.[Ch]: add latexparam to CharStyle inset
|
||||
|
@ -50,7 +50,7 @@ struct compare_tags {
|
||||
|
||||
|
||||
LyXLex::Pimpl::Pimpl(keyword_item * tab, int num)
|
||||
: is(&fb__), table(tab), no_items(num),
|
||||
: is(&fb_), table(tab), no_items(num),
|
||||
status(0), lineno(0), commentChar('#')
|
||||
{
|
||||
verifyTable();
|
||||
@ -138,35 +138,35 @@ 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_.is_open() || 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);
|
||||
is.rdbuf(&gz__);
|
||||
gz_.open(filename.c_str(), ios::in);
|
||||
is.rdbuf(&gz_);
|
||||
name = filename;
|
||||
lineno = 0;
|
||||
return gz__.is_open() && is.good();
|
||||
return gz_.is_open() && is.good();
|
||||
} else {
|
||||
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
|
||||
// a fresh new filebuf. (JMarc)
|
||||
if (fb__.is_open() || istream::off_type(is.tellg()) > 0)
|
||||
if (fb_.is_open() || istream::off_type(is.tellg()) > 0)
|
||||
lyxerr[Debug::LYXLEX] << "Error in LyXLex::setFile: "
|
||||
"file or stream already set." << endl;
|
||||
fb__.open(filename.c_str(), ios::in);
|
||||
is.rdbuf(&fb__);
|
||||
fb_.open(filename.c_str(), ios::in);
|
||||
is.rdbuf(&fb_);
|
||||
name = filename;
|
||||
lineno = 0;
|
||||
return fb__.is_open() && is.good();
|
||||
return fb_.is_open() && is.good();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::Pimpl::setStream(istream & i)
|
||||
{
|
||||
if (fb__.is_open() || istream::off_type(is.tellg()) > 0)
|
||||
if (fb_.is_open() || istream::off_type(is.tellg()) > 0)
|
||||
lyxerr[Debug::LYXLEX] << "Error in LyXLex::setStream: "
|
||||
"file or stream already set." << endl;
|
||||
is.rdbuf(i.rdbuf());
|
||||
|
@ -53,10 +53,10 @@ struct LyXLex::Pimpl : boost::noncopyable {
|
||||
bool nextToken();
|
||||
///
|
||||
void pushToken(std::string const &);
|
||||
/// fb__ is only used to open files, the stream is accessed through is.
|
||||
std::filebuf fb__;
|
||||
/// gz__ is only used to open files, the stream is accessed through is.
|
||||
gz::gzstreambuf gz__;
|
||||
/// fb_ is only used to open files, the stream is accessed through is.
|
||||
std::filebuf fb_;
|
||||
/// gz_ is only used to open files, the stream is accessed through is.
|
||||
gz::gzstreambuf gz_;
|
||||
|
||||
/// the stream that we use.
|
||||
std::istream is;
|
||||
|
Loading…
Reference in New Issue
Block a user