33 #error "Use this header only with Microsoft Visual C++ compilers!"
36 #ifndef _MSC_INTTYPES_H_ // [
37 #define _MSC_INTTYPES_H_
54 #if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198
57 # define __PRI64_PREFIX "l"
58 # define __PRIPTR_PREFIX "l"
60 # define __PRI64_PREFIX "ll"
61 # define __PRIPTR_PREFIX
67 #define PRIdLEAST8 "d"
68 #define PRIiLEAST8 "i"
74 #define PRIdLEAST16 "hd"
75 #define PRIiLEAST16 "hi"
76 #define PRIdFAST16 "hd"
77 #define PRIiFAST16 "hi"
81 #define PRIdLEAST32 "d"
82 #define PRIiLEAST32 "i"
83 #define PRIdFAST32 "d"
84 #define PRIiFAST32 "i"
86 #define PRId64 __PRI64_PREFIX "d"
87 #define PRIi64 __PRI64_PREFIX "i"
88 #define PRIdLEAST64 __PRI64_PREFIX "d"
89 #define PRIiLEAST64 __PRI64_PREFIX "i"
90 #define PRIdFAST64 __PRI64_PREFIX "d"
91 #define PRIiFAST64 __PRI64_PREFIX "i"
93 #define PRIdMAX __PRI64_PREFIX "d"
94 #define PRIiMAX __PRI64_PREFIX "i"
96 #define PRIdPTR __PRIPTR_PREFIX "d"
97 #define PRIiPTR __PRIPTR_PREFIX "i"
104 #define PRIoLEAST8 "o"
105 #define PRIuLEAST8 "u"
106 #define PRIxLEAST8 "x"
107 #define PRIXLEAST8 "X"
108 #define PRIoFAST8 "o"
109 #define PRIuFAST8 "u"
110 #define PRIxFAST8 "x"
111 #define PRIXFAST8 "X"
117 #define PRIoLEAST16 "ho"
118 #define PRIuLEAST16 "hu"
119 #define PRIxLEAST16 "hx"
120 #define PRIXLEAST16 "hX"
121 #define PRIoFAST16 "ho"
122 #define PRIuFAST16 "hu"
123 #define PRIxFAST16 "hx"
124 #define PRIXFAST16 "hX"
130 #define PRIoLEAST32 "o"
131 #define PRIuLEAST32 "u"
132 #define PRIxLEAST32 "x"
133 #define PRIXLEAST32 "X"
134 #define PRIoFAST32 "o"
135 #define PRIuFAST32 "u"
136 #define PRIxFAST32 "x"
137 #define PRIXFAST32 "X"
139 #define PRIo64 __PRI64_PREFIX "o"
140 #define PRIu64 __PRI64_PREFIX "u"
141 #define PRIx64 __PRI64_PREFIX "x"
142 #define PRIX64 __PRI64_PREFIX "X"
143 #define PRIoLEAST64 __PRI64_PREFIX "o"
144 #define PRIuLEAST64 __PRI64_PREFIX "u"
145 #define PRIxLEAST64 __PRI64_PREFIX "x"
146 #define PRIXLEAST64 __PRI64_PREFIX "X"
147 #define PRIoFAST64 __PRI64_PREFIX "o"
148 #define PRIuFAST64 __PRI64_PREFIX "u"
149 #define PRIxFAST64 __PRI64_PREFIX "x"
150 #define PRIXFAST64 __PRI64_PREFIX "X"
152 #define PRIoMAX __PRI64_PREFIX "o"
153 #define PRIuMAX __PRI64_PREFIX "u"
154 #define PRIxMAX __PRI64_PREFIX "x"
155 #define PRIXMAX __PRI64_PREFIX "X"
157 #define PRIoPTR __PRIPTR_PREFIX "o"
158 #define PRIuPTR __PRIPTR_PREFIX "u"
159 #define PRIxPTR __PRIPTR_PREFIX "x"
160 #define PRIXPTR __PRIPTR_PREFIX "X"
165 #define SCNdLEAST8 "d"
166 #define SCNiLEAST8 "i"
167 #define SCNdFAST8 "d"
168 #define SCNiFAST8 "i"
172 #define SCNdLEAST16 "hd"
173 #define SCNiLEAST16 "hi"
174 #define SCNdFAST16 "hd"
175 #define SCNiFAST16 "hi"
179 #define SCNdLEAST32 "ld"
180 #define SCNiLEAST32 "li"
181 #define SCNdFAST32 "ld"
182 #define SCNiFAST32 "li"
184 #define SCNd64 "I64d"
185 #define SCNi64 "I64i"
186 #define SCNdLEAST64 "I64d"
187 #define SCNiLEAST64 "I64i"
188 #define SCNdFAST64 "I64d"
189 #define SCNiFAST64 "I64i"
191 #define SCNdMAX "I64d"
192 #define SCNiMAX "I64i"
195 # define SCNdPTR "I64d"
196 # define SCNiPTR "I64i"
198 # define SCNdPTR "ld"
199 # define SCNiPTR "li"
207 #define SCNoLEAST8 "o"
208 #define SCNuLEAST8 "u"
209 #define SCNxLEAST8 "x"
210 #define SCNXLEAST8 "X"
211 #define SCNoFAST8 "o"
212 #define SCNuFAST8 "u"
213 #define SCNxFAST8 "x"
214 #define SCNXFAST8 "X"
220 #define SCNoLEAST16 "ho"
221 #define SCNuLEAST16 "hu"
222 #define SCNxLEAST16 "hx"
223 #define SCNXLEAST16 "hX"
224 #define SCNoFAST16 "ho"
225 #define SCNuFAST16 "hu"
226 #define SCNxFAST16 "hx"
227 #define SCNXFAST16 "hX"
233 #define SCNoLEAST32 "lo"
234 #define SCNuLEAST32 "lu"
235 #define SCNxLEAST32 "lx"
236 #define SCNXLEAST32 "lX"
237 #define SCNoFAST32 "lo"
238 #define SCNuFAST32 "lu"
239 #define SCNxFAST32 "lx"
240 #define SCNXFAST32 "lX"
242 #define SCNo64 "I64o"
243 #define SCNu64 "I64u"
244 #define SCNx64 "I64x"
245 #define SCNX64 "I64X"
246 #define SCNoLEAST64 "I64o"
247 #define SCNuLEAST64 "I64u"
248 #define SCNxLEAST64 "I64x"
249 #define SCNXLEAST64 "I64X"
250 #define SCNoFAST64 "I64o"
251 #define SCNuFAST64 "I64u"
252 #define SCNxFAST64 "I64x"
253 #define SCNXFAST64 "I64X"
255 #define SCNoMAX "I64o"
256 #define SCNuMAX "I64u"
257 #define SCNxMAX "I64x"
258 #define SCNXMAX "I64X"
261 # define SCNoPTR "I64o"
262 # define SCNuPTR "I64u"
263 # define SCNxPTR "I64x"
264 # define SCNXPTR "I64X"
266 # define SCNoPTR "lo"
267 # define SCNuPTR "lu"
268 # define SCNxPTR "lx"
269 # define SCNXPTR "lX"
272 #endif // __STDC_FORMAT_MACROS ]
277 #define imaxabs _abs64
283 #ifdef STATIC_IMAXDIV // [
285 #else // STATIC_IMAXDIV ][
287 #endif // STATIC_IMAXDIV ]
292 result.
quot = numer / denom;
293 result.
rem = numer % denom;
295 if (numer < 0 && result.rem > 0) {
305 #define strtoimax _strtoi64
306 #define strtoumax _strtoui64
309 #define wcstoimax _wcstoi64
310 #define wcstoumax _wcstoui64
313 #endif // _MSC_INTTYPES_H_ ]
Definition: inttypes.h:47
_inline imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
Definition: inttypes.h:288
intmax_t rem
Definition: inttypes.h:49
intmax_t quot
Definition: inttypes.h:48
int64_t intmax_t
Definition: stdint.h:123