2010-05-12 03:42:16 +08:00
|
|
|
// -*- C++ -*-
|
|
|
|
//===---------------------------- cctype ----------------------------------===//
|
|
|
|
//
|
2010-05-12 05:36:01 +08:00
|
|
|
// The LLVM Compiler Infrastructure
|
2010-05-12 03:42:16 +08:00
|
|
|
//
|
2010-11-17 06:09:02 +08:00
|
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
|
|
// Source Licenses. See LICENSE.TXT for details.
|
2010-05-12 03:42:16 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef _LIBCPP_CCTYPE
|
|
|
|
#define _LIBCPP_CCTYPE
|
|
|
|
|
|
|
|
/*
|
|
|
|
cctype synopsis
|
|
|
|
|
|
|
|
namespace std
|
|
|
|
{
|
|
|
|
|
|
|
|
int isalnum(int c);
|
|
|
|
int isalpha(int c);
|
|
|
|
int isblank(int c); // C99
|
|
|
|
int iscntrl(int c);
|
|
|
|
int isdigit(int c);
|
|
|
|
int isgraph(int c);
|
|
|
|
int islower(int c);
|
|
|
|
int isprint(int c);
|
|
|
|
int ispunct(int c);
|
|
|
|
int isspace(int c);
|
|
|
|
int isupper(int c);
|
|
|
|
int isxdigit(int c);
|
|
|
|
int tolower(int c);
|
|
|
|
int toupper(int c);
|
|
|
|
|
|
|
|
} // std
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <__config>
|
|
|
|
#include <ctype.h>
|
2011-10-23 04:59:45 +08:00
|
|
|
#if defined(_MSC_VER)
|
|
|
|
#include "support/win32/support.h"
|
|
|
|
#endif // _MSC_VER
|
2010-05-12 03:42:16 +08:00
|
|
|
|
2011-10-18 04:05:10 +08:00
|
|
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
2010-05-12 03:42:16 +08:00
|
|
|
#pragma GCC system_header
|
2011-10-18 04:05:10 +08:00
|
|
|
#endif
|
2010-05-12 03:42:16 +08:00
|
|
|
|
|
|
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
|
|
|
|
|
|
|
#ifdef isalnum
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalnum(int __c) {return isalnum(__c);}
|
|
|
|
#undef isalnum
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int isalnum(int __c) {return __libcpp_isalnum(__c);}
|
|
|
|
#else // isalnum
|
|
|
|
using ::isalnum;
|
|
|
|
#endif // isalnum
|
|
|
|
|
|
|
|
#ifdef isalpha
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalpha(int __c) {return isalpha(__c);}
|
|
|
|
#undef isalpha
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int isalpha(int __c) {return __libcpp_isalpha(__c);}
|
|
|
|
#else // isalpha
|
|
|
|
using ::isalpha;
|
|
|
|
#endif // isalpha
|
|
|
|
|
|
|
|
#ifdef isblank
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isblank(int __c) {return isblank(__c);}
|
|
|
|
#undef isblank
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int isblank(int __c) {return __libcpp_isblank(__c);}
|
|
|
|
#else // isblank
|
|
|
|
using ::isblank;
|
|
|
|
#endif // isblank
|
|
|
|
|
|
|
|
#ifdef iscntrl
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_iscntrl(int __c) {return iscntrl(__c);}
|
|
|
|
#undef iscntrl
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int iscntrl(int __c) {return __libcpp_iscntrl(__c);}
|
|
|
|
#else // iscntrl
|
|
|
|
using ::iscntrl;
|
|
|
|
#endif // iscntrl
|
|
|
|
|
|
|
|
#ifdef isdigit
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isdigit(int __c) {return isdigit(__c);}
|
|
|
|
#undef isdigit
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int isdigit(int __c) {return __libcpp_isdigit(__c);}
|
|
|
|
#else // isdigit
|
|
|
|
using ::isdigit;
|
|
|
|
#endif // isdigit
|
|
|
|
|
|
|
|
#ifdef isgraph
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isgraph(int __c) {return isgraph(__c);}
|
|
|
|
#undef isgraph
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int isgraph(int __c) {return __libcpp_isgraph(__c);}
|
|
|
|
#else // isgraph
|
|
|
|
using ::isgraph;
|
|
|
|
#endif // isgraph
|
|
|
|
|
|
|
|
#ifdef islower
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_islower(int __c) {return islower(__c);}
|
|
|
|
#undef islower
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int islower(int __c) {return __libcpp_islower(__c);}
|
|
|
|
#else // islower
|
|
|
|
using ::islower;
|
|
|
|
#endif // islower
|
|
|
|
|
|
|
|
#ifdef isprint
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isprint(int __c) {return isprint(__c);}
|
|
|
|
#undef isprint
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int isprint(int __c) {return __libcpp_isprint(__c);}
|
|
|
|
#else // isprint
|
|
|
|
using ::isprint;
|
|
|
|
#endif // isprint
|
|
|
|
|
|
|
|
#ifdef ispunct
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_ispunct(int __c) {return ispunct(__c);}
|
|
|
|
#undef ispunct
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int ispunct(int __c) {return __libcpp_ispunct(__c);}
|
|
|
|
#else // ispunct
|
|
|
|
using ::ispunct;
|
|
|
|
#endif // ispunct
|
|
|
|
|
|
|
|
#ifdef isspace
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isspace(int __c) {return isspace(__c);}
|
|
|
|
#undef isspace
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int isspace(int __c) {return __libcpp_isspace(__c);}
|
|
|
|
#else // isspace
|
|
|
|
using ::isspace;
|
|
|
|
#endif // isspace
|
|
|
|
|
|
|
|
#ifdef isupper
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isupper(int __c) {return isupper(__c);}
|
|
|
|
#undef isupper
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int isupper(int __c) {return __libcpp_isupper(__c);}
|
|
|
|
#else // isupper
|
|
|
|
using ::isupper;
|
|
|
|
#endif // isupper
|
|
|
|
|
|
|
|
#ifdef isxdigit
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isxdigit(int __c) {return isxdigit(__c);}
|
|
|
|
#undef isxdigit
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int isxdigit(int __c) {return __libcpp_isxdigit(__c);}
|
|
|
|
#else // isxdigit
|
|
|
|
using ::isxdigit;
|
|
|
|
#endif // isxdigit
|
|
|
|
|
|
|
|
#ifdef tolower
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_tolower(int __c) {return tolower(__c);}
|
|
|
|
#undef tolower
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int tolower(int __c) {return __libcpp_tolower(__c);}
|
|
|
|
#else // tolower
|
|
|
|
using ::tolower;
|
|
|
|
#endif // tolower
|
|
|
|
|
|
|
|
#ifdef toupper
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_toupper(int __c) {return toupper(__c);}
|
|
|
|
#undef toupper
|
|
|
|
inline _LIBCPP_INLINE_VISIBILITY int toupper(int __c) {return __libcpp_toupper(__c);}
|
|
|
|
#else // toupper
|
|
|
|
using ::toupper;
|
|
|
|
#endif // toupper
|
|
|
|
|
|
|
|
_LIBCPP_END_NAMESPACE_STD
|
|
|
|
|
|
|
|
#endif // _LIBCPP_CCTYPE
|