inttypes.h

Engine/source/persistence/rapidjson/msinttypes/inttypes.h

More...

Classes:

Public Defines

define
imaxabs() _abs64
define
PRId16() "hd"
define
PRId32() "I32d"
define
PRId64() "I64d"
define
PRId8() "d"
define
PRIdFAST16() "hd"
define
PRIdFAST32() "I32d"
define
PRIdFAST64() "I64d"
define
PRIdFAST8() "d"
define
PRIdLEAST16() "hd"
define
PRIdLEAST32() "I32d"
define
PRIdLEAST64() "I64d"
define
PRIdLEAST8() "d"
define
PRIdMAX() "I64d"
define
PRIdPTR() "Id"
define
PRIi16() "hi"
define
PRIi32() "I32i"
define
PRIi64() "I64i"
define
PRIi8() "i"
define
PRIiFAST16() "hi"
define
PRIiFAST32() "I32i"
define
PRIiFAST64() "I64i"
define
PRIiFAST8() "i"
define
PRIiLEAST16() "hi"
define
PRIiLEAST32() "I32i"
define
PRIiLEAST64() "I64i"
define
PRIiLEAST8() "i"
define
PRIiMAX() "I64i"
define
PRIiPTR() "Ii"
define
PRIo16() "ho"
define
PRIo32() "I32o"
define
PRIo64() "I64o"
define
PRIo8() "o"
define
PRIoFAST16() "ho"
define
PRIoFAST32() "I32o"
define
PRIoFAST64() "I64o"
define
PRIoFAST8() "o"
define
PRIoLEAST16() "ho"
define
PRIoLEAST32() "I32o"
define
PRIoLEAST64() "I64o"
define
PRIoLEAST8() "o"
define
PRIoMAX() "I64o"
define
PRIoPTR() "Io"
define
PRIu16() "hu"
define
PRIu32() "I32u"
define
PRIu64() "I64u"
define
PRIu8() "u"
define
PRIuFAST16() "hu"
define
PRIuFAST32() "I32u"
define
PRIuFAST64() "I64u"
define
PRIuFAST8() "u"
define
PRIuLEAST16() "hu"
define
PRIuLEAST32() "I32u"
define
PRIuLEAST64() "I64u"
define
PRIuLEAST8() "u"
define
PRIuMAX() "I64u"
define
PRIuPTR() "Iu"
define
PRIx16() "hx"
define
PRIX16() "hX"
define
PRIx32() "I32x"
define
PRIX32() "I32X"
define
PRIx64() "I64x"
define
PRIX64() "I64X"
define
PRIx8() "x"
define
PRIX8() "X"
define
PRIxFAST16() "hx"
define
PRIXFAST16() "hX"
define
PRIxFAST32() "I32x"
define
PRIXFAST32() "I32X"
define
PRIxFAST64() "I64x"
define
PRIXFAST64() "I64X"
define
PRIxFAST8() "x"
define
PRIXFAST8() "X"
define
PRIxLEAST16() "hx"
define
PRIXLEAST16() "hX"
define
PRIxLEAST32() "I32x"
define
PRIXLEAST32() "I32X"
define
PRIxLEAST64() "I64x"
define
PRIXLEAST64() "I64X"
define
PRIxLEAST8() "x"
define
PRIXLEAST8() "X"
define
PRIxMAX() "I64x"
define
PRIXMAX() "I64X"
define
PRIxPTR() "Ix"
define
PRIXPTR() "IX"
define
SCNd16() "hd"
define
SCNd32() "ld"
define
SCNd64() "I64d"
define
SCNd8() "d"
define
SCNdFAST16() "hd"
define
SCNdFAST32() "ld"
define
SCNdFAST64() "I64d"
define
SCNdFAST8() "d"
define
SCNdLEAST16() "hd"
define
SCNdLEAST32() "ld"
define
SCNdLEAST64() "I64d"
define
SCNdLEAST8() "d"
define
SCNdMAX() "I64d"
define
SCNdPTR() "ld"
define
SCNi16() "hi"
define
SCNi32() "li"
define
SCNi64() "I64i"
define
SCNi8() "i"
define
SCNiFAST16() "hi"
define
SCNiFAST32() "li"
define
SCNiFAST64() "I64i"
define
SCNiFAST8() "i"
define
SCNiLEAST16() "hi"
define
SCNiLEAST32() "li"
define
SCNiLEAST64() "I64i"
define
SCNiLEAST8() "i"
define
SCNiMAX() "I64i"
define
SCNiPTR() "li"
define
SCNo16() "ho"
define
SCNo32() "lo"
define
SCNo64() "I64o"
define
SCNo8() "o"
define
SCNoFAST16() "ho"
define
SCNoFAST32() "lo"
define
SCNoFAST64() "I64o"
define
SCNoFAST8() "o"
define
SCNoLEAST16() "ho"
define
SCNoLEAST32() "lo"
define
SCNoLEAST64() "I64o"
define
SCNoLEAST8() "o"
define
SCNoMAX() "I64o"
define
SCNoPTR() "lo"
define
SCNu16() "hu"
define
SCNu32() "lu"
define
SCNu64() "I64u"
define
SCNu8() "u"
define
SCNuFAST16() "hu"
define
SCNuFAST32() "lu"
define
SCNuFAST64() "I64u"
define
SCNuFAST8() "u"
define
SCNuLEAST16() "hu"
define
SCNuLEAST32() "lu"
define
SCNuLEAST64() "I64u"
define
SCNuLEAST8() "u"
define
SCNuMAX() "I64u"
define
SCNuPTR() "lu"
define
SCNx16() "hx"
define
SCNX16() "hX"
define
SCNx32() "lx"
define
SCNX32() "lX"
define
SCNx64() "I64x"
define
SCNX64() "I64X"
define
SCNx8() "x"
define
SCNX8() "X"
define
SCNxFAST16() "hx"
define
SCNXFAST16() "hX"
define
SCNxFAST32() "lx"
define
SCNXFAST32() "lX"
define
SCNxFAST64() "I64x"
define
SCNXFAST64() "I64X"
define
SCNxFAST8() "x"
define
SCNXFAST8() "X"
define
SCNxLEAST16() "hx"
define
SCNXLEAST16() "hX"
define
SCNxLEAST32() "lx"
define
SCNXLEAST32() "lX"
define
SCNxLEAST64() "I64x"
define
SCNXLEAST64() "I64X"
define
SCNxLEAST8() "x"
define
SCNXLEAST8() "X"
define
SCNxMAX() "I64x"
define
SCNXMAX() "I64X"
define
SCNxPTR() "lx"
define
SCNXPTR() "lX"
define
strtoimax() _strtoi64
define
strtoumax() _strtoui64
define
wcstoimax() _wcstoi64
define
wcstoumax() _wcstoui64

