sys/sys/ctype_inline.h: merged
Change-Id: I0a04b7729b2226ce601cadceebfb6878302c64d1
This commit is contained in:
parent
df23a7e418
commit
d1ae7749c8
1 changed files with 14 additions and 14 deletions
|
@ -44,20 +44,20 @@
|
|||
#include <sys/featuretest.h>
|
||||
|
||||
#include <sys/ctype_bits.h>
|
||||
/* LSC: cast to unsigned char in order to prevent char as indice errors. */
|
||||
#define isdigit(c) ((int)((_ctype_ + 1)[(unsigned char)(c)] & _CTYPE_N))
|
||||
#define islower(c) ((int)((_ctype_ + 1)[(unsigned char)(c)] & _CTYPE_L))
|
||||
#define isspace(c) ((int)((_ctype_ + 1)[(unsigned char)(c)] & _CTYPE_S))
|
||||
#define ispunct(c) ((int)((_ctype_ + 1)[(unsigned char)(c)] & _CTYPE_P))
|
||||
#define isupper(c) ((int)((_ctype_ + 1)[(unsigned char)(c)] & _CTYPE_U))
|
||||
#define isalpha(c) ((int)((_ctype_ + 1)[(unsigned char)(c)] & (_CTYPE_U|_CTYPE_L)))
|
||||
#define isxdigit(c) ((int)((_ctype_ + 1)[(unsigned char)(c)] & (_CTYPE_N|_CTYPE_X)))
|
||||
#define isalnum(c) ((int)((_ctype_ + 1)[(unsigned char)(c)] & (_CTYPE_U|_CTYPE_L|_CTYPE_N)))
|
||||
#define isprint(c) ((int)((_ctype_ + 1)[(unsigned char)(c)] & (_CTYPE_P|_CTYPE_U|_CTYPE_L|_CTYPE_N|_CTYPE_B)))
|
||||
#define isgraph(c) ((int)((_ctype_ + 1)[(unsigned char)(c)] & (_CTYPE_P|_CTYPE_U|_CTYPE_L|_CTYPE_N)))
|
||||
#define iscntrl(c) ((int)((_ctype_ + 1)[(unsigned char)(c)] & _CTYPE_C))
|
||||
#define tolower(c) ((int)((_tolower_tab_ + 1)[(unsigned char)(c)]))
|
||||
#define toupper(c) ((int)((_toupper_tab_ + 1)[(unsigned char)(c)]))
|
||||
|
||||
#define isdigit(c) ((int)((_ctype_ + 1)[(c)] & _CTYPE_N))
|
||||
#define islower(c) ((int)((_ctype_ + 1)[(c)] & _CTYPE_L))
|
||||
#define isspace(c) ((int)((_ctype_ + 1)[(c)] & _CTYPE_S))
|
||||
#define ispunct(c) ((int)((_ctype_ + 1)[(c)] & _CTYPE_P))
|
||||
#define isupper(c) ((int)((_ctype_ + 1)[(c)] & _CTYPE_U))
|
||||
#define isalpha(c) ((int)((_ctype_ + 1)[(c)] & (_CTYPE_U|_CTYPE_L)))
|
||||
#define isxdigit(c) ((int)((_ctype_ + 1)[(c)] & (_CTYPE_N|_CTYPE_X)))
|
||||
#define isalnum(c) ((int)((_ctype_ + 1)[(c)] & (_CTYPE_U|_CTYPE_L|_CTYPE_N)))
|
||||
#define isprint(c) ((int)((_ctype_ + 1)[(c)] & (_CTYPE_P|_CTYPE_U|_CTYPE_L|_CTYPE_N|_CTYPE_B)))
|
||||
#define isgraph(c) ((int)((_ctype_ + 1)[(c)] & (_CTYPE_P|_CTYPE_U|_CTYPE_L|_CTYPE_N)))
|
||||
#define iscntrl(c) ((int)((_ctype_ + 1)[(c)] & _CTYPE_C))
|
||||
#define tolower(c) ((int)((_tolower_tab_ + 1)[(c)]))
|
||||
#define toupper(c) ((int)((_toupper_tab_ + 1)[(c)]))
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
|
||||
#define isascii(c) ((unsigned)(c) <= 0177)
|
||||
|
|
Loading…
Reference in a new issue