mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
Use correct types when working with stream::pos_type.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7958 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fd8e0d71b8
commit
84a91f5ebf
@ -1,3 +1,8 @@
|
||||
2003-10-23 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* libs/regex/src/cpp_regex_traits.cpp (seekpos): use correct
|
||||
types. same patch sent to boost list and accepted there.
|
||||
|
||||
2003-10-07 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* boost/any.hpp: change the throw to boost::throw_exception.
|
||||
|
@ -8,11 +8,11 @@
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE: c_regex_traits.cpp
|
||||
@ -161,9 +161,9 @@ parser_buf<charT, traits>::seekpos(pos_type sp, ::std::ios_base::openmode which)
|
||||
return pos_type(off_type(-1));
|
||||
std::ptrdiff_t size = this->egptr() - this->eback();
|
||||
charT* g = this->eback();
|
||||
if(sp <= size)
|
||||
if(off_type(sp) <= size)
|
||||
{
|
||||
this->setg(g, g + ::std::streamsize(sp), g + size);
|
||||
this->setg(g, g + off_type(sp), g + size);
|
||||
}
|
||||
return pos_type(off_type(-1));
|
||||
}
|
||||
@ -218,7 +218,7 @@ message_data<char>::message_data(const std::locale& l, const std::string& regex_
|
||||
#else
|
||||
BOOST_REGEX_NOEH_ASSERT(cat >= 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
std::memset(syntax_map, cpp_regex_traits<char>::syntax_char, 256);
|
||||
unsigned i;
|
||||
@ -691,7 +691,7 @@ message_data<wchar_t>::message_data(const std::locale& l, const std::string& reg
|
||||
|
||||
if((int)cat >= 0)
|
||||
msgs.close(cat);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace re_detail
|
||||
@ -876,5 +876,3 @@ std::size_t BOOST_REGEX_CALL cpp_regex_traits<wchar_t>::strwiden(wchar_t *s1, st
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-10-23 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* lyxlex_pimpl.C (setFile,setStream): be sure to use correct types
|
||||
when woring with stream::pos_type
|
||||
* paragraph_pimpl.C (simpleTeXSpecialChars): ditto
|
||||
|
||||
2003-10-22 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
@ -24,7 +29,7 @@
|
||||
|
||||
2003-10-22 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* text.C: fixed an "oops" in the "is a bit silly"
|
||||
* text.C: fixed an "oops" in the "is a bit silly"
|
||||
bug fix
|
||||
|
||||
2003-10-21 André Pönitz <poenitz@gmx.net>
|
||||
@ -52,7 +57,7 @@
|
||||
2003-10-20 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* text.C: re-introduce display() for insets, fixing the
|
||||
various bugs (stretch of line above, math inset
|
||||
various bugs (stretch of line above, math inset
|
||||
positioning, ...)
|
||||
|
||||
2003-10-20 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
@ -138,7 +138,7 @@ 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() || is.tellg() > 0)
|
||||
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);
|
||||
@ -152,7 +152,7 @@ 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 (fb__.is_open() || 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);
|
||||
@ -166,7 +166,7 @@ bool LyXLex::Pimpl::setFile(string const & filename)
|
||||
|
||||
void LyXLex::Pimpl::setStream(istream & i)
|
||||
{
|
||||
if (fb__.is_open() || 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());
|
||||
|
@ -523,8 +523,8 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
||||
}
|
||||
|
||||
bool close = false;
|
||||
int const len = os.tellp();
|
||||
//ostream::pos_type const len = os.tellp();
|
||||
ostream::pos_type const len = os.tellp();
|
||||
|
||||
if ((inset->lyxCode() == InsetOld::GRAPHICS_CODE
|
||||
|| inset->lyxCode() == InsetOld::MATH_CODE
|
||||
|| inset->lyxCode() == InsetOld::URL_CODE)
|
||||
@ -562,7 +562,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
||||
texrow.start(owner_->id(), i + 1);
|
||||
column = 0;
|
||||
} else {
|
||||
column += int(os.tellp()) - len;
|
||||
column += os.tellp() - len;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user