Public Functions

_inline imaxdiv_t __cdecl
imaxdiv(intmax_t numer, intmax_t denom)

Detailed Description

Public Defines

imaxabs() _abs64
PRId16() "hd"
PRId32() "I32d"
PRId64() "I64d"
PRId8() "d"
PRIdFAST16() "hd"
PRIdFAST32() "I32d"
PRIdFAST64() "I64d"
PRIdFAST8() "d"
PRIdLEAST16() "hd"
PRIdLEAST32() "I32d"
PRIdLEAST64() "I64d"
PRIdLEAST8() "d"
PRIdMAX() "I64d"
PRIdPTR() "Id"
PRIi16() "hi"
PRIi32() "I32i"
PRIi64() "I64i"
PRIi8() "i"
PRIiFAST16() "hi"
PRIiFAST32() "I32i"
PRIiFAST64() "I64i"
PRIiFAST8() "i"
PRIiLEAST16() "hi"
PRIiLEAST32() "I32i"
PRIiLEAST64() "I64i"
PRIiLEAST8() "i"
PRIiMAX() "I64i"
PRIiPTR() "Ii"
PRIo16() "ho"
PRIo32() "I32o"
PRIo64() "I64o"
PRIo8() "o"
PRIoFAST16() "ho"
PRIoFAST32() "I32o"
PRIoFAST64() "I64o"
PRIoFAST8() "o"
PRIoLEAST16() "ho"
PRIoLEAST32() "I32o"
PRIoLEAST64() "I64o"
PRIoLEAST8() "o"
PRIoMAX() "I64o"
PRIoPTR() "Io"
PRIu16() "hu"
PRIu32() "I32u"
PRIu64() "I64u"
PRIu8() "u"
PRIuFAST16() "hu"
PRIuFAST32() "I32u"
PRIuFAST64() "I64u"
PRIuFAST8() "u"
PRIuLEAST16() "hu"
PRIuLEAST32() "I32u"
PRIuLEAST64() "I64u"
PRIuLEAST8() "u"
PRIuMAX() "I64u"
PRIuPTR() "Iu"
PRIx16() "hx"
PRIX16() "hX"
PRIx32() "I32x"
PRIX32() "I32X"
PRIx64() "I64x"
PRIX64() "I64X"
PRIx8() "x"
PRIX8() "X"
PRIxFAST16() "hx"
PRIXFAST16() "hX"
PRIxFAST32() "I32x"
PRIXFAST32() "I32X"
PRIxFAST64() "I64x"
PRIXFAST64() "I64X"
PRIxFAST8() "x"
PRIXFAST8() "X"
PRIxLEAST16() "hx"
PRIXLEAST16() "hX"
PRIxLEAST32() "I32x"
PRIXLEAST32() "I32X"
PRIxLEAST64() "I64x"
PRIXLEAST64() "I64X"
PRIxLEAST8() "x"
PRIXLEAST8() "X"
PRIxMAX() "I64x"
PRIXMAX() "I64X"
PRIxPTR() "Ix"
PRIXPTR() "IX"
SCNd16() "hd"
SCNd32() "ld"
SCNd64() "I64d"
SCNd8() "d"
SCNdFAST16() "hd"
SCNdFAST32() "ld"
SCNdFAST64() "I64d"
SCNdFAST8() "d"
SCNdLEAST16() "hd"
SCNdLEAST32() "ld"
SCNdLEAST64() "I64d"
SCNdLEAST8() "d"
SCNdMAX() "I64d"
SCNdPTR() "ld"
SCNi16() "hi"
SCNi32() "li"
SCNi64() "I64i"
SCNi8() "i"
SCNiFAST16() "hi"
SCNiFAST32() "li"
SCNiFAST64() "I64i"
SCNiFAST8() "i"
SCNiLEAST16() "hi"
SCNiLEAST32() "li"
SCNiLEAST64() "I64i"
SCNiLEAST8() "i"
SCNiMAX() "I64i"
SCNiPTR() "li"
SCNo16() "ho"
SCNo32() "lo"
SCNo64() "I64o"
SCNo8() "o"
SCNoFAST16() "ho"
SCNoFAST32() "lo"
SCNoFAST64() "I64o"
SCNoFAST8() "o"
SCNoLEAST16() "ho"
SCNoLEAST32() "lo"
SCNoLEAST64() "I64o"
SCNoLEAST8() "o"
SCNoMAX() "I64o"
SCNoPTR() "lo"
SCNu16() "hu"
SCNu32() "lu"
SCNu64() "I64u"
SCNu8() "u"
SCNuFAST16() "hu"
SCNuFAST32() "lu"
SCNuFAST64() "I64u"
SCNuFAST8() "u"
SCNuLEAST16() "hu"
SCNuLEAST32() "lu"
SCNuLEAST64() "I64u"
SCNuLEAST8() "u"
SCNuMAX() "I64u"
SCNuPTR() "lu"
SCNx16() "hx"
SCNX16() "hX"
SCNx32() "lx"
SCNX32() "lX"
SCNx64() "I64x"
SCNX64() "I64X"
SCNx8() "x"
SCNX8() "X"
SCNxFAST16() "hx"
SCNXFAST16() "hX"
SCNxFAST32() "lx"
SCNXFAST32() "lX"
SCNxFAST64() "I64x"
SCNXFAST64() "I64X"
SCNxFAST8() "x"
SCNXFAST8() "X"
SCNxLEAST16() "hx"
SCNXLEAST16() "hX"
SCNxLEAST32() "lx"
SCNXLEAST32() "lX"
SCNxLEAST64() "I64x"
SCNXLEAST64() "I64X"
SCNxLEAST8() "x"
SCNXLEAST8() "X"
SCNxMAX() "I64x"
SCNXMAX() "I64X"
SCNxPTR() "lx"
SCNXPTR() "lX"
strtoimax() _strtoi64
strtoumax() _strtoui64
wcstoimax() _wcstoi64
wcstoumax() _wcstoui64

