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