home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / libc / ctype.h < prev    next >
C/C++ Source or Header  |  1999-03-15  |  3KB  |  101 lines

  1. #if __IBMC__ || __IBMCPP__
  2. #pragma info( none )
  3. #ifndef __CHKHDR__
  4.    #pragma info( none )
  5. #endif
  6. #pragma info( restore )
  7. #endif
  8.  
  9. #ifndef __ctype_h
  10.    #define __ctype_h
  11.  
  12.    #ifdef __cplusplus
  13.       extern "C" {
  14.    #endif
  15.  
  16.    #ifndef  _LNK_CONV
  17.       #if __IBMC__ || __IBMCPP__ || defined(_OPTLINK_SUPPORTED)
  18.          #define _LNK_CONV   _Optlink
  19.       #else
  20.          #define _LNK_CONV
  21.       #endif
  22.    #endif
  23.  
  24.    #ifndef _IMPORT
  25.       #ifdef __IMPORTLIB__
  26.          #define _IMPORT _Import
  27.       #else
  28.          #define _IMPORT
  29.       #endif
  30.    #endif
  31.  
  32.    /********************************************************************/
  33.    /*  <ctype.h> header file                                           */
  34.    /*                                                                  */
  35.    /*  (C) Copyright IBM Corp. 1991, 1995.                             */
  36.    /*  - Licensed Material - Program-Property of IBM                   */
  37.    /*  - All rights reserved                                           */
  38.    /*                                                                  */
  39.    /********************************************************************/
  40.  
  41.    extern int _IMPORT _LNK_CONV isalnum( int );
  42.    extern int _IMPORT _LNK_CONV isalpha( int );
  43.    extern int _IMPORT _LNK_CONV iscntrl( int );
  44.    extern int _IMPORT _LNK_CONV isdigit( int );
  45.    extern int _IMPORT _LNK_CONV isgraph( int );
  46.    extern int _IMPORT _LNK_CONV islower( int );
  47.    extern int _IMPORT _LNK_CONV isprint( int );
  48.    extern int _IMPORT _LNK_CONV ispunct( int );
  49.    extern int _IMPORT _LNK_CONV isspace( int );
  50.    extern int _IMPORT _LNK_CONV isupper( int );
  51.    extern int _IMPORT _LNK_CONV isxdigit( int );
  52.    extern int _IMPORT _LNK_CONV tolower( int );
  53.    extern int _IMPORT _LNK_CONV toupper( int );
  54.  
  55.    #if defined(__EXTENDED__)
  56.  
  57.       int _LNK_CONV _tolower( int );
  58.       int _LNK_CONV _toupper( int );
  59.       int _LNK_CONV _isascii( int );
  60.       int _LNK_CONV _iscsymf( int );
  61.       int _LNK_CONV _iscsym( int );
  62.       int _LNK_CONV _toascii( int );
  63.  
  64.       #define _tolower( c ) ( (c) + 'a' - 'A' )
  65.       #define _toupper( c ) ( (c) + 'A' - 'a' )
  66.       #define _isascii( c ) ( (unsigned)(c) < 0x80 )
  67.       #define _iscsymf( c ) ( isalpha( c ) || (c) == '_' )
  68.       #define _iscsym( c )  ( isalnum( c ) || (c) == '_' )
  69.       #define _toascii( c ) ( (c) & 0x7f )
  70.  
  71.       extern int _IMPORT _LNK_CONV isblank( int );
  72.  
  73.       #ifdef __cplusplus
  74.          inline int isascii( int c ) { return _isascii( c ); }
  75.          inline int iscsymf( int c ) { return _iscsymf( c ); }
  76.          inline int iscsym ( int c ) { return _iscsym ( c ); }
  77.          inline int toascii( int c ) { return _toascii( c ); }
  78.       #else
  79.          #define  isascii( c )        _isascii( c )
  80.          #define  iscsymf( c )        _iscsymf( c )
  81.          #define  iscsym( c )         _iscsym( c )
  82.          #define  toascii( c )        _toascii( c )
  83.       #endif
  84.  
  85.    #endif
  86.  
  87.    #ifdef __cplusplus
  88.       }
  89.    #endif
  90.  
  91. #endif
  92.  
  93. #if __IBMC__ || __IBMCPP__
  94. #pragma info( none )
  95. #ifndef __CHKHDR__
  96.    #pragma info( restore )
  97. #endif
  98. #pragma info( restore )
  99. #endif
  100.  
  101.