Public Functions

imaxdiv(intmax_t numer, intmax_t denom)

  1
  2// ISO C9x  compliant inttypes.h for Microsoft Visual Studio
  3// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 
  4// 
  5//  Copyright (c) 2006-2013 Alexander Chemeris
  6// 
  7// Redistribution and use in source and binary forms, with or without
  8// modification, are permitted provided that the following conditions are met:
  9// 
 10//   1. Redistributions of source code must retain the above copyright notice,
 11//      this list of conditions and the following disclaimer.
 12// 
 13//   2. Redistributions in binary form must reproduce the above copyright
 14//      notice, this list of conditions and the following disclaimer in the
 15//      documentation and/or other materials provided with the distribution.
 16// 
 17//   3. Neither the name of the product nor the names of its contributors may
 18//      be used to endorse or promote products derived from this software
 19//      without specific prior written permission.
 20// 
 21// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
 22// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 23// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
 24// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 25// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 26// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 27// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
 28// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 29// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 30// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 31// 
 32///////////////////////////////////////////////////////////////////////////////
 33
 34// The above software in this distribution may have been modified by 
 35// THL A29 Limited ("Tencent Modifications"). 
 36// All Tencent Modifications are Copyright (C) 2015 THL A29 Limited.
 37
 38#ifndef _MSC_VER // [
 39#error "Use this header only with Microsoft Visual C++ compilers!"
 40#endif // _MSC_VER ]
 41
 42#ifndef _MSC_INTTYPES_H_ // [
 43#define _MSC_INTTYPES_H_
 44
 45#if _MSC_VER > 1000
 46#pragma once
 47#endif
 48
 49#include "stdint.h"
 50
 51// miloyip: VC supports inttypes.h since VC2013
 52#if _MSC_VER >= 1800
 53#include <inttypes.h>
 54#else
 55
 56// 7.8 Format conversion of integer types
 57
 58typedef struct {
 59   intmax_t quot;
 60   intmax_t rem;
 61} imaxdiv_t;
 62
 63// 7.8.1 Macros for format specifiers
 64
 65#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [   See footnote 185 at page 198
 66
 67// The fprintf macros for signed integers are:
 68#define PRId8       "d"
 69#define PRIi8       "i"
 70#define PRIdLEAST8  "d"
 71#define PRIiLEAST8  "i"
 72#define PRIdFAST8   "d"
 73#define PRIiFAST8   "i"
 74
 75#define PRId16       "hd"
 76#define PRIi16       "hi"
 77#define PRIdLEAST16  "hd"
 78#define PRIiLEAST16  "hi"
 79#define PRIdFAST16   "hd"
 80#define PRIiFAST16   "hi"
 81
 82#define PRId32       "I32d"
 83#define PRIi32       "I32i"
 84#define PRIdLEAST32  "I32d"
 85#define PRIiLEAST32  "I32i"
 86#define PRIdFAST32   "I32d"
 87#define PRIiFAST32   "I32i"
 88
 89#define PRId64       "I64d"
 90#define PRIi64       "I64i"
 91#define PRIdLEAST64  "I64d"
 92#define PRIiLEAST64  "I64i"
 93#define PRIdFAST64   "I64d"
 94#define PRIiFAST64   "I64i"
 95
 96#define PRIdMAX     "I64d"
 97#define PRIiMAX     "I64i"
 98
 99#define PRIdPTR     "Id"
