home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / libc / limits.h < prev    next >
C/C++ Source or Header  |  1999-03-15  |  2KB  |  79 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 __limits_h
  10.    #define __limits_h
  11.  
  12.    #ifdef __cplusplus
  13.       extern "C" {
  14.    #endif
  15.  
  16.    /********************************************************************/
  17.    /*  <limits.h> header file                                          */
  18.    /*                                                                  */
  19.    /*  (C) Copyright IBM Corp. 1991, 1995.                             */
  20.    /*  - Licensed Material - Program-Property of IBM                   */
  21.    /*  - All rights reserved                                           */
  22.    /*                                                                  */
  23.    /********************************************************************/
  24.  
  25.    #define CHAR_BIT      8
  26.  
  27.    #define SCHAR_MIN     (-128)
  28.    #define SCHAR_MAX     127
  29.    #define UCHAR_MAX     255
  30.  
  31.    #ifdef _CHAR_UNSIGNED
  32.       #define CHAR_MIN      0
  33.       #define CHAR_MAX      UCHAR_MAX
  34.    #else
  35.       #define CHAR_MIN      SCHAR_MIN
  36.       #define CHAR_MAX      SCHAR_MAX
  37.    #endif
  38.  
  39.    #define MB_LEN_MAX    4
  40.  
  41.    #define NL_ARGMAX     255  /* max number of indexed printf args           */
  42.    #define NL_MSGMAX   65535  /* max number of messages per set              */
  43.    #define NL_SETMAX   65535  /* max number of set per catalog               */
  44.    #define NL_TEXTMAX   8192  /* max message length in bytes                 */
  45.    #define NL_LANGMAX     14  /* max number of of bytes in a LANG name       */
  46.    #define NL_NMAX        10  /* max number of bytes in N-to-1 mapping chars */
  47.  
  48.  
  49.    #define SHRT_MIN      (-32768)
  50.    #define SHRT_MAX      32767
  51.    #define USHRT_MAX     65535
  52.  
  53.    #define INT_MIN       (-2147483647 - 1)
  54.    #define INT_MAX       2147483647
  55.    #define UINT_MAX      0xffffffff          /* 4294967295  */
  56.  
  57.    #define LONG_MIN      (-2147483647L - 1)
  58.    #define LONG_MAX      2147483647
  59.    #define ULONG_MAX     0xffffffff          /* 4294967295U */
  60.  
  61.    #define LONGLONG_MIN  0x8000000000000000LL
  62.    #define LONGLONG_MAX  0x7fffffffffffffffLL
  63.    #define ULONGLONG_MAX 0xffffffffffffffffULL
  64.  
  65.    #ifdef __cplusplus
  66.       }
  67.    #endif
  68.  
  69. #endif
  70.  
  71. #if __IBMC__ || __IBMCPP__
  72. #pragma info( none )
  73. #ifndef __CHKHDR__
  74.    #pragma info( restore )
  75. #endif
  76. #pragma info( restore )
  77. #endif
  78.  
  79.