|
|
@ -1,4 +1,4 @@ |
|
|
|
/* $OpenBSD: ctype.h,v 1.2 1997/09/21 10:45:28 niklas Exp $ */ |
|
|
|
/* $OpenBSD: ctype.h,v 1.3 1998/04/30 05:49:21 deraadt Exp $ */ |
|
|
|
/* $NetBSD: ctype.h,v 1.14 1994/10/26 00:55:47 cgd Exp $ */ |
|
|
|
|
|
|
|
/* |
|
|
@ -82,25 +82,25 @@ extern int _toupper __P ((int)); |
|
|
|
#endif |
|
|
|
__END_DECLS |
|
|
|
|
|
|
|
#define isdigit(c) ((_ctype_ + 1)[c] & _N) |
|
|
|
#define islower(c) ((_ctype_ + 1)[c] & _L) |
|
|
|
#define isspace(c) ((_ctype_ + 1)[c] & _S) |
|
|
|
#define ispunct(c) ((_ctype_ + 1)[c] & _P) |
|
|
|
#define isupper(c) ((_ctype_ + 1)[c] & _U) |
|
|
|
#define isalpha(c) ((_ctype_ + 1)[c] & (_U|_L)) |
|
|
|
#define isxdigit(c) ((_ctype_ + 1)[c] & (_N|_X)) |
|
|
|
#define isalnum(c) ((_ctype_ + 1)[c] & (_U|_L|_N)) |
|
|
|
#define isprint(c) ((_ctype_ + 1)[c] & (_P|_U|_L|_N|_B)) |
|
|
|
#define isgraph(c) ((_ctype_ + 1)[c] & (_P|_U|_L|_N)) |
|
|
|
#define iscntrl(c) ((_ctype_ + 1)[c] & _C) |
|
|
|
#define tolower(c) ((_tolower_tab_ + 1)[c]) |
|
|
|
#define toupper(c) ((_toupper_tab_ + 1)[c]) |
|
|
|
#define isdigit(c) ((_ctype_ + 1)[(unsigned char)(c)] & _N) |
|
|
|
#define islower(c) ((_ctype_ + 1)[(unsigned char)(c)] & _L) |
|
|
|
#define isspace(c) ((_ctype_ + 1)[(unsigned char)(c)] & _S) |
|
|
|
#define ispunct(c) ((_ctype_ + 1)[(unsigned char)(c)] & _P) |
|
|
|
#define isupper(c) ((_ctype_ + 1)[(unsigned char)(c)] & _U) |
|
|
|
#define isalpha(c) ((_ctype_ + 1)[(unsigned char)(c)] & (_U|_L)) |
|
|
|
#define isxdigit(c) ((_ctype_ + 1)[(unsigned char)(c)] & (_N|_X)) |
|
|
|
#define isalnum(c) ((_ctype_ + 1)[(unsigned char)(c)] & (_U|_L|_N)) |
|
|
|
#define isprint(c) ((_ctype_ + 1)[(unsigned char)(c)] & (_P|_U|_L|_N|_B)) |
|
|
|
#define isgraph(c) ((_ctype_ + 1)[(unsigned char)(c)] & (_P|_U|_L|_N)) |
|
|
|
#define iscntrl(c) ((_ctype_ + 1)[(unsigned char)(c)] & _C) |
|
|
|
#define tolower(c) ((_tolower_tab_ + 1)[(unsigned char)(c)]) |
|
|
|
#define toupper(c) ((_toupper_tab_ + 1)[(unsigned char)(c)]) |
|
|
|
|
|
|
|
#if !defined(_ANSI_SOURCE) && !defined (_POSIX_SOURCE) |
|
|
|
#if notyet |
|
|
|
#define isblank(c) ((_ctype_ + 1)[c] & _B) |
|
|
|
#define isblank(c) ((_ctype_ + 1)[(unsigned char)(c)] & _B) |
|
|
|
#endif |
|
|
|
#define isascii(c) ((unsigned)(c) <= 0177) |
|
|
|
#define isascii(c) ((unsigned char)(c) <= 0177) |
|
|
|
#define toascii(c) ((c) & 0177) |
|
|
|
#define _tolower(c) ((c) - 'A' + 'a') |
|
|
|
#define _toupper(c) ((c) - 'a' + 'A') |
|
|
|