1 /***
2 *swprintf.inl - inline definitions for (v)swprintf
3 *
4 *           Copyright (c) Microsoft Corporation. All rights reserved.
5 *
6 *Purpose:
7 *           This file contains the function definitions for (v)swprintf
8 *
9 *           [Public]
10 *
11 ****/
12
13 #pragma once
14
15 #if !defined(__CRTDECL)
16 #if defined(_M_CEE_PURE) || defined(MRTDLL)
17 #define __CRTDECL     __clrcall
18 #else
19 #define __CRTDECL     __cdecl
20 #endif
21 #endif
22
23
24 #ifndef _INC_SWPRINTF_INL_
25 #define _INC_SWPRINTF_INL_
26 #ifndef RC_INVOKED
27
28 #include <vadefs.h>
29
30 #if defined(_M_CEE_MIXED)
31 #pragma managed(push, off)
32 #endif
33
34 #pragma warning( push )
35 #pragma warning( disable : 4793 4412 )
36 static __inline int swprintf(wchar_t * _String, size_t _Count, const wchar_t * _Format, ...)
37 {
38       va_list _Arglist;
39       int _Ret;
40       _crt_va_start(_Arglist, _Format);
41       _Ret = _vswprintf_c_l(_String, _Count, _Format, NULL, _Arglist);
42       _crt_va_end(_Arglist);
43       return _Ret;
44 }
45 #pragma warning( pop )
46
47 #pragma warning( push )
48 #pragma warning( disable : 4412 )
49 static __inline int __CRTDECL vswprintf(wchar_t * _String, size_t _Count, const wchar_t * _Format, va_list _Ap)
50 {
51       return _vswprintf_c_l(_String, _Count, _Format, NULL, _Ap);
52 }
53 #pragma warning( pop )
54 #if defined(_M_CEE_MIXED)
55 #pragma managed(pop)
56 #endif
57
58 #pragma warning( push )
59 #pragma warning( disable : 4793 4412 )
60 static __inline int _swprintf_l(wchar_t * _String, size_t _Count, const wchar_t * _Format, _locale_t _Plocinfo, ...)
61 {
62       va_list _Arglist;
63       int _Ret;
64       _crt_va_start(_Arglist, _Plocinfo);
65       _Ret = _vswprintf_c_l(_String, _Count, _Format, _Plocinfo, _Arglist);
66       _crt_va_end(_Arglist);
67       return _Ret;
68 }
69 #pragma warning( pop )
70
71 #pragma warning( push )
72 #pragma warning( disable : 4412 )
73 static __inline int __CRTDECL _vswprintf_l(wchar_t * _String, size_t _Count, const wchar_t * _Format, _locale_t _Plocinfo, va_list _Ap)
74 {
75       return _vswprintf_c_l(_String, _Count, _Format, _Plocinfo, _Ap);
76 }
77 #pragma warning( pop )
78
79 #ifdef __cplusplus
80 #pragma warning( push )
81 #pragma warning( disable : 4996 )
82
83 #pragma warning( push )
84 #pragma warning( disable : 4793 4141 )
85 extern "C++" _SWPRINTFS_DEPRECATED _CRT_INSECURE_DEPRECATE(swprintf_s) __inline int swprintf(_Pre_notnull_ _Post_z_ wchar_t * _String, _In_z_ _Printf_format_string_ const wchar_t * _Format, ...)
86 {
87       va_list _Arglist;
88       _crt_va_start(_Arglist, _Format);
89       int _Ret = _vswprintf(_String, _Format, _Arglist);
90       _crt_va_end(_Arglist);
91       return _Ret;
92 }
93 #pragma warning( pop )
94
95 #pragma warning( push )
96 #pragma warning( disable : 4141 )
97 extern "C++" _SWPRINTFS_DEPRECATED _CRT_INSECURE_DEPRECATE(vswprintf_s) __inline int __CRTDECL vswprintf(_Pre_notnull_ _Post_z_ wchar_t * _String, _In_z_ _Printf_format_string_ const wchar_t * _Format, va_list _Ap)
98 {
99       return _vswprintf(_String, _Format, _Ap);
Lines 100 ... 109 are skipped.
110       _crt_va_end(_Arglist);
111       return _Ret;
112 }
113 #pragma warning( pop )
114
115 #pragma warning( push )
116 #pragma warning( disable : 4141 )
117 extern "C++" _SWPRINTFS_DEPRECATED _CRT_INSECURE_DEPRECATE(_vswprintf_s_l) __inline int __CRTDECL _vswprintf_l(_Pre_notnull_ _Post_z_ wchar_t * _String, _In_z_ _Printf_format_string_ const wchar_t * _Format, _locale_t _Plocinfo, va_list _Ap)
118 {
119       return __vswprintf_l(_String, _Format, _Plocinfo, _Ap);
120 }
121 #pragma warning( pop )
122
123 #pragma warning( pop )
124
125 #endif  /* __cplusplus */
126
127 #endif /* RC_INVOKED */
128 #endif /* _INC_SWPRINTF_INL_ */
129
130