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