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
c3242ac4 1/*
2 Copyright (c) 2002-2013, ShadowFlare <blakflare@hotmail.com>
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
7 are met:
8
9 1. Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11 2. Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in the
13 documentation and/or other materials provided with the distribution.
14
15 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
16 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 SUCH DAMAGE.
26*/
27
cfca19c6 28#ifndef SFTYPES_INCLUDED
29#define SFTYPES_INCLUDED
30
31#if defined(_WIN32) || defined(_WIN64)
32
33typedef signed char Int8;
34typedef signed short Int16;
35typedef signed long Int32;
36typedef signed __int64 Int64;
37
38#ifdef _WIN64
39typedef signed __int64 IntPtr;
40#else
41typedef signed int IntPtr;
42#endif
43
44typedef unsigned char UInt8;
45typedef unsigned short UInt16;
46typedef unsigned long UInt32;
47typedef unsigned __int64 UInt64;
48
49#ifdef _WIN64
50typedef unsigned __int64 UIntPtr;
51#else
52typedef unsigned int UIntPtr;
53#endif
54
55#else
56
57#include <stdint.h>
58
59typedef int8_t Int8;
60typedef int16_t Int16;
61typedef int32_t Int32;
62typedef int64_t Int64;
63typedef intptr_t IntPtr;
64
65typedef uint8_t UInt8;
66typedef uint16_t UInt16;
67typedef uint32_t UInt32;
68typedef uint64_t UInt64;
69typedef uintptr_t UIntPtr;
70
71#endif
72
73union IntConv {
74 Int8 i8[8];
75 UInt8 ui8[8];
76 Int16 i16[4];
77 UInt16 ui16[4];
78 Int32 i32[2];
79 UInt32 ui32[2];
80 Int64 i64;
81 UInt64 ui64;
82};
83
84#endif // #ifndef SFTYPES_INCLUDED