ReactOS 0.4.17-dev-478-g4117217
inttypes.h
Go to the documentation of this file.
1
6/* 7.8 Format conversion of integer types <inttypes.h> */
7
8#ifndef _INTTYPES_H_
9#define _INTTYPES_H_
10
11#include <corecrt.h>
12#include <stdint.h>
13#include <stddef.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19typedef struct {
22 } imaxdiv_t;
23
24/* 7.8.1 Macros for format specifiers */
25#define PRId64 "lld"
26#define PRIi64 "lli"
27#define PRIo64 "llo"
28#define PRIu64 "llu"
29#define PRIx64 "llx"
30#define PRIX64 "llX"
31
32/* fprintf macros for signed types */
33#define PRId8 "d"
34#define PRId16 "d"
35#define PRId32 "d"
36
37#define PRIdLEAST8 "d"
38#define PRIdLEAST16 "d"
39#define PRIdLEAST32 "d"
40#define PRIdLEAST64 PRId64
41
42#define PRIdFAST8 "d"
43#define PRIdFAST16 "d"
44#define PRIdFAST32 "d"
45#define PRIdFAST64 PRId64
46
47#define PRIdMAX PRId64
48
49#define PRIi8 "i"
50#define PRIi16 "i"
51#define PRIi32 "i"
52
53#define PRIiLEAST8 "i"
54#define PRIiLEAST16 "i"
55#define PRIiLEAST32 "i"
56#define PRIiLEAST64 PRIi64
57
58#define PRIiFAST8 "i"
59#define PRIiFAST16 "i"
60#define PRIiFAST32 "i"
61#define PRIiFAST64 PRIi64
62
63#define PRIiMAX PRIi64
64
65#define PRIo8 "o"
66#define PRIo16 "o"
67#define PRIo32 "o"
68
69#define PRIoLEAST8 "o"
70#define PRIoLEAST16 "o"
71#define PRIoLEAST32 "o"
72#define PRIoLEAST64 PRIo64
73
74#define PRIoFAST8 "o"
75#define PRIoFAST16 "o"
76#define PRIoFAST32 "o"
77#define PRIoFAST64 PRIo64
78
79#define PRIoMAX PRIo64
80
81/* fprintf macros for unsigned types */
82#define PRIu8 "u"
83#define PRIu16 "u"
84#define PRIu32 "u"
85
86
87#define PRIuLEAST8 "u"
88#define PRIuLEAST16 "u"
89#define PRIuLEAST32 "u"
90#define PRIuLEAST64 PRIu64
91
92#define PRIuFAST8 "u"
93#define PRIuFAST16 "u"
94#define PRIuFAST32 "u"
95#define PRIuFAST64 PRIu64
96
97#define PRIuMAX PRIu64
98
99#define PRIx8 "x"
100#define PRIx16 "x"
101#define PRIx32 "x"
102
103#define PRIxLEAST8 "x"
104#define PRIxLEAST16 "x"
105#define PRIxLEAST32 "x"
106#define PRIxLEAST64 PRIx64
107
108#define PRIxFAST8 "x"
109#define PRIxFAST16 "x"
110#define PRIxFAST32 "x"
111#define PRIxFAST64 PRIx64
112
113#define PRIxMAX PRIx64
114
115#define PRIX8 "X"
116#define PRIX16 "X"
117#define PRIX32 "X"
118
119#define PRIXLEAST8 "X"
120#define PRIXLEAST16 "X"
121#define PRIXLEAST32 "X"
122#define PRIXLEAST64 PRIX64
123
124#define PRIXFAST8 "X"
125#define PRIXFAST16 "X"
126#define PRIXFAST32 "X"
127#define PRIXFAST64 PRIX64
128
129#define PRIXMAX PRIX64
130
131/*
132 * fscanf macros for signed int types
133 * NOTE: if 32-bit int is used for int_fast8_t and int_fast16_t
134 * (see stdint.h, 7.18.1.3), FAST8 and FAST16 should have
135 * no length identifiers
136 */
137
138#define SCNd16 "hd"
139#define SCNd32 "d"
140#define SCNd64 PRId64
141
142#define SCNdLEAST16 "hd"
143#define SCNdLEAST32 "d"
144#define SCNdLEAST64 PRId64
145
146#define SCNdFAST16 "hd"
147#define SCNdFAST32 "d"
148#define SCNdFAST64 PRId64
149
150#define SCNdMAX PRId64
151
152#define SCNi16 "hi"
153#define SCNi32 "i"
154#define SCNi64 PRIi64
155
156#define SCNiLEAST16 "hi"
157#define SCNiLEAST32 "i"
158#define SCNiLEAST64 PRIi64
159
160#define SCNiFAST16 "hi"
161#define SCNiFAST32 "i"
162#define SCNiFAST64 PRIi64
163
164#define SCNiMAX PRIi64
165
166#define SCNo16 "ho"
167#define SCNo32 "o"
168#define SCNo64 PRIo64
169
170#define SCNoLEAST16 "ho"
171#define SCNoLEAST32 "o"
172#define SCNoLEAST64 PRIo64
173
174#define SCNoFAST16 "ho"
175#define SCNoFAST32 "o"
176#define SCNoFAST64 PRIo64
177
178#define SCNoMAX PRIo64
179
180#define SCNx16 "hx"
181#define SCNx32 "x"
182#define SCNx64 PRIx64
183
184#define SCNxLEAST16 "hx"
185#define SCNxLEAST32 "x"
186#define SCNxLEAST64 PRIx64
187
188#define SCNxFAST16 "hx"
189#define SCNxFAST32 "x"
190#define SCNxFAST64 PRIx64
191
192#define SCNxMAX PRIx64
193
194/* fscanf macros for unsigned int types */
195
196#define SCNu16 "hu"
197#define SCNu32 "u"
198#define SCNu64 PRIu64
199
200#define SCNuLEAST16 "hu"
201#define SCNuLEAST32 "u"
202#define SCNuLEAST64 PRIu64
203
204#define SCNuFAST16 "hu"
205#define SCNuFAST32 "u"
206#define SCNuFAST64 PRIu64
207
208#define SCNuMAX PRIu64
209
210#ifdef _WIN64
211#define PRIdPTR PRId64
212#define PRIiPTR PRIi64
213#define PRIoPTR PRIo64
214#define PRIuPTR PRIu64
215#define PRIxPTR PRIx64
216#define PRIXPTR PRIX64
217#define SCNdPTR PRId64
218#define SCNiPTR PRIi64
219#define SCNoPTR PRIo64
220#define SCNxPTR PRIx64
221#define SCNuPTR PRIu64
222#else
223#define PRIdPTR "d"
224#define PRIiPTR "i"
225#define PRIoPTR "o"
226#define PRIuPTR "u"
227#define PRIxPTR "x"
228#define PRIXPTR "X"
229#define SCNdPTR "d"
230#define SCNiPTR "i"
231#define SCNoPTR "o"
232#define SCNxPTR "x"
233#define SCNuPTR "u"
234#endif
235
236_ACRTIMP __int64 __cdecl strtoimax(const char*,char**,int);
238_ACRTIMP unsigned __int64 __cdecl strtoumax(const char*,char**,int);
239_ACRTIMP unsigned __int64 __cdecl strtoumax_l(const char*,char**,int,_locale_t);
240
241#ifdef __cplusplus
242}
243#endif
244
245#endif /* ndef _INTTYPES_H */
#define __cdecl
Definition: corecrt.h:121
#define _ACRTIMP
Definition: corecrt.h:153
#define __int64
Definition: corecrt.h:72
_ACRTIMP unsigned __int64 __cdecl strtoumax_l(const char *, char **, int, _locale_t)
_ACRTIMP __int64 __cdecl strtoimax_l(const char *, char **, int, _locale_t)
_ACRTIMP unsigned __int64 __cdecl strtoumax(const char *, char **, int)
Definition: strtox.cpp:189
_ACRTIMP __int64 __cdecl strtoimax(const char *, char **, int)
Definition: strtox.cpp:128
long long intmax_t
Definition: stdint.h:65
intmax_t rem
Definition: inttypes.h:21
intmax_t quot
Definition: inttypes.h:20