gCAD3D 2.40
ut_types.h
Go to the documentation of this file.
1 // franz.reiter@cadcam.co.at
2 //
3 // see also ../ut/ut_cast.h
4 // # if __WORDSIZE == 64
5 
6 
7 #include <stdint.h> // ISO-C99 uint32_t ..
8 
9 
10 #ifdef _MSC_VER
11 // Mircosoft - MS32
12 #define INT_8 INT8 // char
13 #define INT_16 signed short // signed short INT16
14 #define INT_32 INT32 // int INT BOOL LONG32
15 #define INT_64 INT64 // long long
16 #define UINT_8 unsigned char // unsigned char BYTE UINT8
17 #define UINT_16 UINT16 // unsigned short WORD
18 #define UINT_32 uint32_t // unsigned int DWORD UINT ULONG32
19 #define UINT_64 uint64_t // unsigned long long
20 #else
21 // GCC - Linux 32,64
22 #define INT_8 char // char __s8
23 #define INT_16 short // signed short __s16
24 #define INT_32 int32_t // int
25 #define INT_64 int64_t // __s64 long long
26 #define UINT_8 unsigned char // unsigned char __u8
27 #define UINT_16 uint16_t // __u16 unsigned short
28 #define UINT_32 uint32_t // __u32 unsigned int
29 #define UINT_64 uint64_t // __u64 unsigned long long
30 #endif
31 
32 
33 #define INT_8_MAX 127 // max val signed char
34 #define INT_16_MAX 32767 // max val signed short
35 #define INT_24_MAX 8388608 // ?
36 #define INT_32_MAX 4294967295 // ?
37 
38 #define UINT_8_MAX 255
39 #define UINT_16_MAX 65535
40 #define UINT_24_MAX 16777216
41 
42 #define FLT_32_MAX 9999999999999.999
43 #define FLT_32_MIN1 0.000001
44 
45 
46 // EOF