/* Copyright 1989, 1990, 1992 Digital Equipment Corporation All rights reserved. This software is furnished under a license and may be used and copied only in accordance with the terms of such license and with the inclusion of the above copyright notice. This software and any copies shall not be provided to any other person. No title to or ownership of the software is hereby transferred. The information in this software is subject to change without notice. DIGITAL assumes no responsibility for the use, functionality or reliability of its software on equipment which is not supplied by DIGITAL. ctype.h Character Type Classification Macros */ #ifndef __CTYPE_H #define __CTYPE_H /* Pointers for locale information: */ extern const char * const __CCTT; extern const char * const __CCUT; extern const char * const __CCLT; /* Definitions: */ #define _U ( 0x01 ) /* Upper Case Alpha */ #define _L ( 0x02 ) /* Lower Case Alpha */ #define _D ( 0x04 ) /* Digit */ #define _S ( 0x08 ) /* White Space */ #define _P ( 0x10 ) /* Punctuation */ #define _C ( 0x20 ) /* Control */ #define _X ( 0x40 ) /* Hex Alpha */ #define _V ( 0x80 ) /* Visible */ #ifndef __STDC__ #define isascii(c) ((int)(c) <= 0x7F) #define __ischar C$ISCH #define toascii(c) ((int)(c) & 0x7F) #define _toupper toupper #define _tolower tolower #endif /* Linkage Definitions: */ #pragma linkage c isalnum, isalpha, iscntrl, isdigit, isgraph #pragma linkage c islower, isprint, ispunct, isspace, isupper #pragma linkage c isxdigit, tolower, toupper, __ischar int isalnum (int __c); int isalpha (int __c); 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); int __ischar (int __c); #define isupper(c) (__CCTT[(int)(c)] & _U) #define islower(c) (__CCTT[(int)(c)] & _L) #define isalpha(c) (__CCTT[(int)(c)] & (_U | _L)) #define isdigit(c) (__CCTT[(int)(c)] & _D) #define isalnum(c) (__CCTT[(int)(c)] & (_U | _L | _D)) #define isxdigit(c) (__CCTT[(int)(c)] & _X) #define isspace(c) (__CCTT[(int)(c)] & _S) #define ispunct(c) (__CCTT[(int)(c)] & _P) #define isgraph(c) (__CCTT[(int)(c)] & (_P | _U | _L | _D)) #define isprint(c) (__CCTT[(int)(c)] & (_P | _U | _L | _D | _V)) #define iscntrl(c) (__CCTT[(int)(c)] & _C) #define toupper(c) (__CCUT[(int)(c)]) #define tolower(c) (__CCLT[(int)(c)]) #endif