2010-05-11 21:42:16 +02:00
|
|
|
// -*- C++ -*-
|
|
|
|
//===--------------------------- cwctype ----------------------------------===//
|
|
|
|
//
|
2010-05-11 23:36:01 +02:00
|
|
|
// The LLVM Compiler Infrastructure
|
2010-05-11 21:42:16 +02:00
|
|
|
//
|
2010-11-16 23:09:02 +01:00
|
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
|
|
// Source Licenses. See LICENSE.TXT for details.
|
2010-05-11 21:42:16 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef _LIBCPP_CWCTYPE
|
|
|
|
#define _LIBCPP_CWCTYPE
|
|
|
|
|
|
|
|
/*
|
|
|
|
cwctype synopsis
|
|
|
|
|
|
|
|
Macros:
|
|
|
|
|
|
|
|
WEOF
|
2010-08-22 02:02:43 +02:00
|
|
|
|
2010-05-11 21:42:16 +02:00
|
|
|
namespace std
|
|
|
|
{
|
|
|
|
|
|
|
|
Types:
|
|
|
|
|
|
|
|
wint_t
|
|
|
|
wctrans_t
|
|
|
|
wctype_t
|
|
|
|
|
|
|
|
int iswalnum(wint_t wc);
|
|
|
|
int iswalpha(wint_t wc);
|
|
|
|
int iswblank(wint_t wc); // C99
|
|
|
|
int iswcntrl(wint_t wc);
|
|
|
|
int iswdigit(wint_t wc);
|
|
|
|
int iswgraph(wint_t wc);
|
|
|
|
int iswlower(wint_t wc);
|
|
|
|
int iswprint(wint_t wc);
|
|
|
|
int iswpunct(wint_t wc);
|
|
|
|
int iswspace(wint_t wc);
|
|
|
|
int iswupper(wint_t wc);
|
|
|
|
int iswxdigit(wint_t wc);
|
|
|
|
int iswctype(wint_t wc, wctype_t desc);
|
|
|
|
wctype_t wctype(const char* property);
|
|
|
|
wint_t towlower(wint_t wc);
|
|
|
|
wint_t towupper(wint_t wc);
|
|
|
|
wint_t towctrans(wint_t wc, wctrans_t desc);
|
|
|
|
wctrans_t wctrans(const char* property);
|
|
|
|
|
|
|
|
} // std
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <__config>
|
|
|
|
#include <cctype>
|
|
|
|
#include <wctype.h>
|
|
|
|
|
2011-10-17 22:05:10 +02:00
|
|
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
2010-05-11 21:42:16 +02:00
|
|
|
#pragma GCC system_header
|
2011-10-17 22:05:10 +02:00
|
|
|
#endif
|
2010-05-11 21:42:16 +02:00
|
|
|
|
|
|
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
|
|
|
|
|
|
|
using ::wint_t;
|
|
|
|
using ::wctrans_t;
|
|
|
|
using ::wctype_t;
|
|
|
|
|
|
|
|
#ifdef iswalnum
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswalnum(wint_t __wc) {return iswalnum(__wc);}
|
|
|
|
#undef iswalnum
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswalnum(wint_t __wc) {return __libcpp_iswalnum(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswalnum
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswalnum;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iswalpha
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswalpha(wint_t __wc) {return iswalpha(__wc);}
|
|
|
|
#undef iswalpha
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswalpha(wint_t __wc) {return __libcpp_iswalpha(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswalpha
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswalpha;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iswblank
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswblank(wint_t __wc) {return iswblank(__wc);}
|
|
|
|
#undef iswblank
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswblank(wint_t __wc) {return __libcpp_iswblank(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswblank
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswblank;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iswcntrl
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswcntrl(wint_t __wc) {return iswcntrl(__wc);}
|
|
|
|
#undef iswcntrl
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswcntrl(wint_t __wc) {return __libcpp_iswcntrl(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswcntrl
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswcntrl;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iswdigit
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswdigit(wint_t __wc) {return iswdigit(__wc);}
|
|
|
|
#undef iswdigit
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswdigit(wint_t __wc) {return __libcpp_iswdigit(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswdigit
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswdigit;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iswgraph
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswgraph(wint_t __wc) {return iswgraph(__wc);}
|
|
|
|
#undef iswgraph
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswgraph(wint_t __wc) {return __libcpp_iswgraph(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswgraph
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswgraph;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iswlower
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswlower(wint_t __wc) {return iswlower(__wc);}
|
|
|
|
#undef iswlower
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswlower(wint_t __wc) {return __libcpp_iswlower(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswlower
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswlower;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iswprint
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswprint(wint_t __wc) {return iswprint(__wc);}
|
|
|
|
#undef iswprint
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswprint(wint_t __wc) {return __libcpp_iswprint(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswprint
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswprint;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iswpunct
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswpunct(wint_t __wc) {return iswpunct(__wc);}
|
|
|
|
#undef iswpunct
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswpunct(wint_t __wc) {return __libcpp_iswpunct(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswpunct
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswpunct;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iswspace
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswspace(wint_t __wc) {return iswspace(__wc);}
|
|
|
|
#undef iswspace
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswspace(wint_t __wc) {return __libcpp_iswspace(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswspace
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswspace;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iswupper
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswupper(wint_t __wc) {return iswupper(__wc);}
|
|
|
|
#undef iswupper
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswupper(wint_t __wc) {return __libcpp_iswupper(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswupper
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswupper;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iswxdigit
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswxdigit(wint_t __wc) {return iswxdigit(__wc);}
|
|
|
|
#undef iswxdigit
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswxdigit(wint_t __wc) {return __libcpp_iswxdigit(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswxdigit
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswxdigit;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef iswctype
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iswctype(wint_t __w, wctype_t __d) {return iswctype(__w, __d);}
|
|
|
|
#undef iswctype
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iswctype(wint_t __w, wctype_t __d) {return __libcpp_iswctype(__w, __d);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // iswctype
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::iswctype;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef wctype
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY wctype_t __libcpp_wctype(const char* __p) {return wctype(__p);}
|
|
|
|
#undef wctype
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY wctype_t wctype(const char* __p) {return __libcpp_wctype(__p);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // wctype
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::wctype;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef towlower
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY wint_t __libcpp_towlower(wint_t __wc) {return towlower(__wc);}
|
|
|
|
#undef towlower
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY wint_t towlower(wint_t __wc) {return __libcpp_towlower(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // towlower
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::towlower;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef towupper
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY wint_t __libcpp_towupper(wint_t __wc) {return towupper(__wc);}
|
|
|
|
#undef towupper
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY wint_t towupper(wint_t __wc) {return __libcpp_towupper(__wc);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // towupper
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::towupper;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef towctrans
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY wint_t __libcpp_towctrans(wint_t __wc, wctype_t __d) {return towctrans(__wc, __d);}
|
|
|
|
#undef towctrans
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY wint_t towctrans(wint_t __wc, wctype_t __d) {return __libcpp_towctrans(__wc, __d);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // towctrans
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::towctrans;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef wctrans
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY wctrans_t __libcpp_wctrans(const char* __p) {return wctrans(__p);}
|
|
|
|
#undef wctrans
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY wctrans_t wctrans(const char* __p) {return __libcpp_wctrans(__p);}
|
2010-08-22 02:02:43 +02:00
|
|
|
#else // wctrans
|
2010-05-11 21:42:16 +02:00
|
|
|
using ::wctrans;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
_LIBCPP_END_NAMESPACE_STD
|
|
|
|
|
|
|
|
#endif // _LIBCPP_CWCTYPE
|