DCL 4.0
Loading...
Searching...
No Matches
__xtoa.cpp
Go to the documentation of this file.
1#include "__xtoa.h"
2
3__DCL_BEGIN_NAMESPACE
4
5#define __DCL_INTERNAL__
6
7#if !__DCL_WINDOWS
8 #undef __int32_t
9 #undef __int64_t
10
11 #define __int32 int
12 #if __WORD_SIZE == 64
13 #define __int64 long int
14 #else
15 #define __int64 long long int
16 #endif
17#endif
18
19#undef XTOA
20#undef INT_T
21#undef CHAR_T
22#define XTOA __int32toa_internal
23#define INT_T __int32
24#define CHAR_T char
25#include "__XTOA_T.cpp"
26
27char* __int32toa(int32_t _n, char* _buf, unsigned _base)
28{
29 __int32toa_internal((unsigned __int32) _n, _buf, _base, (_base == 10 && _n < 0));
30 return _buf;
31}
32
33char* __uint32toa(uint32_t _n, char* _buf, unsigned _base)
34{
35 __int32toa_internal(_n, _buf, _base, 0);
36 return _buf;
37}
38
39#undef XTOA
40#undef INT_T
41#undef CHAR_T
42#define XTOA __int64toa_internal
43#define INT_T __int64
44#define CHAR_T char
45#include "__XTOA_T.cpp"
46
47char* __int64toa(int64_t _n, char* _buf, unsigned _base)
48{
49 __int64toa_internal((unsigned __int64) _n, _buf, _base, (_base == 10 && _n < 0));
50 return _buf;
51}
52
53char* __uint64toa(uint64_t _n, char* _buf, unsigned _base)
54{
55 __int64toa_internal(_n, _buf, _base, 0);
56 return _buf;
57}
58
59#undef XTOA
60#undef INT_T
61#undef CHAR_T
62#define XTOA __int32tow_internal
63#define INT_T __int32
64#define CHAR_T wchar_t
65#include "__XTOA_T.cpp"
66
67wchar_t* __int32tow(int32_t _n, wchar_t* _buf, unsigned _base)
68{
69 __int32tow_internal((unsigned __int32) _n, _buf, _base, (_base == 10 && _n < 0));
70 return _buf;
71}
72
73wchar_t* __uint32tow(uint32_t _n, wchar_t* _buf, unsigned _base)
74{
75 __int32tow_internal(_n, _buf, _base, 0);
76 return _buf;
77}
78
79#undef XTOA
80#undef INT_T
81#undef CHAR_T
82#define XTOA __int64tow_internal
83#define INT_T __int64
84#define CHAR_T wchar_t
85#include "__XTOA_T.cpp"
86
87wchar_t* __int64tow(int64_t _n, wchar_t* _buf, unsigned _base)
88{
89 __int64tow_internal((unsigned __int64) _n, _buf, _base, (_base == 10 && _n < 0));
90 return _buf;
91}
92
93wchar_t* __uint64tow(uint64_t _n, wchar_t* _buf, unsigned _base)
94{
95 __int64tow_internal(_n, _buf, _base, 0);
96 return _buf;
97}
98
99__DCL_END_NAMESPACE
wchar_t * __int64tow(int64_t _n, wchar_t *_buf, unsigned _base)
Definition __xtoa.cpp:87
wchar_t * __uint64tow(uint64_t _n, wchar_t *_buf, unsigned _base)
Definition __xtoa.cpp:93
wchar_t * __uint32tow(uint32_t _n, wchar_t *_buf, unsigned _base)
Definition __xtoa.cpp:73
char * __int64toa(int64_t _n, char *_buf, unsigned _base)
Definition __xtoa.cpp:47
char * __int32toa(int32_t _n, char *_buf, unsigned _base)
Definition __xtoa.cpp:27
char * __uint32toa(uint32_t _n, char *_buf, unsigned _base)
Definition __xtoa.cpp:33
char * __uint64toa(uint64_t _n, char *_buf, unsigned _base)
Definition __xtoa.cpp:53
#define __int64
Definition __xtoa.cpp:15
#define __int32
Definition __xtoa.cpp:11
wchar_t * __int32tow(int32_t _n, wchar_t *_buf, unsigned _base)
Definition __xtoa.cpp:67