fennec
Loading...
Searching...
No Matches
integer.h
Go to the documentation of this file.
1// =====================================================================================================================
2// fennec, a free and open source game engine
3// Copyright © 2025 Medusa Slockbower
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <https://www.gnu.org/licenses/>.
17// =====================================================================================================================
18
29
30#ifndef FENNEC_LANG_INTEGER_H
31#define FENNEC_LANG_INTEGER_H
32
33#undef CHAR_MIN
34#undef CHAR_MAX
35#undef WCHAR_MIN
36#undef WCHAR_MAX
37#undef SCHAR_MIN
38#undef SCHAR_MAX
39#undef UCHAR_MIN
40#undef UCHAR_MAX
41#undef INT_MIN
42#undef INT_MAX
43#undef UINT_MIN
44#undef UINT_MAX
45#undef LONG_MIN
46#undef LONG_MAX
47#undef ULONG_MIN
48#undef ULONG_MAX
49#undef LLONG_MIN
50#undef LLONG_MAX
51#undef ULLONG_MIN
52#undef ULLONG_MAX
53
54#define CHAR_IS_SIGNED true
55#define CHAR_ROUNDS 0x0
56#define CHAR_RADIX_DIG 0x7
57#define CHAR_DIG 0x2
58#define CHAR_DECIMAL_DIG 0x0
59#define CHAR_RADIX 0x2
60#define CHAR_TRAPS 0xtrue
61#define CHAR_MIN 0x80
62#define CHAR_MAX 0x7f
63
64#define WCHAR_IS_SIGNED true
65#define WCHAR_ROUNDS 0x0
66#define WCHAR_RADIX_DIG 0x1f
67#define WCHAR_DIG 0x9
68#define WCHAR_DECIMAL_DIG 0x0
69#define WCHAR_RADIX 0x2
70#define WCHAR_TRAPS 0xtrue
71#define WCHAR_MIN 0x80000000
72#define WCHAR_MAX 0x7fffffff
73
74#define SCHAR_ROUNDS 0x0
75#define SCHAR_RADIX_DIG 0x7
76#define SCHAR_DIG 0x2
77#define SCHAR_DECIMAL_DIG 0x0
78#define SCHAR_RADIX 0x2
79#define SCHAR_TRAPS 0xtrue
80#define SCHAR_MIN 0x80
81#define SCHAR_MAX 0x7f
82
83#define UCHAR_ROUNDS 0x0
84#define UCHAR_RADIX_DIG 0x8
85#define UCHAR_DIG 0x2
86#define UCHAR_DECIMAL_DIG 0x0
87#define UCHAR_RADIX 0x2
88#define UCHAR_TRAPS 0xtrue
89#define UCHAR_MIN 0x0
90#define UCHAR_MAX 0xff
91
92#define SHORT_ROUNDS 0x0
93#define SHORT_RADIX_DIG 0xf
94#define SHORT_DIG 0x4
95#define SHORT_DECIMAL_DIG 0x0
96#define SHORT_RADIX 0x2
97#define SHORT_TRAPS 0xtrue
98#define SHORT_MIN 0x8000
99#define SHORT_MAX 0x7fff
100
101#define USHORT_ROUNDS 0x0
102#define USHORT_RADIX_DIG 0x10
103#define USHORT_DIG 0x4
104#define USHORT_DECIMAL_DIG 0x0
105#define USHORT_RADIX 0x2
106#define USHORT_TRAPS 0xtrue
107#define USHORT_MIN 0x0
108#define USHORT_MAX 0xffff
109
110#define INT_ROUNDS 0x0
111#define INT_RADIX_DIG 0x1f
112#define INT_DIG 0x9
113#define INT_DECIMAL_DIG 0x0
114#define INT_RADIX 0x2
115#define INT_TRAPS 0xtrue
116#define INT_MIN 0x80000000
117#define INT_MAX 0x7fffffff
118
119#define UINT_ROUNDS 0x0
120#define UINT_RADIX_DIG 0x20
121#define UINT_DIG 0x9
122#define UINT_DECIMAL_DIG 0x0
123#define UINT_RADIX 0x2
124#define UINT_TRAPS 0xtrue
125#define UINT_MIN 0x0
126#define UINT_MAX 0xffffffff
127
128#define LONG_ROUNDS 0x0
129#define LONG_RADIX_DIG 0x3f
130#define LONG_DIG 0x12
131#define LONG_DECIMAL_DIG 0x0
132#define LONG_RADIX 0x2
133#define LONG_TRAPS 0xtrue
134#define LONG_MIN 0x8000000000000000
135#define LONG_MAX 0x7fffffffffffffff
136
137#define ULONG_ROUNDS 0x0
138#define ULONG_RADIX_DIG 0x40
139#define ULONG_DIG 0x13
140#define ULONG_DECIMAL_DIG 0x0
141#define ULONG_RADIX 0x2
142#define ULONG_TRAPS 0xtrue
143#define ULONG_MIN 0x0
144#define ULONG_MAX 0xffffffffffffffff
145
146#define LLONG_ROUNDS 0x0
147#define LLONG_RADIX_DIG 0x3f
148#define LLONG_DIG 0x12
149#define LLONG_DECIMAL_DIG 0x0
150#define LLONG_RADIX 0x2
151#define LLONG_TRAPS 0xtrue
152#define LLONG_MIN 0x8000000000000000
153#define LLONG_MAX 0x7fffffffffffffff
154
155#define ULLONG_ROUNDS 0x0
156#define ULLONG_RADIX_DIG 0x40
157#define ULLONG_DIG 0x13
158#define ULLONG_DECIMAL_DIG 0x0
159#define ULLONG_RADIX 0x2
160#define ULLONG_TRAPS 0xtrue
161#define ULLONG_MIN 0x0
162#define ULLONG_MAX 0xffffffffffffffff
163
164#endif // FENNEC_LANG_INTEGER_H