Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.5 KiB

  1. /***
  2. *limits.h - implementation dependent values
  3. *
  4. * Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * Contains defines for a number of implementation dependent values
  8. * which are commonly used in C programs.
  9. * [ANSI]
  10. *
  11. ****/
  12. #ifndef _INC_LIMITS
  13. #define CHAR_BIT 8 /* number of bits in a char */
  14. #define SCHAR_MIN (-127) /* minimum signed char value */
  15. #define SCHAR_MAX 127 /* maximum signed char value */
  16. #define UCHAR_MAX 0xff /* maximum unsigned char value */
  17. #ifndef _CHAR_UNSIGNED
  18. #define CHAR_MIN SCHAR_MIN /* mimimum char value */
  19. #define CHAR_MAX SCHAR_MAX /* maximum char value */
  20. #else
  21. #define CHAR_MIN 0
  22. #define CHAR_MAX UCHAR_MAX
  23. #ifndef __cplusplus
  24. unsigned int _charmax; /* unsigned CHAR_MAX value */
  25. #else
  26. extern "C" unsigned int _charmax; /* unsigned CHAR_MAX value */
  27. static unsigned int *_char_max = &_charmax;
  28. #endif
  29. #endif
  30. #define MB_LEN_MAX 2 /* max. # bytes in multibyte char */
  31. #define SHRT_MIN (-32767) /* minimum (signed) short value */
  32. #define SHRT_MAX 32767 /* maximum (signed) short value */
  33. #define USHRT_MAX 0xffff /* maximum unsigned short value */
  34. #define INT_MIN (-32767) /* minimum (signed) int value */
  35. #define INT_MAX 32767 /* maximum (signed) int value */
  36. #define UINT_MAX 0xffff /* maximum unsigned int value */
  37. #define LONG_MIN (-2147483647) /* minimum (signed) long value */
  38. #define LONG_MAX 2147483647 /* maximum (signed) long value */
  39. #define ULONG_MAX 0xffffffff /* maximum unsigned long value */
  40. #define _INC_LIMITS
  41. #endif /* _INC_LIMITS */