100#define PRIiPTR     "Ii"
101
102// The fprintf macros for unsigned integers are:
103#define PRIo8       "o"
104#define PRIu8       "u"
105#define PRIx8       "x"
106#define PRIX8       "X"
107#define PRIoLEAST8  "o"
108#define PRIuLEAST8  "u"
109#define PRIxLEAST8  "x"
110#define PRIXLEAST8  "X"
111#define PRIoFAST8   "o"
112#define PRIuFAST8   "u"
113#define PRIxFAST8   "x"
114#define PRIXFAST8   "X"
115
116#define PRIo16       "ho"
117#define PRIu16       "hu"
118#define PRIx16       "hx"
119#define PRIX16       "hX"
120#define PRIoLEAST16  "ho"
121#define PRIuLEAST16  "hu"
122#define PRIxLEAST16  "hx"
123#define PRIXLEAST16  "hX"
124#define PRIoFAST16   "ho"
125#define PRIuFAST16   "hu"
126#define PRIxFAST16   "hx"
127#define PRIXFAST16   "hX"
128
129#define PRIo32       "I32o"
130#define PRIu32       "I32u"
131#define PRIx32       "I32x"
132#define PRIX32       "I32X"
133#define PRIoLEAST32  "I32o"
134#define PRIuLEAST32  "I32u"
135#define PRIxLEAST32  "I32x"
136#define PRIXLEAST32  "I32X"
137#define PRIoFAST32   "I32o"
138#define PRIuFAST32   "I32u"
139#define PRIxFAST32   "I32x"
140#define PRIXFAST32   "I32X"
141
142#define PRIo64       "I64o"
143#define PRIu64       "I64u"
144#define PRIx64       "I64x"
145#define PRIX64       "I64X"
146#define PRIoLEAST64  "I64o"
147#define PRIuLEAST64  "I64u"
148#define PRIxLEAST64  "I64x"
149#define PRIXLEAST64  "I64X"
150#define PRIoFAST64   "I64o"
151#define PRIuFAST64   "I64u"
152#define PRIxFAST64   "I64x"
153#define PRIXFAST64   "I64X"
154
155#define PRIoMAX     "I64o"
156#define PRIuMAX     "I64u"
157#define PRIxMAX     "I64x"
158#define PRIXMAX     "I64X"
159
160#define PRIoPTR     "Io"
161#define PRIuPTR     "Iu"
162#define PRIxPTR     "Ix"
163#define PRIXPTR     "IX"
164
165// The fscanf macros for signed integers are:
166#define SCNd8       "d"
167#define SCNi8       "i"
168#define SCNdLEAST8  "d"
169#define SCNiLEAST8  "i"
170#define SCNdFAST8   "d"
171#define SCNiFAST8   "i"
172
173#define SCNd16       "hd"
174#define SCNi16       "hi"
175#define SCNdLEAST16  "hd"
176#define SCNiLEAST16  "hi"
177#define SCNdFAST16   "hd"
178#define SCNiFAST16   "hi"
179
180#define SCNd32       "ld"
181#define SCNi32       "li"
182#define SCNdLEAST32  "ld"
183#define SCNiLEAST32  "li"
184#define SCNdFAST32   "ld"
185#define SCNiFAST32   "li"
186
187#define SCNd64       "I64d"
188#define SCNi64       "I64i"
189#define SCNdLEAST64  "I64d"
190#define SCNiLEAST64  "I64i"
191#define SCNdFAST64   "I64d"
192#define SCNiFAST64   "I64i"
193
194#define SCNdMAX     "I64d"
195#define SCNiMAX     "I64i"
196
197#ifdef _WIN64 // [
198#  define SCNdPTR     "I64d"
199#  define SCNiPTR     "I64i"
200#else  // _WIN64 ][
201#  define SCNdPTR     "ld"
202#  define SCNiPTR     "li"
203#endif  // _WIN64 ]
204
205// The fscanf macros for unsigned integers are:
206#define SCNo8       "o"
207#define SCNu8       "u"
208#define SCNx8       "x"
209#define SCNX8       "X"
210#define SCNoLEAST8  "o"
211#define SCNuLEAST8  "u"
212#define SCNxLEAST8  "x"
213#define SCNXLEAST8  "X"
214#define SCNoFAST8   "o"
215#define SCNuFAST8   "u"
216#define SCNxFAST8   "x"
217#define SCNXFAST8   "X"
218
219#define SCNo16       "ho"
220#define SCNu16       "hu"
221#define SCNx16       "hx"
222#define SCNX16       "hX"
223#define SCNoLEAST16  "ho"
224#define SCNuLEAST16  "hu"
225#define SCNxLEAST16  "hx"
226#define SCNXLEAST16  "hX"
227#define SCNoFAST16   "ho"
228#define SCNuFAST16   "hu"
229#define SCNxFAST16   "hx"
230#define SCNXFAST16   "hX"
231
232#define SCNo32       "lo"
233#define SCNu32       "lu"
234#define SCNx32       "lx"
235#define SCNX32       "lX"
236#define SCNoLEAST32  "lo"
237#define SCNuLEAST32  "lu"
238#define SCNxLEAST32  "lx"
239#define SCNXLEAST32  "lX"
240#define SCNoFAST32   "lo"
241#define SCNuFAST32   "lu"
242#define SCNxFAST32   "lx"
243#define SCNXFAST32   "lX"
244
245#define SCNo64       "I64o"
246#define SCNu64       "I64u"
247#define SCNx64       "I64x"
248#define SCNX64       "I64X"
249#define SCNoLEAST64  "I64o"
250#define SCNuLEAST64  "I64u"
251#define SCNxLEAST64  "I64x"
252#define SCNXLEAST64  "I64X"
253#define SCNoFAST64   "I64o"
254#define SCNuFAST64   "I64u"
255#define SCNxFAST64   "I64x"
256#define SCNXFAST64   "I64X"
257
258#define SCNoMAX     "I64o"
259#define SCNuMAX     "I64u"
260#define SCNxMAX     "I64x"
261#define SCNXMAX     "I64X"
262
263#ifdef _WIN64 // [
264#  define SCNoPTR     "I64o"
265#  define SCNuPTR     "I64u"
266#  define SCNxPTR     "I64x"
267#  define SCNXPTR     "I64X"
268#else  // _WIN64 ][
269#  define SCNoPTR     "lo"
270#  define SCNuPTR     "lu"
271#  define SCNxPTR     "lx"
272#  define SCNXPTR     "lX"
273#endif  // _WIN64 ]
274
275#endif // __STDC_FORMAT_MACROS ]
276
277// 7.8.2 Functions for greatest-width integer types
278
279// 7.8.2.1 The imaxabs function
280#define imaxabs _abs64
281
282// 7.8.2.2 The imaxdiv function
283
284// This is modified version of div() function from Microsoft's div.c found
285// in %MSVC.NET%\crt\src\div.c
286#ifdef STATIC_IMAXDIV // [
287static
288#else // STATIC_IMAXDIV ][
289_inline
290#endif // STATIC_IMAXDIV ]
291imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
292{
293   imaxdiv_t result;
294
295   result.quot = numer / denom;
296   result.rem = numer % denom;
297
298   if (numer < 0 && result.rem > 0) {
299      // did division wrong; must fix up
300      ++result.quot;
301      result.rem -= denom;
302   }
303
304   return result;
305}
306
307// 7.8.2.3 The strtoimax and strtoumax functions
308#define strtoimax _strtoi64
309#define strtoumax _strtoui64
310
311// 7.8.2.4 The wcstoimax and wcstoumax functions
312#define wcstoimax _wcstoi64
313#define wcstoumax _wcstoui64
314
315#endif // _MSC_VER >= 1800
316
317#endif // _MSC_INTTYPES_H_ ]
318