1999-11-10 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+ * src/support/LRegex.C: use regex_t instead of re_pattern_buffer.
+
+ * src/support/lyxstring.C (helper): fix bogus cast in assertion.
+
* src/{mathed,insets}/Makefile.am (CXXLINK): add $(LDFLAGS) to the
link line, so that Irix users (for example) can set it explicitely to
"-n32".
///
struct LRegex::Impl {
///
- re_pattern_buffer * preg;
+ regex_t * preg;
///
int error_code;
///
Impl(string const & regex)
- : preg(new re_pattern_buffer), error_code(0)
+ : preg(new regex_t), error_code(0)
{
error_code = regcomp(preg, regex.c_str(), REG_EXTENDED);
}
Assert(object->rep->res); // always some space allocated
Assert(object->rep->sz <= object->rep->res);
Assert(object->rep->ref >= 1); // its in use so it must be referenced
- Assert(object->rep->ref < static_cast<size_t>(1 << (8 * sizeof(object->rep->ref) - 1)));
+ Assert(object->rep->ref < static_cast<size_t>(1) << (8 * sizeof(object->rep->ref) - 1));
// if it does ever == then we should be generating a new copy
// and starting again. (Is char always 8-bits?)
}