/* ctype.h * Copyright (c) 1990 Intel Corporation, ALL RIGHTS RESERVED. * * ctype.h - character testing and mapping function declarations. */ #ifndef _ctypeh #define _ctypeh #pragma varparams(isalnum, isalpha, iscntrl, isdigit, isgraph, islower) #pragma varparams(isprint, ispunct, isspace, isupper, isxdigit, tolower) #pragma varparams(toupper, isascii, _tolower, _toupper) int isalnum(int); int isalpha(int); int iscntrl(int); int isdigit(int); int isgraph(int); int islower(int); int isprint(int); int ispunct(int); int isspace(int); int isupper(int); int isxdigit(int); int tolower(int); int toupper(int); /* non-ANSI functions */ int isascii(int); int _tolower(int); int _toupper(int); #define L 0x01 #define U 0x02 #define D 0x04 #define S 0x08 #define P 0x10 #define C 0x20 #define X 0x40 #define B 0x80 extern const char _ctype_[]; #define isalnum(_c) (isascii(_c) ? (_ctype_)[_c] & (U|L|D) : 0) #define isalpha(_c) (isascii(_c) ? (_ctype_)[_c] & (U|L) : 0) #define isascii(_c) ((unsigned)(_c) < 0x80) #define iscntrl(_c) (isascii(_c) ? (_ctype_)[_c] & C : 0) #define isdigit(_c) (isascii(_c) ? (_ctype_)[_c] & D : 0) #define isgraph(_c) (isascii(_c) ? (_ctype_)[_c] & (P|U|L|D) : 0) #define islower(_c) (isascii(_c) ? (_ctype_)[_c] & L : 0) #define isprint(_c) (isascii(_c) ? (_ctype_)[_c] & (P|U|L|D|B) : 0) #define ispunct(_c) (isascii(_c) ? (_ctype_)[_c] & P : 0) #define isspace(_c) (isascii(_c) ? (_ctype_)[_c] & S : 0) #define isupper(_c) (isascii(_c) ? (_ctype_)[_c] & U : 0) #define isxdigit(_c) (isascii(_c) ? (_ctype_)[_c] & X : 0) #define _toupper(_c) (isascii(_c) ? (_c) & 0x5f : 0) #define _tolower(_c) (isascii(_c) ? (_c) | 0x20 : 0) #endif /* _ctypeh */