image/svg+xml
Brteve's API for EveApps
Version 0.0.1
The reference document for common folder of EveApps project.
 
Loading...
Searching...
No Matches
bt8xxemu_inttypes.h
Go to the documentation of this file.
1
32#include <stddef.h>
33#include <wchar.h>
34#if defined(_MSC_VER) && (_MSC_VER < 1900)
35#ifndef _STDINT
36
37#define _STDINT
38/* 7.18.1.1 Exact-width integer types */
39typedef signed char int8_t;
40typedef short int16_t;
41typedef int int32_t;
42typedef long long int64_t;
43typedef unsigned char uint8_t;
44typedef unsigned short uint16_t;
45typedef unsigned int uint32_t;
46typedef unsigned long long uint64_t;
47
48/* 7.18.1.2 Minimum-width integer types */
49typedef signed char int_least8_t;
50typedef short int_least16_t;
51typedef int int_least32_t;
52typedef long long int_least64_t;
53typedef unsigned char uint_least8_t;
54typedef unsigned short uint_least16_t;
55typedef unsigned int uint_least32_t;
56typedef unsigned long long uint_least64_t;
57
58/* 7.18.1.3 Fastest minimum-width integer types
59* Not actually guaranteed to be fastest for all purposes
60* Here we use the exact-width types for 8 and 16-bit ints.
61*/
62typedef signed char int_fast8_t;
63typedef int int_fast16_t;
64typedef int int_fast32_t;
65typedef long long int_fast64_t;
66typedef unsigned char uint_fast8_t;
67typedef unsigned int uint_fast16_t;
68typedef unsigned int uint_fast32_t;
69typedef unsigned long long uint_fast64_t;
70
71/* 7.18.1.5 Greatest-width integer types */
72typedef long long intmax_t;
73typedef unsigned long long uintmax_t;
74
75/* 7.18.2.1 Limits of exact-width integer types */
76#define INT8_MIN (-127i8 - 1)
77#define INT16_MIN (-32767i16 - 1)
78#define INT32_MIN (-2147483647i32 - 1)
79#define INT64_MIN (-9223372036854775807i64 - 1)
80
81#define INT8_MAX 127i8
82#define INT16_MAX 32767i16
83#define INT32_MAX 2147483647i32
84#define INT64_MAX 9223372036854775807i64
85
86#define UINT8_MAX 0xffui8
87#define UINT16_MAX 0xffffui16
88#define UINT32_MAX 0xffffffffui32
89#define UINT64_MAX 0xffffffffffffffffui64
90
91/* 7.18.2.2 Limits of minimum-width integer types */
92#define INT_LEAST8_MIN INT8_MIN
93#define INT_LEAST16_MIN INT16_MIN
94#define INT_LEAST32_MIN INT32_MIN
95#define INT_LEAST64_MIN INT64_MIN
96
97#define INT_LEAST8_MAX INT8_MAX
98#define INT_LEAST16_MAX INT16_MAX
99#define INT_LEAST32_MAX INT32_MAX
100#define INT_LEAST64_MAX INT64_MAX
101
102#define UINT_LEAST8_MAX UINT8_MAX
103#define UINT_LEAST16_MAX UINT16_MAX
104#define UINT_LEAST32_MAX UINT32_MAX
105#define UINT_LEAST64_MAX UINT64_MAX
106
107/* 7.18.2.3 Limits of fastest minimum-width integer types */
108#define INT_FAST8_MIN INT8_MIN
109#define INT_FAST16_MIN INT16_MIN
110#define INT_FAST32_MIN INT32_MIN
111#define INT_FAST64_MIN INT64_MIN
112
113#define INT_FAST8_MAX INT8_MAX
114#define INT_FAST16_MAX INT16_MAX
115#define INT_FAST32_MAX INT32_MAX
116#define INT_FAST64_MAX INT64_MAX
117
118#define UINT_FAST8_MAX UINT8_MAX
119#define UINT_FAST16_MAX UINT16_MAX
120#define UINT_FAST32_MAX UINT32_MAX
121#define UINT_FAST64_MAX UINT64_MAX
122
123/* 7.18.2.4 Limits of integer types capable of holding object pointers */
124#ifdef _WIN64
125#define INTPTR_MIN INT64_MIN
126#define INTPTR_MAX INT64_MAX
127#define UINTPTR_MAX UINT64_MAX
128#else
129#define INTPTR_MIN INT32_MIN
130#define INTPTR_MAX INT32_MAX
131#define UINTPTR_MAX UINT32_MAX
132#endif
133
134/* 7.18.2.5 Limits of greatest-width integer types */
135#define INTMAX_MIN INT64_MIN
136#define INTMAX_MAX INT64_MAX
137#define UINTMAX_MAX UINT64_MAX
138
139/* 7.18.3 Limits of other integer types */
140#define PTRDIFF_MIN INTPTR_MIN
141#define PTRDIFF_MAX INTPTR_MAX
142
143#define SIG_ATOMIC_MIN INT32_MIN
144#define SIG_ATOMIC_MAX INT32_MAX
145
146#ifndef SIZE_MAX
147#define SIZE_MAX UINTPTR_MAX
148#endif
149
150#ifndef WCHAR_MIN /* also in wchar.h */
151#define WCHAR_MIN 0x0000
152#define WCHAR_MAX 0xffff
153#endif
154
155#define WINT_MIN 0x0000
156#define WINT_MAX 0xffff
157
158/* 7.18.4.1 Macros for minimum-width integer constants */
159#define INT8_C(x) (x)
160#define INT16_C(x) (x)
161#define INT32_C(x) (x)
162#define INT64_C(x) (x##LL)
163
164#define UINT8_C(x) (x)
165#define UINT16_C(x) (x)
166#define UINT32_C(x) (x##U)
167#define UINT64_C(x) (x##ULL)
168
169#define INTMAX_C(x) INT64_C(x)
170#define UINTMAX_C(x) UINT64_C(x)
171
172#endif /* #ifndef _STDINT */
173#else
174#include <stdint.h>
175#include <stdbool.h>
176#endif
177#if defined(_MSC_VER) && (_MSC_VER >= 1900)
178#ifdef __cplusplus
179#ifdef NULL
180#undef NULL
181#endif
182#define BT8XXEMU_INTTYPES_DEFINED_NULL
183#define NULL nullptr
184#endif
185#endif
186#ifndef BT8XXEMU_INTTYPES_DEFINED_COLOR
187#define BT8XXEMU_INTTYPES_DEFINED_COLOR
189#endif
190#ifndef BT8XXEMU_INTTYPES_DEFINED_FORCEINLINE
191#define BT8XXEMU_INTTYPES_DEFINED_FORCEINLINE
192#ifdef _MSC_VER
193#define BT8XXEMU_FORCE_INLINE __forceinline
194#else
195#define BT8XXEMU_FORCE_INLINE inline __attribute__((always_inline))
196#endif
197#endif
long long int_least64_t
unsigned int uint_fast16_t
unsigned short uint16_t
unsigned char uint_fast8_t
int int32_t
unsigned int uint32_t
unsigned int uint_fast32_t
int int_least32_t
unsigned long long uintmax_t
short int_least16_t
long long int_fast64_t
long long int64_t
unsigned int uint_least32_t
int int_fast32_t
unsigned long long uint_least64_t
short int16_t
unsigned long long uint64_t
unsigned char uint_least8_t
unsigned long long uint_fast64_t
unsigned char uint8_t
long long intmax_t
unsigned short uint_least16_t
signed char int_least8_t
signed char int8_t
signed char int_fast8_t
int int_fast16_t
uint32_t argb8888