1
0

values.h 846 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _VALUES_H
  2. #define _VALUES_H
  3. #include <limits.h>
  4. #define CHARBITS (sizeof(char) * 8)
  5. #define SHORTBITS (sizeof(short) * 8)
  6. #define INTBITS (sizeof(int) * 8)
  7. #define LONGBITS (sizeof(long) * 8)
  8. #define PTRBITS (sizeof(char *) * 8)
  9. #define DOUBLEBITS (sizeof(double) * 8)
  10. #define FLOATBITS (sizeof(float) * 8)
  11. #define MINSHORT SHRT_MIN
  12. #define MININT INT_MIN
  13. #define MINLONG LONG_MIN
  14. #define MAXSHORT SHRT_MAX
  15. #define MAXINT INT_MAX
  16. #define MAXLONG LONG_MAX
  17. #define HIBITS MINSHORT
  18. #define HIBITL MINLONG
  19. #include <float.h>
  20. #define MAXDOUBLE DBL_MAX
  21. #undef MAXFLOAT
  22. #define MAXFLOAT FLT_MAX
  23. #define MINDOUBLE DBL_MIN
  24. #define MINFLOAT FLT_MIN
  25. #define DMINEXP DBL_MIN_EXP
  26. #define FMINEXP FLT_MIN_EXP
  27. #define DMAXEXP DBL_MAX_EXP
  28. #define FMAXEXP FLT_MAX_EXP
  29. #define BITSPERBYTE CHAR_BIT
  30. #endif