regex: added some missing std:: prefixes, updated Be compiler status page.

[SVN r8354]
This commit is contained in:
John Maddock
2000-11-29 12:48:20 +00:00
parent 2c085b3dc4
commit 91953b9cf2
8 changed files with 28 additions and 26 deletions

View File

@ -56,7 +56,7 @@ regbase::flag_type f = regbase::escape_in_lists | regbase::char_classes | regbas
| regbase::extended | regbase::normal | regbase::emacs | regbase::awk | regbase::grep | regbase::egrep | regbase::sed;
template class reg_expression<test_char_type>;
template class sub_match<ra_it>;
template struct sub_match<ra_it>;
template class match_results<ra_it>;
template bool regex_match(ra_it,

View File

@ -52,7 +52,7 @@ regbase::flag_type f = regbase::escape_in_lists | regbase::char_classes | regbas
| regbase::extended | regbase::normal | regbase::emacs | regbase::awk | regbase::grep | regbase::egrep | regbase::sed;
template class reg_expression<char_type>;
template class sub_match<ra_it>;
template struct sub_match<ra_it>;
template class match_results<ra_it>;
template bool regex_match(ra_it,

View File

@ -169,7 +169,7 @@ class BOOST_RE_IX_DECL mapfile_iterator;
class BOOST_RE_IX_DECL mapfile
{
typedef char* pointer;
FILE* hfile;
std::FILE* hfile;
long int _size;
pointer* _first;
pointer* _last;

View File

@ -162,7 +162,7 @@ inline bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::operator==(c
{
return (_flags == e.flags())
&& (_expression_len == e._expression_len)
&& (memcmp(_expression, e._expression, _expression_len * sizeof(charT)) == 0);
&& (std::memcmp(_expression, e._expression, _expression_len * sizeof(charT)) == 0);
}
template <class charT, class traits, class Allocator>
@ -172,7 +172,7 @@ bool BOOST_RE_CALL reg_expression<charT, traits, Allocator>::operator<(const reg
// we can't offer a diffinitive ordering, but we can be consistant:
if(_flags != e.flags()) return _flags < e.flags();
if(_expression_len != e._expression_len) return _expression_len < e._expression_len;
return memcmp(expression(), e.expression(), _expression_len);
return std::memcmp(expression(), e.expression(), _expression_len);
}
template <class charT, class traits, class Allocator>

View File

@ -287,10 +287,10 @@ Do not change this file unless you really really have to, add options to
#ifdef __BASTRING__
#define BOOST_RE_NO_WCSTRING
#endif
#if defined(__BEOS__)
#define BOOST_RE_NO_WCTYPE_H
#define BOOST_RE_NO_WCSTRING
#endif
//
// for now we'll always define these:
#define BOOST_RE_NO_WCTYPE_H
#define BOOST_RE_NO_WCSTRING
#endif
@ -1249,5 +1249,6 @@ namespace std{

View File

@ -47,9 +47,9 @@ namespace boost{
//
template <class charT>
size_t BOOST_RE_CALL re_strlen(const charT *s)
std::size_t BOOST_RE_CALL re_strlen(const charT *s)
{
size_t len = 0;
std::size_t len = 0;
while(*s)
{
++s;
@ -58,14 +58,14 @@ size_t BOOST_RE_CALL re_strlen(const charT *s)
return len;
}
inline size_t BOOST_RE_CALL re_strlen(const char *s)
inline std::size_t BOOST_RE_CALL re_strlen(const char *s)
{
return std::strlen(s);
}
#ifndef BOOST_RE_NO_WCSTRING
inline size_t BOOST_RE_CALL re_strlen(const wchar_t *s)
inline std::size_t BOOST_RE_CALL re_strlen(const wchar_t *s)
{
return std::wcslen(s);
}
@ -136,3 +136,4 @@ inline void BOOST_RE_CALL re_strfree(charT* p)

View File

@ -275,13 +275,13 @@ void BOOST_RE_CALL re_update_collate()
{
char* p1, *p2, *p3, *p4;;
p1 = buf;
while(*p1 && isspace(*p1))++p1;
while(*p1 && std::isspace(*p1))++p1;
p2 = p1;
while(*p2 && !isspace(*p2))++p2;
while(*p2 && !std::isspace(*p2))++p2;
p3 = p2;
while(*p3 && isspace(*p3))++p3;
while(*p3 && std::isspace(*p3))++p3;
p4 = p3;
while(*p4 && !isspace(*p4))++p4;
while(*p4 && !std::isspace(*p4))++p4;
pcoll_names->push_back(collate_name_t(p1, p2, p3, p4));
++i;
re_get_message(buf, 256, i);
@ -641,15 +641,15 @@ void c_regex_traits<char>::free()
void BOOST_RE_CALL c_regex_traits<char>::transform(std::string& out, const std::string& in)
{
BOOST_RE_GUARD_STACK
size_t n = strxfrm(0, in.c_str(), 0);
if(n == (size_t)(-1))
std::size_t n = std::strxfrm(0, in.c_str(), 0);
if(n == (std::size_t)(-1))
{
out = in;
return;
}
scoped_array<char> buf(new char[n+1]);
n = strxfrm(buf.get(), in.c_str(), n+1);
if(n == (size_t)(-1))
n = std::strxfrm(buf.get(), in.c_str(), n+1);
if(n == (std::size_t)(-1))
{
out = in;
return;
@ -888,20 +888,20 @@ void BOOST_RE_CALL c_regex_traits<wchar_t>::transform(std::basic_string<wchar_t>
{
BOOST_RE_GUARD_STACK
#ifndef BOOST_MSVC
size_t n = std::wcsxfrm(0, in.c_str(), 0);
std::size_t n = std::wcsxfrm(0, in.c_str(), 0);
#else
// broken wcsxfrm under VC6 doesn't check size of
// output buffer, we have no choice but to guess!
size_t n = 100 * in.size();
std::size_t n = 100 * in.size();
#endif
if((n == (size_t)(-1)) || (n == 0))
if((n == (std::size_t)(-1)) || (n == 0))
{
out = in;
return;
}
scoped_array<wchar_t> buf(new wchar_t[n+1]);
n = std::wcsxfrm(buf.get(), in.c_str(), n+1);
if(n == (size_t)(-1))
if(n == (std::size_t)(-1))
{
out = in;
return;

View File

@ -264,7 +264,7 @@ void mapfile::unlock(pointer* node)const
}
}
long int get_file_length(FILE* hfile)
long int get_file_length(std::FILE* hfile)
{
BOOST_RE_GUARD_STACK
long int result;