home *** CD-ROM | disk | FTP | other *** search
- #pragma checkout( suspend )
- #ifndef __CHKHDR__
- #pragma checkout( suspend )
- #endif
- #pragma checkout( resume )
-
- #ifndef __ctype_h
- #define __ctype_h
-
- /********************************************************************/
- /* <ctype.h> header file */
- /* */
- /* Licensed Materials - Property of IBM */
- /* */
- /* IBM C Set/2 Version 1.0 */
- /* Copyright (C) International Business Machines Corp., 1991,1992 */
- /* All rights reserved */
- /* */
- /* US Government Users Restricted Rights - */
- /* Use, duplication, or disclosure restricted */
- /* by GSA ADP Schedule Contract with IBM Corp. */
- /* */
- /********************************************************************/
-
- int _Optlink isalnum( int );
- int _Optlink isalpha( int );
- int _Optlink iscntrl( int );
- int _Optlink isdigit( int );
- int _Optlink isgraph( int );
- int _Optlink islower( int );
- int _Optlink isprint( int );
- int _Optlink ispunct( int );
- int _Optlink isspace( int );
- int _Optlink isupper( int );
- int _Optlink isxdigit( int );
- int _Optlink tolower( int );
- int _Optlink toupper( int );
-
- /* masks for using external character table */
- #define __A 0x0100U /* alphabetic (isalpha) */
- #define __U 0x0080U /* uppercase (isupper) */
- #define __L 0x0040U /* lowercase (islower) */
- #define __C 0x0020U /* control (iscntrl) */
- #define __P 0x0010U /* punctuation (ispunct) */
- #define __W 0x0008U /* whitespace (isspace) */
- #define __S 0x0004U /* space */
- #define __D 0x0002U /* decimal (isdigit) */
- #define __X 0x0001U /* hexadecimal (isxdigit) */
-
- /* indexes of toupper/tolower tables in _ctype table */
- #define _TOUPPER_INDEX 257
- #define _TOLOWER_INDEX 514
-
- extern const unsigned short *_ctype;
-
- /* macro definitions */
- #pragma checkout( suspend )
- #define isalnum( c ) ( _ctype[(c)] & (__A | __D) )
- #define isalpha( c ) ( _ctype[(c)] & __A )
- #define iscntrl( c ) ( _ctype[(c)] & __C )
- #define isdigit( c ) ( _ctype[(c)] & __D )
- #define isgraph( c ) ( _ctype[(c)] & (__P | __A | __D) )
- #define islower( c ) ( _ctype[(c)] & __L )
- #define isprint( c ) ( _ctype[(c)] & (__P | __A | __D | __S) )
- #define ispunct( c ) ( _ctype[(c)] & __P )
- #define isspace( c ) ( _ctype[(c)] & __W )
- #define isupper( c ) ( _ctype[(c)] & __U )
- #define isxdigit( c ) ( _ctype[(c)] & __X )
- #define tolower( c ) (signed short)( _ctype[(c) + _TOLOWER_INDEX] )
- #define toupper( c ) (signed short)( _ctype[(c) + _TOUPPER_INDEX] )
- #pragma checkout( resume )
-
- #if (defined(__MIG__) || (defined(__EXTENDED__) && defined(__MIG_LIB__)))
-
- int _Optlink _tolower( int );
- int _Optlink _toupper( int );
- int _Optlink isascii( int );
- int _Optlink iscsymf( int );
- int _Optlink iscsym( int );
- int _Optlink toascii( int );
-
- #pragma checkout( suspend )
- #define _tolower( c ) ( (c) + 'a' - 'A' )
- #define _toupper( c ) ( (c) + 'A' - 'a' )
- #define isascii( c ) ( (unsigned)(c) < 0x80 )
- #define iscsymf( c ) ( isalpha( c ) || (c) == '_' )
- #define iscsym( c ) ( isalnum( c ) || (c) == '_' )
- #define toascii( c ) ( (c) & 0x7f )
- #pragma checkout( resume )
-
- #endif
-
- #endif
-
- #pragma checkout( suspend )
- #ifndef __CHKHDR__
- #pragma checkout( resume )
- #endif
- #pragma checkout( resume )
-