home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue2 / SDL.ARC / !gcc / include / libscl / h / limits < prev    next >
Encoding:
Text File  |  2004-09-05  |  1.8 KB  |  69 lines

  1. /* limits.h
  2.  
  3.    For use with the GNU compilers and the SharedCLibrary.
  4.    (c) Copyright 1997, Nick Burrett.  */
  5.  
  6. #ifndef __LIMITS_H
  7. #define __LIMITS_H
  8.  
  9. /* Number of bits in a 'char'.  */
  10. #define CHAR_BIT    8
  11.  
  12. /* Minimum value that can be represented by a 'signed char'.  */
  13. #define SCHAR_MIN    (-0x80)
  14.  
  15. /* Maximum values that can be represented by a 'signed char'
  16.    and 'unsigned char', respectively.  */
  17. #define SCHAR_MAX    0x7f
  18. #define UCHAR_MAX    0xff
  19.  
  20. /* Minimum and maximum values that can be represented by a 'char'.  */
  21. #define CHAR_MIN    0x00
  22. #define CHAR_MAX    0xff
  23.  
  24. /* Maximum length of a multibyte character.  */
  25. #define MB_LEN_MAX    1
  26.  
  27. /* Minimum value that can be represented by a 'signed short int'.  */
  28. #define SHRT_MIN    (short)(0x8000U)
  29.  
  30. /* Maximum values that can be represented by a 'signed short int'
  31.    and 'unsigned short int', respectively.  */
  32. #define SHRT_MAX    0x7fff
  33. #define USHRT_MAX    0xffffU
  34.  
  35. /* Minimum value that can be represented by a 'signed int'.  */
  36. #define INT_MIN     (int)(0x80000000U)
  37.  
  38. /* Maximum values that can be represented by a 'signed int'
  39.    and 'unsigned int'.  */
  40. #define INT_MAX     0x7fffffff
  41. #define UINT_MAX    0xffffffffU
  42.  
  43. /* The number of bits in a 'long int'.  */
  44. #define LONGBITS 32
  45.  
  46. /* Minimum value that can be represented by a 'signed long int'.  */
  47. #define LONG_MIN    (long)(0x80000000UL)
  48.  
  49. /* Maximum values that can be represented by a 'signed long int'
  50.    and 'unsigned long int'.  */
  51. #define LONG_MAX    0x7fffffffL
  52. #define ULONG_MAX    0xffffffffUL
  53.  
  54. #ifdef __GNUC__
  55. /* For GNU C 'long long' compatibility only.  */
  56.  
  57. /* The minimum value that can be represented by a
  58.    'signed long long int'.  */
  59. #define LONG_LONG_MIN    0x8000000000000000LL
  60.  
  61. /* The maximum values that can be represented by a
  62.    'signed long long int' and 'unsigned long long int'.  */
  63. #define LONG_LONG_MAX    0x7fffffffffffffffLL
  64. #define ULONG_LONG_MAX    0xffffffffffffffffULL
  65.  
  66. #endif
  67.  
  68. #endif
  69.