Mercurial > projects > hoofbaby
comparison deps/Platinum/ThirdParty/Neptune/Source/Core/NptTypes.h @ 0:3425707ddbf6
Initial import (hopefully this mercurial stuff works...)
author | fraserofthenight |
---|---|
date | Mon, 06 Jul 2009 08:06:28 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3425707ddbf6 |
---|---|
1 /***************************************************************** | |
2 | | |
3 | Neptune - Types | |
4 | | |
5 | Copyright (c) 2002-2008, Axiomatic Systems, LLC. | |
6 | All rights reserved. | |
7 | | |
8 | Redistribution and use in source and binary forms, with or without | |
9 | modification, are permitted provided that the following conditions are met: | |
10 | * Redistributions of source code must retain the above copyright | |
11 | notice, this list of conditions and the following disclaimer. | |
12 | * Redistributions in binary form must reproduce the above copyright | |
13 | notice, this list of conditions and the following disclaimer in the | |
14 | documentation and/or other materials provided with the distribution. | |
15 | * Neither the name of Axiomatic Systems nor the | |
16 | names of its contributors may be used to endorse or promote products | |
17 | derived from this software without specific prior written permission. | |
18 | | |
19 | THIS SOFTWARE IS PROVIDED BY AXIOMATIC SYSTEMS ''AS IS'' AND ANY | |
20 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
22 | DISCLAIMED. IN NO EVENT SHALL AXIOMATIC SYSTEMS BE LIABLE FOR ANY | |
23 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | |
26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
29 | | |
30 ****************************************************************/ | |
31 | |
32 #ifndef _NPT_TYPES_H_ | |
33 #define _NPT_TYPES_H_ | |
34 | |
35 /*---------------------------------------------------------------------- | |
36 | includes | |
37 +---------------------------------------------------------------------*/ | |
38 #include "NptConfig.h" | |
39 | |
40 /*---------------------------------------------------------------------- | |
41 | sized types (this assumes that ints are 32 bits) | |
42 +---------------------------------------------------------------------*/ | |
43 typedef NPT_CONFIG_INT64_TYPE NPT_Int64; | |
44 typedef unsigned NPT_CONFIG_INT64_TYPE NPT_UInt64; | |
45 typedef unsigned int NPT_UInt32; | |
46 typedef int NPT_Int32; | |
47 typedef unsigned short NPT_UInt16; | |
48 typedef short NPT_Int16; | |
49 typedef unsigned char NPT_UInt8; | |
50 typedef char NPT_Int8; | |
51 typedef float NPT_Float; | |
52 | |
53 /*---------------------------------------------------------------------- | |
54 | named types | |
55 +---------------------------------------------------------------------*/ | |
56 typedef int NPT_Result; | |
57 typedef unsigned int NPT_Cardinal; | |
58 typedef unsigned int NPT_Ordinal; | |
59 typedef unsigned long NPT_Size; | |
60 typedef NPT_UInt64 NPT_LargeSize; | |
61 typedef signed long NPT_Offset; | |
62 typedef NPT_UInt64 NPT_Position; | |
63 typedef long NPT_Timeout; | |
64 typedef void NPT_Interface; | |
65 typedef unsigned char NPT_Byte; | |
66 typedef unsigned int NPT_Flags; | |
67 typedef void* NPT_Any; | |
68 typedef const void* NPT_AnyConst; | |
69 | |
70 /*---------------------------------------------------------------------- | |
71 | limits | |
72 +---------------------------------------------------------------------*/ | |
73 #if !defined(NPT_INT_MIN) | |
74 #if defined(NPT_CONFIG_HAVE_INT_MIN) | |
75 #define NPT_INT_MIN INT_MIN | |
76 #endif | |
77 #endif | |
78 | |
79 #if !defined(NPT_INT_MAX) | |
80 #if defined(NPT_CONFIG_HAVE_INT_MAX) | |
81 #define NPT_INT_MAX INT_MAX | |
82 #endif | |
83 #endif | |
84 | |
85 #if !defined(NPT_UINT_MAX) | |
86 #if defined(NPT_CONFIG_HAVE_UINT_MAX) | |
87 #define NPT_UINT_MAX UINT_MAX | |
88 #endif | |
89 #endif | |
90 | |
91 #if !defined(NPT_LONG_MIN) | |
92 #if defined(NPT_CONFIG_HAVE_LONG_MIN) | |
93 #define NPT_LONG_MIN LONG_MIN | |
94 #endif | |
95 #endif | |
96 | |
97 #if !defined(NPT_LONG_MAX) | |
98 #if defined(NPT_CONFIG_HAVE_LONG_MAX) | |
99 #define NPT_LONG_MAX LONG_MAX | |
100 #endif | |
101 #endif | |
102 | |
103 #if !defined(NPT_ULONG_MAX) | |
104 #if defined(NPT_CONFIG_HAVE_ULONG_MAX) | |
105 #define NPT_ULONG_MAX ULONG_MAX | |
106 #endif | |
107 #endif | |
108 | |
109 #if !defined(NPT_INT32_MAX) | |
110 #define NPT_INT32_MAX 0x7FFFFFFF | |
111 #endif | |
112 | |
113 #if !defined(NPT_INT32_MIN) | |
114 #define NPT_INT32_MIN (-NPT_INT32_MAX - 1) | |
115 #endif | |
116 | |
117 #if !defined(NPT_UINT32_MAX) | |
118 #define NPT_UINT32_MAX 0xFFFFFFFF | |
119 #endif | |
120 | |
121 #if !defined(NPT_INT64_MAX) | |
122 #if defined(NPT_CONFIG_HAVE_LLONG_MAX) | |
123 #define NPT_INT64_MAX LLONG_MAX | |
124 #else | |
125 #define NPT_INT64_MAX 0x7FFFFFFFFFFFFFFFLL | |
126 #endif | |
127 #endif | |
128 | |
129 #if !defined(NPT_INT64_MIN) | |
130 #if defined(NPT_CONFIG_HAVE_LLONG_MIN) | |
131 #define NPT_INT64_MIN LLONG_MIN | |
132 #else | |
133 #define NPT_INT64_MIN (-NPT_INT64_MAX - 1LL) | |
134 #endif | |
135 #endif | |
136 | |
137 #if !defined(NPT_UINT64_MAX) | |
138 #if defined(NPT_CONFIG_HAVE_ULLONG_MAX) | |
139 #define NPT_UINT64_MAX ULLONG_MAX | |
140 #else | |
141 #define NPT_UINT64_MAX 0xFFFFFFFFFFFFFFFFULL | |
142 #endif | |
143 #endif | |
144 | |
145 #endif // _NPT_TYPES_H_ |