Current News
Archived News
Search News
Discussion Forum


Old Forum
Install Programs More Downloads...
Troubleshooting
Source Code
Format Specs.
Misc. Information
Non-SF Stuff
Links




CommitLineData
7214af3e 1// License information for this code is in license.txt
2
1c63ef2a 3#ifndef SFTYPES_INCLUDED
4#define SFTYPES_INCLUDED
5
e0b276af 6#if defined(_WIN32) || defined(_WIN64)
7
1c63ef2a 8typedef signed char Int8;
9typedef signed short Int16;
10typedef signed long Int32;
11typedef signed __int64 Int64;
12
e0b276af 13#ifdef _WIN64
14typedef signed __int64 IntPtr;
15#else
16typedef signed int IntPtr;
17#endif
18
1c63ef2a 19typedef unsigned char UInt8;
20typedef unsigned short UInt16;
21typedef unsigned long UInt32;
22typedef unsigned __int64 UInt64;
23
e0b276af 24#ifdef _WIN64
25typedef unsigned __int64 UIntPtr;
26#else
27typedef unsigned int UIntPtr;
28#endif
29
30#else
31
32#include <stdint.h>
33
34typedef int8_t Int8;
35typedef int16_t Int16;
36typedef int32_t Int32;
37typedef int64_t Int64;
38typedef intptr_t IntPtr;
39
40typedef uint8_t UInt8;
41typedef uint16_t UInt16;
42typedef uint32_t UInt32;
43typedef uint64_t UInt64;
44typedef uintptr_t UIntPtr;
45
46#endif
47
1c63ef2a 48union IntConv {
49 Int8 i8[8];
50 UInt8 ui8[8];
51 Int16 i16[4];
52 UInt16 ui16[4];
53 Int32 i32[2];
54 UInt32 ui32[2];
55 Int64 i64;
56 UInt64 ui64;
57};
58
59#endif // #ifndef SFTYPES_INCLUDED
60