2003-05-17 11:45:48 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Copyright (c) 1998-2002
|
|
|
|
* Dr John Maddock
|
|
|
|
*
|
2003-10-04 11:29:20 +00:00
|
|
|
* Use, modification and distribution are subject to the
|
2003-09-30 13:02:51 +00:00
|
|
|
* Boost Software License, Version 1.0. (See accompanying file
|
|
|
|
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
2003-05-17 11:45:48 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* LOCATION: see http://www.boost.org for most recent version.
|
|
|
|
* FILE boost/regex/config/cstring.hpp
|
|
|
|
* VERSION see <boost/version.hpp>
|
|
|
|
* DESCRIPTION: regex narrow character string fixes.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BOOST_REGEX_CONFIG_CSTRING_HPP
|
|
|
|
#define BOOST_REGEX_CONFIG_CSTRING_HPP
|
|
|
|
|
|
|
|
#include <cstring>
|
|
|
|
#include <cctype>
|
2003-07-12 10:33:10 +00:00
|
|
|
#ifndef __sgi
|
2003-05-25 11:16:14 +00:00
|
|
|
#ifdef __KCC
|
|
|
|
#include <ios>
|
|
|
|
#endif
|
2003-05-17 11:45:48 +00:00
|
|
|
#include <boost/config.hpp>
|
|
|
|
|
|
|
|
namespace std{
|
|
|
|
|
2003-08-12 11:23:02 +00:00
|
|
|
#ifdef __BORLANDC__
|
|
|
|
#pragma option push -w-8008 -w-8066 -w-8004
|
2003-05-17 11:45:48 +00:00
|
|
|
#endif
|
|
|
|
|
2003-08-12 11:23:02 +00:00
|
|
|
#ifdef BOOST_NO_STDC_NAMESPACE
|
|
|
|
|
2003-05-17 11:45:48 +00:00
|
|
|
// Any function that is a macro is converted into an inline function:
|
|
|
|
#ifdef memcmp
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int boost_memcmp(const void * p1, const void * p2, size_t s)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return memcmp(p1, p2, s); }
|
|
|
|
#undef memcmp
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int memcmp(const void * p1, const void * p2, size_t s)
|
|
|
|
{ return boost_memcmp(p1, p2, s); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::memcmp;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef memcpy
|
2003-08-12 11:23:02 +00:00
|
|
|
inline void *boost_memcpy(void * p1, const void *p2, size_t s)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return memcpy(p1, p2, s); }
|
|
|
|
#undef memcpy
|
2003-08-12 11:23:02 +00:00
|
|
|
inline void *memcpy(void * p1, const void *p2, size_t s)
|
|
|
|
{ return boost_memcpy(p1, p2, s); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::memcpy;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef memmove
|
|
|
|
inline void *(memmove)(void *, const void *, size_t)
|
|
|
|
{ return memmove(p1,p2,s); }
|
|
|
|
#undef memmove
|
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::memmove;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef memset
|
2003-08-12 11:23:02 +00:00
|
|
|
inline void *(boost_memset)(void *p, int a, size_t b)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return memset(p,a,b); }
|
|
|
|
#undef memset
|
2003-08-12 11:23:02 +00:00
|
|
|
inline void *(memset)(void *p, int a, size_t b)
|
|
|
|
{ return boost_memset(p,a,b); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::memset;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef strcat
|
2003-08-12 11:23:02 +00:00
|
|
|
inline char *(boost_strcat)(char *p1, const char *p2)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return strcat(p1,p2); }
|
|
|
|
#undef strcat
|
2003-08-12 11:23:02 +00:00
|
|
|
inline char *(strcat)(char *p1, const char *p2)
|
|
|
|
{ return boost_strcat(p1,p2); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::strcat;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef strcmp
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_strcmp)(const char *p1, const char *p2)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return strcmp(p1,p2); }
|
|
|
|
#undef strcmp
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (strcmp)(const char *p1, const char *p2)
|
|
|
|
{ return boost_strcmp(p1,p2); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::strcmp;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef strcoll
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_strcoll) (const char *p1, const char *p2)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return strcoll(p1,p2); }
|
|
|
|
#undef strcoll
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (strcoll) (const char *p1, const char *p2)
|
|
|
|
{ return boost_strcoll(p1,p2); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::strcoll;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef strcpy
|
2003-08-12 11:23:02 +00:00
|
|
|
inline char *(boost_strcpy)(char *p1, const char *p2)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return strcpy(p1,p2); }
|
|
|
|
#undef strcpy
|
2003-08-12 11:23:02 +00:00
|
|
|
inline char *(strcpy)(char *p1, const char *p2)
|
|
|
|
{ return boost_strcpy(p1,p2); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::strcpy;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef strlen
|
2003-08-12 11:23:02 +00:00
|
|
|
inline size_t (boost_strlen)(const char *p)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return strlen(p); }
|
|
|
|
#undef strlen
|
2003-08-12 11:23:02 +00:00
|
|
|
inline size_t (strlen)(const char *p)
|
|
|
|
{ return boost_strlen(p); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::strlen;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef strxfrm
|
2003-08-12 11:23:02 +00:00
|
|
|
inline size_t (boost_strxfrm)(char *p1, const char *p2, size_t s)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return strxfrm(p1,p2,s); }
|
|
|
|
#undef strxfrm
|
2003-08-12 11:23:02 +00:00
|
|
|
inline size_t (strxfrm)(char *p1, const char *p2, size_t s)
|
|
|
|
{ return boost_strxfrm(p1,p2,s); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::strxfrm;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef isalnum
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_isalnum)(int i)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return isalnum(i); }
|
|
|
|
#undef isalnum
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (isalnum)(int i)
|
|
|
|
{ return boost_isalnum(i); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::isalnum;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef isalpha
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_isalpha)(int i)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return isalpha(i); }
|
|
|
|
#undef isalpha
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (isalpha)(int i)
|
|
|
|
{ return boost_isalpha(i); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::isalpha;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iscntrl
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_iscntrl)(int i)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return iscntrl(i); }
|
|
|
|
#undef iscntrl
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (iscntrl)(int i)
|
|
|
|
{ return boost_iscntrl(i); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::iscntrl;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef isdigit
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_isdigit)(int i)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return isdigit(i); }
|
|
|
|
#undef isdigit
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (isdigit)(int i)
|
|
|
|
{ return boost_isdigit(i); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::isdigit;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef isgraph
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_isgraph)(int i)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return isgraph(i); }
|
|
|
|
#undef isgraph
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (isgraph)(int i)
|
|
|
|
{ return boost_isgraph(i); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::isgraph;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef islower
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_islower)(int i)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return islower(i); }
|
|
|
|
#undef islower
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (islower)(int i)
|
|
|
|
{ return boost_islower(i); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::islower;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef isprint
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_isprint)(int i)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return isprint(i); }
|
|
|
|
#undef isprint
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (isprint)(int i)
|
|
|
|
{ return boost_isprint(i); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::isprint;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ispunct
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_ispunct)(int i)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return ispunct(i); }
|
|
|
|
#undef ispunct
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (ispunct)(int i)
|
|
|
|
{ return boost_ispunct(i); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::ispunct;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef isspace
|
|
|
|
inline int (isspace)(int i)
|
|
|
|
{ return isspace(i); }
|
2003-08-12 11:23:02 +00:00
|
|
|
#undef isspace
|
|
|
|
inline int (boost_isspace)(int i)
|
|
|
|
{ return boost_isspace(i); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::isspace;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef isupper
|
|
|
|
inline int (isupper)(int i)
|
|
|
|
{ return isupper(i); }
|
|
|
|
#undef isupper
|
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::isupper;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef isxdigit
|
|
|
|
inline int (isxdigit)(int i)
|
|
|
|
{ return isxdigit(i); }
|
|
|
|
#undef isxdigit
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_isxdigit)(int i)
|
|
|
|
{ return boost_isxdigit(i); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::isxdigit;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef tolower
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_tolower)(int i)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return tolower(i); }
|
|
|
|
#undef tolower
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (tolower)(int i)
|
|
|
|
{ return boost_tolower(i); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::tolower;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef toupper
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (boost_toupper)(int i)
|
2003-05-17 11:45:48 +00:00
|
|
|
{ return toupper(i); }
|
|
|
|
#undef toupper
|
2003-08-12 11:23:02 +00:00
|
|
|
inline int (toupper)(int i)
|
|
|
|
{ return boost_toupper(i); }
|
2003-05-17 11:45:48 +00:00
|
|
|
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
|
|
using ::toupper;
|
|
|
|
#endif
|
|
|
|
|
2003-08-12 11:23:02 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
#undef memcmp
|
|
|
|
#undef memcpy
|
|
|
|
#undef memmove
|
|
|
|
#undef memset
|
|
|
|
#undef strcat
|
|
|
|
#undef strcmp
|
|
|
|
#undef strcoll
|
|
|
|
#undef strcpy
|
|
|
|
#undef strlen
|
|
|
|
#undef strxfrm
|
|
|
|
#undef isalnum
|
|
|
|
#undef isalpha
|
|
|
|
#undef iscntrl
|
|
|
|
#undef isdigit
|
|
|
|
#undef isgraph
|
|
|
|
#undef islower
|
|
|
|
#undef isprint
|
|
|
|
#undef ispunct
|
|
|
|
#undef isspace
|
|
|
|
#undef isupper
|
|
|
|
#undef isxdigit
|
|
|
|
#undef tolower
|
|
|
|
#undef toupper
|
|
|
|
|
2003-05-17 11:45:48 +00:00
|
|
|
#endif
|
|
|
|
|
2003-08-26 10:49:41 +00:00
|
|
|
|
|
|
|
#ifdef __BORLANDC__
|
|
|
|
#pragma option pop
|
|
|
|
#endif
|
|
|
|
|
2003-05-17 11:45:48 +00:00
|
|
|
} // namespace std
|
|
|
|
|
2003-07-12 10:33:10 +00:00
|
|
|
#endif // __sgi
|
|
|
|
|
2003-05-17 11:45:48 +00:00
|
|
|
#endif
|
2003-09-30 13:02:51 +00:00
|
|
|
|