libMVRgdtf
40bc00a
A library for GDTF and MVR
Loading...
Searching...
No Matches
GSIntTypes.h
Go to the documentation of this file.
1
//
2
// Copyright Nemetschek Vectorworks, Inc.
3
// Use of this file is governed by the Nemetschek Vectorworks SDK License Agreement
4
// http://developer.vectorworks.net/index.php?title=Vectorworks_SDK_License
5
//
6
// This file abstracts the inclusion of inttypes.h, which is not included in Visual Studio.
7
// C99 format specifiers can be defined here for Windows. (e.g. for 64 bit arguments to printf())
8
//
9
10
#if GS_MAC
11
12
#define __STDC_FORMAT_MACROS
13
#include <inttypes.h>
14
15
// nonstandard types on mac
16
#define PRIpPTR "p"
// p is already prefixed with 0x
17
#define SCNpPTR "p"
18
19
#else
20
21
// Visual Studio 2013 will include C99 support
22
#if (_MSC_VER >= 1800)
23
24
#define __STDC_FORMAT_MACROS
25
26
#else
27
28
// this is a small subset of the specifiers, for now just add what we need
29
#define PRId32 "I32d"
30
#define PRIi32 "I32i"
31
#define PRIo32 "I32o"
32
#define PRIu32 "I32u"
33
#define PRIx32 "I32x"
34
#define PRIX32 "I32X"
35
36
#define PRId64 "I64d"
37
#define PRIi64 "I64i"
38
#define PRIo64 "I64o"
39
#define PRIu64 "I64u"
40
#define PRIx64 "I64x"
41
#define PRIX64 "I64X"
42
43
#define PRIdPTR "Id"
44
#define PRIiPTR "Ii"
45
#define PRIoPTR "Io"
46
#define PRIuPTR "Iu"
47
#define PRIxPTR "Ix"
48
#define PRIXPTR "IX"
49
50
#ifdef _WIN64
// [
51
# define SCNdPTR "I64d"
52
# define SCNiPTR "I64i"
53
# define SCNxPTR "I64x"
54
#else
// _WIN64 ][
55
# define SCNdPTR "ld"
56
# define SCNiPTR "li"
57
# define SCNxPTR "lx"
58
#endif
// _WIN64 ]
59
60
#endif
61
62
// nonstandard types on win
63
#define PRIpPTR "#p"
// p has no prefix. #p is 0X but no prefix if null. x doesn't pad and has identical problems to p
64
#define SCNpPTR SCNxPTR
65
66
#endif
src
GSIntTypes.h