YAP 7.1.0
YapFormat.h
1
2#ifndef YAP_FORMAT
3
4#if defined(_WIN64)
5
6typedef int64_t Int;
7typedef uint64_t UInt;
8#define Int_FORMAT "%I64d"
9#define UInt_FORMAT "%I64u"
10#define Int_F "I64d"
11#define UInt_F "I64u"
12#define UXInt_F "I64xu"
13#define Sizet_F "Id"
14
15#elif defined(_WIN32)
16
17typedef int32_t Int;
18typedef uint32_t UInt;
19#define Int_FORMAT "%I32d"
20#define UInt_FORMAT "%I32u"
21#define Int_F "I32d"
22#define UInt_F "I32u"
23#define UInt_FORMAT "%I32u"
24#define UXInt_FORMAT "%I32xu"
25#define Sizet_F "Id"
26
27#elif defined(PRIdPTR)
28#define Int_FORMAT "%" PRIdPTR
29#define Int_ANYFORMAT "%" PRIuPTR
30#define UInt_FORMAT "%" PRIuPTR
31#define Int_F PRIdPTR
32#define Int_ANYF PRIuPTR
33#define UInt_F PRIuPTR
34#define UXInt_F PRIxPTR
35#define Sizet_F "zd"
36
37#elif SIZEOF_LONG_INT == SIZEOF_INT_P
38
39typedef long int Int;
40typedef unsigned long int UInt;
41#define Int_FORMAT "%ld"
42#define UInt_FORMAT "%uld"
43#define Int_F "ld"
44#define UInt_F "uld"
45#define UXInt_F "ulxd"
46#define Sizet_F "uld"
47
48#elif SIZEOF_INT == SIZEOF_INT_P
49
50typedef int Int;
51typedef unsigned int UInt;
52#define Int_FORMAT "%l"
53#define UInt_FORMAT "%ul"
54#define Int_F "l"
55#define UInt_F "ul"
56#define UXInt_F "uld"
57#define Sizet_F "ux"
58
59#endif
60
61#endif