| 1 |
/** |
| 2 |
* This file has no copyright assigned and is placed in the Public Domain. |
| 3 |
* This file is part of the mingw-w64 runtime package. |
| 4 |
* No warranty is given; refer to the file DISCLAIMER.PD within this package. |
| 5 |
*/ |
| 6 |
#ifndef _INC_STDIO_S |
| 7 |
#define _INC_STDIO_S |
| 8 |
|
| 9 |
#include <stdio.h> |
| 10 |
|
| 11 |
#if defined(__LIBMSVCRT__) |
| 12 |
/* When building mingw-w64, this should be blank. */ |
| 13 |
#define _SECIMP |
| 14 |
#else |
| 15 |
#ifndef _SECIMP |
| 16 |
#define _SECIMP __declspec(dllimport) |
| 17 |
#endif /* _SECIMP */ |
| 18 |
#endif /* defined(_CRTBLD) || defined(__LIBMSVCRT__) */ |
| 19 |
|
| 20 |
#ifdef __cplusplus |
| 21 |
extern "C" { |
| 22 |
#endif |
| 23 |
|
| 24 |
#ifndef _STDIO_S_DEFINED |
| 25 |
#define _STDIO_S_DEFINED |
| 26 |
#define L_tmpnam_s L_tmpnam |
| 27 |
#define TMP_MAX_S TMP_MAX |
| 28 |
|
| 29 |
_CRTIMP errno_t __cdecl clearerr_s(FILE *_File); |
| 30 |
|
| 31 |
size_t __cdecl fread_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File); |
| 32 |
|
| 33 |
#ifdef _UCRT |
| 34 |
int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Str, size_t _Len, const char *_Format, _locale_t _Locale, va_list _ArgList); |
| 35 |
int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Str, size_t _Len, const char *_Format, _locale_t _Locale, va_list _ArgList); |
| 36 |
int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Str, size_t _Len, size_t _MaxCount, const char *_Format, _locale_t _Locale, va_list _ArgList); |
| 37 |
int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList); |
| 38 |
int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList); |
| 39 |
|
| 40 |
__mingw_ovr int __cdecl _vfscanf_s_l(FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 41 |
{ |
| 42 |
return __stdio_common_vfscanf(_CRT_INTERNAL_SCANF_SECURECRT, _File, _Format, _Locale, _ArgList); |
| 43 |
} |
| 44 |
|
| 45 |
__mingw_ovr int __cdecl _fscanf_s_l(FILE *_File, const char *_Format, _locale_t _Locale, ...) |
| 46 |
{ |
| 47 |
__builtin_va_list _ArgList; |
| 48 |
int _Ret; |
| 49 |
__builtin_va_start(_ArgList, _Locale); |
| 50 |
_Ret = _vfscanf_s_l(_File, _Format, _Locale, _ArgList); |
| 51 |
__builtin_va_end(_ArgList); |
| 52 |
return _Ret; |
| 53 |
} |
| 54 |
|
| 55 |
__mingw_ovr int __cdecl fscanf_s(FILE *_File, const char *_Format, ...) |
| 56 |
{ |
| 57 |
__builtin_va_list _ArgList; |
| 58 |
int _Ret; |
| 59 |
__builtin_va_start(_ArgList, _Format); |
| 60 |
_Ret = _vfscanf_s_l(_File, _Format, NULL, _ArgList); |
| 61 |
__builtin_va_end(_ArgList); |
| 62 |
return _Ret; |
| 63 |
} |
| 64 |
|
| 65 |
__mingw_ovr int __cdecl _scanf_s_l(const char *_Format, _locale_t _Locale ,...) |
| 66 |
{ |
| 67 |
__builtin_va_list _ArgList; |
| 68 |
int _Ret; |
| 69 |
__builtin_va_start(_ArgList, _Locale); |
| 70 |
_Ret = _vfscanf_s_l(stdin, _Format, _Locale, _ArgList); |
| 71 |
__builtin_va_end(_ArgList); |
| 72 |
return _Ret; |
| 73 |
} |
| 74 |
|
| 75 |
__mingw_ovr int __cdecl scanf_s(const char *_Format, ...) |
| 76 |
{ |
| 77 |
__builtin_va_list _ArgList; |
| 78 |
int _Ret; |
| 79 |
__builtin_va_start(_ArgList, _Format); |
| 80 |
_Ret = _vfscanf_s_l(stdin, _Format, NULL, _ArgList); |
| 81 |
__builtin_va_end(_ArgList); |
| 82 |
return _Ret; |
| 83 |
} |
| 84 |
|
| 85 |
__mingw_ovr int __cdecl _vfscanf_l(FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 86 |
{ |
| 87 |
return __stdio_common_vfscanf(0, _File, _Format, _Locale, _ArgList); |
| 88 |
} |
| 89 |
__mingw_ovr int __cdecl _fscanf_l(FILE *_File, const char *_Format, _locale_t _Locale, ...) |
| 90 |
{ |
| 91 |
__builtin_va_list _ArgList; |
| 92 |
int _Ret; |
| 93 |
__builtin_va_start(_ArgList, _Locale); |
| 94 |
_Ret = _vfscanf_l(_File, _Format, _Locale, _ArgList); |
| 95 |
__builtin_va_end(_ArgList); |
| 96 |
return _Ret; |
| 97 |
} |
| 98 |
__mingw_ovr int __cdecl _scanf_l(const char *_Format, _locale_t _Locale, ...) |
| 99 |
{ |
| 100 |
__builtin_va_list _ArgList; |
| 101 |
int _Ret; |
| 102 |
__builtin_va_start(_ArgList, _Locale); |
| 103 |
_Ret = _vfscanf_l(stdin, _Format, _Locale, _ArgList); |
| 104 |
__builtin_va_end(_ArgList); |
| 105 |
return _Ret; |
| 106 |
} |
| 107 |
|
| 108 |
__mingw_ovr int __cdecl _vsscanf_s_l(const char *_Src, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 109 |
{ |
| 110 |
return __stdio_common_vsscanf(_CRT_INTERNAL_SCANF_SECURECRT, _Src, (size_t)-1, _Format, _Locale, _ArgList); |
| 111 |
} |
| 112 |
__mingw_ovr int __cdecl vsscanf_s(const char *_Src, const char *_Format, va_list _ArgList) |
| 113 |
{ |
| 114 |
return _vsscanf_s_l(_Src, _Format, NULL, _ArgList); |
| 115 |
} |
| 116 |
__mingw_ovr int __cdecl _sscanf_s_l(const char *_Src, const char *_Format, _locale_t _Locale, ...) |
| 117 |
{ |
| 118 |
__builtin_va_list _ArgList; |
| 119 |
int _Ret; |
| 120 |
__builtin_va_start(_ArgList, _Locale); |
| 121 |
_Ret = _vsscanf_s_l(_Src, _Format, _Locale, _ArgList); |
| 122 |
__builtin_va_end(_ArgList); |
| 123 |
return _Ret; |
| 124 |
} |
| 125 |
__mingw_ovr int __cdecl sscanf_s(const char *_Src, const char *_Format, ...) |
| 126 |
{ |
| 127 |
__builtin_va_list _ArgList; |
| 128 |
int _Ret; |
| 129 |
__builtin_va_start(_ArgList, _Format); |
| 130 |
_Ret = _vsscanf_s_l(_Src, _Format, NULL, _ArgList); |
| 131 |
__builtin_va_end(_ArgList); |
| 132 |
return _Ret; |
| 133 |
} |
| 134 |
|
| 135 |
__mingw_ovr int __cdecl _vsscanf_l(const char *_Src, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 136 |
{ |
| 137 |
return __stdio_common_vsscanf(0, _Src, (size_t)-1, _Format, _Locale, _ArgList); |
| 138 |
} |
| 139 |
__mingw_ovr int __cdecl _sscanf_l(const char *_Src, const char *_Format, _locale_t _Locale, ...) |
| 140 |
{ |
| 141 |
__builtin_va_list _ArgList; |
| 142 |
int _Ret; |
| 143 |
__builtin_va_start(_ArgList, _Locale); |
| 144 |
_Ret = _vsscanf_l(_Src, _Format, _Locale, _ArgList); |
| 145 |
__builtin_va_end(_ArgList); |
| 146 |
return _Ret; |
| 147 |
} |
| 148 |
|
| 149 |
/* There is no _vsnscanf_s_l nor _vsnscanf_s */ |
| 150 |
__mingw_ovr int __cdecl _snscanf_s_l(const char *_Src, size_t _MaxCount, const char *_Format, _locale_t _Locale, ...) |
| 151 |
{ |
| 152 |
__builtin_va_list _ArgList; |
| 153 |
int _Ret; |
| 154 |
__builtin_va_start(_ArgList, _Locale); |
| 155 |
_Ret = __stdio_common_vsscanf(_CRT_INTERNAL_SCANF_SECURECRT, _Src, _MaxCount, _Format, _Locale, _ArgList); |
| 156 |
__builtin_va_end(_ArgList); |
| 157 |
return _Ret; |
| 158 |
} |
| 159 |
__mingw_ovr int __cdecl _snscanf_s(const char *_Src, size_t _MaxCount, const char *_Format, ...) |
| 160 |
{ |
| 161 |
__builtin_va_list _ArgList; |
| 162 |
int _Ret; |
| 163 |
__builtin_va_start(_ArgList, _Format); |
| 164 |
_Ret = __stdio_common_vsscanf(_CRT_INTERNAL_SCANF_SECURECRT, _Src, _MaxCount, _Format, NULL, _ArgList); |
| 165 |
__builtin_va_end(_ArgList); |
| 166 |
return _Ret; |
| 167 |
} |
| 168 |
|
| 169 |
/* There is no _vsnscanf_l */ |
| 170 |
__mingw_ovr int __cdecl _snscanf_l(const char *_Src, size_t _MaxCount, const char *_Format, _locale_t _Locale, ...) |
| 171 |
{ |
| 172 |
__builtin_va_list _ArgList; |
| 173 |
int _Ret; |
| 174 |
__builtin_va_start(_ArgList, _Locale); |
| 175 |
_Ret = __stdio_common_vsscanf(0, _Src, _MaxCount, _Format, _Locale, _ArgList); |
| 176 |
__builtin_va_end(_ArgList); |
| 177 |
return _Ret; |
| 178 |
} |
| 179 |
|
| 180 |
|
| 181 |
__mingw_ovr int __cdecl _vfprintf_s_l(FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 182 |
{ |
| 183 |
return __stdio_common_vfprintf_s(0, _File, _Format, _Locale, _ArgList); |
| 184 |
} |
| 185 |
__mingw_ovr int __cdecl vfprintf_s(FILE *_File, const char *_Format, va_list _ArgList) |
| 186 |
{ |
| 187 |
return _vfprintf_s_l(_File, _Format, NULL, _ArgList); |
| 188 |
} |
| 189 |
__mingw_ovr int __cdecl _vprintf_s_l(const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 190 |
{ |
| 191 |
return _vfprintf_s_l(stdout, _Format, _Locale, _ArgList); |
| 192 |
} |
| 193 |
__mingw_ovr int __cdecl vprintf_s(const char *_Format, va_list _ArgList) |
| 194 |
{ |
| 195 |
return _vfprintf_s_l(stdout, _Format, NULL, _ArgList); |
| 196 |
} |
| 197 |
__mingw_ovr int __cdecl _fprintf_s_l(FILE *_File, const char *_Format, _locale_t _Locale, ...) |
| 198 |
{ |
| 199 |
__builtin_va_list _ArgList; |
| 200 |
int _Ret; |
| 201 |
__builtin_va_start(_ArgList, _Locale); |
| 202 |
_Ret = _vfprintf_s_l(_File, _Format, _Locale, _ArgList); |
| 203 |
__builtin_va_end(_ArgList); |
| 204 |
return _Ret; |
| 205 |
} |
| 206 |
__mingw_ovr int __cdecl _printf_s_l(const char *_Format, _locale_t _Locale, ...) |
| 207 |
{ |
| 208 |
__builtin_va_list _ArgList; |
| 209 |
int _Ret; |
| 210 |
__builtin_va_start(_ArgList, _Locale); |
| 211 |
_Ret = _vfprintf_s_l(stdout, _Format, _Locale, _ArgList); |
| 212 |
__builtin_va_end(_ArgList); |
| 213 |
return _Ret; |
| 214 |
} |
| 215 |
__mingw_ovr int __cdecl fprintf_s(FILE *_File, const char *_Format, ...) |
| 216 |
{ |
| 217 |
__builtin_va_list _ArgList; |
| 218 |
int _Ret; |
| 219 |
__builtin_va_start(_ArgList, _Format); |
| 220 |
_Ret = _vfprintf_s_l(_File, _Format, NULL, _ArgList); |
| 221 |
__builtin_va_end(_ArgList); |
| 222 |
return _Ret; |
| 223 |
} |
| 224 |
__mingw_ovr int __cdecl printf_s(const char *_Format, ...) |
| 225 |
{ |
| 226 |
__builtin_va_list _ArgList; |
| 227 |
int _Ret; |
| 228 |
__builtin_va_start(_ArgList, _Format); |
| 229 |
_Ret = _vfprintf_s_l(stdout, _Format, NULL, _ArgList); |
| 230 |
__builtin_va_end(_ArgList); |
| 231 |
return _Ret; |
| 232 |
} |
| 233 |
|
| 234 |
__mingw_ovr int __cdecl _vsnprintf_c_l(char *_DstBuf, size_t _MaxCount, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 235 |
{ |
| 236 |
return __stdio_common_vsprintf(0, _DstBuf, _MaxCount, _Format, _Locale, _ArgList); |
| 237 |
} |
| 238 |
__mingw_ovr int __cdecl _vsnprintf_c(char *_DstBuf, size_t _MaxCount, const char *_Format, va_list _ArgList) |
| 239 |
{ |
| 240 |
return _vsnprintf_c_l(_DstBuf, _MaxCount, _Format, NULL, _ArgList); |
| 241 |
} |
| 242 |
__mingw_ovr int __cdecl _snprintf_c_l(char *_DstBuf, size_t _MaxCount, const char *_Format, _locale_t _Locale, ...) |
| 243 |
{ |
| 244 |
__builtin_va_list _ArgList; |
| 245 |
int _Ret; |
| 246 |
__builtin_va_start(_ArgList, _Locale); |
| 247 |
_Ret = _vsnprintf_c_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList); |
| 248 |
__builtin_va_end(_ArgList); |
| 249 |
return _Ret; |
| 250 |
} |
| 251 |
__mingw_ovr int __cdecl _snprintf_c(char *_DstBuf, size_t _MaxCount, const char *_Format, ...) |
| 252 |
{ |
| 253 |
__builtin_va_list _ArgList; |
| 254 |
int _Ret; |
| 255 |
__builtin_va_start(_ArgList, _Format); |
| 256 |
_Ret = _vsnprintf_c_l(_DstBuf, _MaxCount, _Format, NULL, _ArgList); |
| 257 |
__builtin_va_end(_ArgList); |
| 258 |
return _Ret; |
| 259 |
} |
| 260 |
|
| 261 |
__mingw_ovr int __cdecl _vsnprintf_s_l(char *_DstBuf, size_t _DstSize, size_t _MaxCount, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 262 |
{ |
| 263 |
return __stdio_common_vsnprintf_s(0, _DstBuf, _DstSize, _MaxCount, _Format, _Locale, _ArgList); |
| 264 |
} |
| 265 |
__mingw_ovr int __cdecl vsnprintf_s(char *_DstBuf, size_t _DstSize, size_t _MaxCount, const char *_Format, va_list _ArgList) |
| 266 |
{ |
| 267 |
return _vsnprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, NULL, _ArgList); |
| 268 |
} |
| 269 |
__mingw_ovr int __cdecl _vsnprintf_s(char *_DstBuf, size_t _DstSize, size_t _MaxCount, const char *_Format, va_list _ArgList) |
| 270 |
{ |
| 271 |
return _vsnprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, NULL, _ArgList); |
| 272 |
} |
| 273 |
__mingw_ovr int __cdecl _snprintf_s_l(char *_DstBuf, size_t _DstSize, size_t _MaxCount, const char *_Format, _locale_t _Locale, ...) |
| 274 |
{ |
| 275 |
__builtin_va_list _ArgList; |
| 276 |
int _Ret; |
| 277 |
__builtin_va_start(_ArgList, _Locale); |
| 278 |
_Ret = _vsnprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, _Locale, _ArgList); |
| 279 |
__builtin_va_end(_ArgList); |
| 280 |
return _Ret; |
| 281 |
} |
| 282 |
__mingw_ovr int __cdecl _snprintf_s(char *_DstBuf, size_t _DstSize, size_t _MaxCount, const char *_Format, ...) |
| 283 |
{ |
| 284 |
__builtin_va_list _ArgList; |
| 285 |
int _Ret; |
| 286 |
__builtin_va_start(_ArgList, _Format); |
| 287 |
_Ret = _vsnprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, NULL, _ArgList); |
| 288 |
__builtin_va_end(_ArgList); |
| 289 |
return _Ret; |
| 290 |
} |
| 291 |
|
| 292 |
__mingw_ovr int __cdecl _vsprintf_s_l(char *_DstBuf, size_t _DstSize, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 293 |
{ |
| 294 |
return __stdio_common_vsprintf_s(0, _DstBuf, _DstSize, _Format, _Locale, _ArgList); |
| 295 |
} |
| 296 |
__mingw_ovr int __cdecl vsprintf_s(char *_DstBuf, size_t _Size, const char *_Format, va_list _ArgList) |
| 297 |
{ |
| 298 |
return _vsprintf_s_l(_DstBuf, _Size, _Format, NULL, _ArgList); |
| 299 |
} |
| 300 |
__mingw_ovr int __cdecl _sprintf_s_l(char *_DstBuf, size_t _DstSize, const char *_Format, _locale_t _Locale, ...) |
| 301 |
{ |
| 302 |
__builtin_va_list _ArgList; |
| 303 |
int _Ret; |
| 304 |
__builtin_va_start(_ArgList, _Locale); |
| 305 |
_Ret = _vsprintf_s_l(_DstBuf, _DstSize, _Format, _Locale, _ArgList); |
| 306 |
__builtin_va_end(_ArgList); |
| 307 |
return _Ret; |
| 308 |
} |
| 309 |
__mingw_ovr int __cdecl sprintf_s(char *_DstBuf, size_t _DstSize, const char *_Format, ...) |
| 310 |
{ |
| 311 |
__builtin_va_list _ArgList; |
| 312 |
int _Ret; |
| 313 |
__builtin_va_start(_ArgList, _Format); |
| 314 |
_Ret = _vsprintf_s_l(_DstBuf, _DstSize, _Format, NULL, _ArgList); |
| 315 |
__builtin_va_end(_ArgList); |
| 316 |
return _Ret; |
| 317 |
} |
| 318 |
|
| 319 |
__mingw_ovr int __cdecl _vfprintf_p_l(FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 320 |
{ |
| 321 |
return __stdio_common_vfprintf_p(0, _File, _Format, _Locale, _ArgList); |
| 322 |
} |
| 323 |
__mingw_ovr int __cdecl _vfprintf_p(FILE *_File, const char *_Format, va_list _ArgList) |
| 324 |
{ |
| 325 |
return _vfprintf_p_l(_File, _Format, NULL, _ArgList); |
| 326 |
} |
| 327 |
__mingw_ovr int __cdecl _vprintf_p_l(const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 328 |
{ |
| 329 |
return _vfprintf_p_l(stdout, _Format, _Locale, _ArgList); |
| 330 |
} |
| 331 |
__mingw_ovr int __cdecl _vprintf_p(const char *_Format, va_list _ArgList) |
| 332 |
{ |
| 333 |
return _vfprintf_p_l(stdout, _Format, NULL, _ArgList); |
| 334 |
} |
| 335 |
__mingw_ovr int __cdecl _fprintf_p_l(FILE *_File, const char *_Format, _locale_t _Locale, ...) |
| 336 |
{ |
| 337 |
__builtin_va_list _ArgList; |
| 338 |
int _Ret; |
| 339 |
__builtin_va_start(_ArgList, _Locale); |
| 340 |
_Ret = __stdio_common_vfprintf_p(0, _File, _Format, _Locale, _ArgList); |
| 341 |
__builtin_va_end(_ArgList); |
| 342 |
return _Ret; |
| 343 |
} |
| 344 |
__mingw_ovr int __cdecl _fprintf_p(FILE *_File, const char *_Format, ...) |
| 345 |
{ |
| 346 |
__builtin_va_list _ArgList; |
| 347 |
int _Ret; |
| 348 |
__builtin_va_start(_ArgList, _Format); |
| 349 |
_Ret = _vfprintf_p_l(_File, _Format, NULL, _ArgList); |
| 350 |
__builtin_va_end(_ArgList); |
| 351 |
return _Ret; |
| 352 |
} |
| 353 |
__mingw_ovr int __cdecl _printf_p_l(const char *_Format, _locale_t _Locale, ...) |
| 354 |
{ |
| 355 |
__builtin_va_list _ArgList; |
| 356 |
int _Ret; |
| 357 |
__builtin_va_start(_ArgList, _Locale); |
| 358 |
_Ret = _vfprintf_p_l(stdout, _Format, _Locale, _ArgList); |
| 359 |
__builtin_va_end(_ArgList); |
| 360 |
return _Ret; |
| 361 |
} |
| 362 |
__mingw_ovr int __cdecl _printf_p(const char *_Format, ...) |
| 363 |
{ |
| 364 |
__builtin_va_list _ArgList; |
| 365 |
int _Ret; |
| 366 |
__builtin_va_start(_ArgList, _Format); |
| 367 |
_Ret = _vfprintf_p_l(stdout, _Format, NULL, _ArgList); |
| 368 |
__builtin_va_end(_ArgList); |
| 369 |
return _Ret; |
| 370 |
} |
| 371 |
|
| 372 |
__mingw_ovr int __cdecl _vsprintf_p_l(char *_DstBuf, size_t _MaxCount, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 373 |
{ |
| 374 |
return __stdio_common_vsprintf_p(0, _DstBuf, _MaxCount, _Format, _Locale, _ArgList); |
| 375 |
} |
| 376 |
__mingw_ovr int __cdecl _vsprintf_p(char *_Dst, size_t _MaxCount, const char *_Format, va_list _ArgList) |
| 377 |
{ |
| 378 |
return _vsprintf_p_l(_Dst, _MaxCount, _Format, NULL, _ArgList); |
| 379 |
} |
| 380 |
__mingw_ovr int __cdecl _sprintf_p_l(char *_DstBuf, size_t _MaxCount, const char *_Format, _locale_t _Locale, ...) |
| 381 |
{ |
| 382 |
__builtin_va_list _ArgList; |
| 383 |
int _Ret; |
| 384 |
__builtin_va_start(_ArgList, _Locale); |
| 385 |
_Ret = _vsprintf_p_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList); |
| 386 |
__builtin_va_end(_ArgList); |
| 387 |
return _Ret; |
| 388 |
} |
| 389 |
__mingw_ovr int __cdecl _sprintf_p(char *_Dst, size_t _MaxCount, const char *_Format, ...) |
| 390 |
{ |
| 391 |
__builtin_va_list _ArgList; |
| 392 |
int _Ret; |
| 393 |
__builtin_va_start(_ArgList, _Format); |
| 394 |
_Ret = _vsprintf_p_l(_Dst, _MaxCount, _Format, NULL, _ArgList); |
| 395 |
__builtin_va_end(_ArgList); |
| 396 |
return _Ret; |
| 397 |
} |
| 398 |
|
| 399 |
__mingw_ovr int __cdecl _vscprintf_p_l(const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 400 |
{ |
| 401 |
return __stdio_common_vsprintf_p(_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, _Locale, _ArgList); |
| 402 |
} |
| 403 |
__mingw_ovr int __cdecl _vscprintf_p(const char *_Format, va_list _ArgList) |
| 404 |
{ |
| 405 |
return _vscprintf_p_l(_Format, NULL, _ArgList); |
| 406 |
} |
| 407 |
__mingw_ovr int __cdecl _scprintf_p_l(const char *_Format, _locale_t _Locale, ...) |
| 408 |
{ |
| 409 |
__builtin_va_list _ArgList; |
| 410 |
int _Ret; |
| 411 |
__builtin_va_start(_ArgList, _Locale); |
| 412 |
_Ret = _vscprintf_p_l(_Format, _Locale, _ArgList); |
| 413 |
__builtin_va_end(_ArgList); |
| 414 |
return _Ret; |
| 415 |
} |
| 416 |
__mingw_ovr int __cdecl _scprintf_p(const char *_Format, ...) |
| 417 |
{ |
| 418 |
__builtin_va_list _ArgList; |
| 419 |
int _Ret; |
| 420 |
__builtin_va_start(_ArgList, _Format); |
| 421 |
_Ret = _vscprintf_p_l(_Format, NULL, _ArgList); |
| 422 |
__builtin_va_end(_ArgList); |
| 423 |
return _Ret; |
| 424 |
} |
| 425 |
|
| 426 |
__mingw_ovr int __cdecl _vfprintf_l(FILE *_File, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 427 |
{ |
| 428 |
return __stdio_common_vfprintf(0, _File, _Format, _Locale, _ArgList); |
| 429 |
} |
| 430 |
__mingw_ovr int __cdecl _vprintf_l(const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 431 |
{ |
| 432 |
return _vfprintf_l(stdout, _Format, _Locale, _ArgList); |
| 433 |
} |
| 434 |
__mingw_ovr int __cdecl _fprintf_l(FILE *_File, const char *_Format, _locale_t _Locale, ...) |
| 435 |
{ |
| 436 |
__builtin_va_list _ArgList; |
| 437 |
int _Ret; |
| 438 |
__builtin_va_start(_ArgList, _Locale); |
| 439 |
_Ret = _vfprintf_l(_File, _Format, _Locale, _ArgList); |
| 440 |
__builtin_va_end(_ArgList); |
| 441 |
return _Ret; |
| 442 |
} |
| 443 |
__mingw_ovr int __cdecl _printf_l(const char *_Format, _locale_t _Locale, ...) |
| 444 |
{ |
| 445 |
__builtin_va_list _ArgList; |
| 446 |
int _Ret; |
| 447 |
__builtin_va_start(_ArgList, _Locale); |
| 448 |
_Ret = _vfprintf_l(stdout, _Format, _Locale, _ArgList); |
| 449 |
__builtin_va_end(_ArgList); |
| 450 |
return _Ret; |
| 451 |
} |
| 452 |
|
| 453 |
__mingw_ovr int __cdecl _vsnprintf_l(char *_DstBuf, size_t _MaxCount, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 454 |
{ |
| 455 |
return __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _DstBuf, _MaxCount, _Format, _Locale, _ArgList); |
| 456 |
} |
| 457 |
__mingw_ovr int __cdecl _snprintf_l(char *_DstBuf, size_t _MaxCount, const char *_Format, _locale_t _Locale, ...) |
| 458 |
{ |
| 459 |
__builtin_va_list _ArgList; |
| 460 |
int _Ret; |
| 461 |
__builtin_va_start(_ArgList, _Locale); |
| 462 |
_Ret = _vsnprintf_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList); |
| 463 |
__builtin_va_end(_ArgList); |
| 464 |
return _Ret; |
| 465 |
} |
| 466 |
__mingw_ovr int __cdecl _vsprintf_l(char *_DstBuf, const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 467 |
{ |
| 468 |
return _vsnprintf_l(_DstBuf, (size_t)-1, _Format, _Locale, _ArgList); |
| 469 |
} |
| 470 |
__mingw_ovr int __cdecl _sprintf_l(char *_DstBuf, const char *_Format, _locale_t _Locale, ...) |
| 471 |
{ |
| 472 |
__builtin_va_list _ArgList; |
| 473 |
int _Ret; |
| 474 |
__builtin_va_start(_ArgList, _Locale); |
| 475 |
_Ret = _vsprintf_l(_DstBuf, _Format, _Locale, _ArgList); |
| 476 |
__builtin_va_end(_ArgList); |
| 477 |
return _Ret; |
| 478 |
} |
| 479 |
|
| 480 |
__mingw_ovr int __cdecl _vscprintf_l(const char *_Format, _locale_t _Locale, va_list _ArgList) |
| 481 |
{ |
| 482 |
return __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, _Locale, _ArgList); |
| 483 |
} |
| 484 |
__mingw_ovr int __cdecl _scprintf_l(const char *_Format, _locale_t _Locale, ...) |
| 485 |
{ |
| 486 |
__builtin_va_list _ArgList; |
| 487 |
int _Ret; |
| 488 |
__builtin_va_start(_ArgList, _Locale); |
| 489 |
_Ret = _vscprintf_l(_Format, _Locale, _ArgList); |
| 490 |
__builtin_va_end(_ArgList); |
| 491 |
return _Ret; |
| 492 |
} |
| 493 |
#else /* _UCRT */ |
| 494 |
int __cdecl fprintf_s(FILE *_File,const char *_Format,...); |
| 495 |
_CRTIMP int __cdecl _fscanf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...); |
| 496 |
_CRTIMP int __cdecl fscanf_s(FILE *_File, const char *_Format, ...); |
| 497 |
int __cdecl printf_s(const char *_Format,...); |
| 498 |
_CRTIMP int __cdecl _scanf_l(const char *_Format,_locale_t _Locale,...); |
| 499 |
_CRTIMP int __cdecl _scanf_s_l(const char *_Format,_locale_t _Locale,...); |
| 500 |
_CRTIMP int __cdecl scanf_s(const char *_Format, ...); |
| 501 |
_CRTIMP int __cdecl _snprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,...); |
| 502 |
_CRTIMP int __cdecl _vsnprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList); |
| 503 |
|
| 504 |
_CRTIMP int __cdecl _fscanf_l(FILE *_File,const char *_Format,_locale_t _Locale,...); |
| 505 |
_CRTIMP int __cdecl _sscanf_l(const char *_Src,const char *_Format,_locale_t _Locale,...); |
| 506 |
_CRTIMP int __cdecl _sscanf_s_l(const char *_Src,const char *_Format,_locale_t _Locale,...); |
| 507 |
_CRTIMP int __cdecl sscanf_s(const char *_Src,const char *_Format,...); |
| 508 |
_CRTIMP int __cdecl _snscanf_s(const char *_Src,size_t _MaxCount,const char *_Format,...); |
| 509 |
_CRTIMP int __cdecl _snscanf_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); |
| 510 |
_CRTIMP int __cdecl _snscanf_s_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); |
| 511 |
int __cdecl vfprintf_s(FILE *_File,const char *_Format,va_list _ArgList); |
| 512 |
int __cdecl vprintf_s(const char *_Format,va_list _ArgList); |
| 513 |
|
| 514 |
int __cdecl vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList); |
| 515 |
|
| 516 |
_CRTIMP int __cdecl _vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList); |
| 517 |
|
| 518 |
_SECIMP int __cdecl vsprintf_s(char *_DstBuf,size_t _Size,const char *_Format,va_list _ArgList); |
| 519 |
|
| 520 |
_SECIMP int __cdecl sprintf_s(char *_DstBuf,size_t _DstSize,const char *_Format,...); |
| 521 |
|
| 522 |
_CRTIMP int __cdecl _snprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,...); |
| 523 |
|
| 524 |
_CRTIMP int __cdecl _fprintf_p(FILE *_File,const char *_Format,...); |
| 525 |
_CRTIMP int __cdecl _printf_p(const char *_Format,...); |
| 526 |
_CRTIMP int __cdecl _sprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,...); |
| 527 |
_CRTIMP int __cdecl _vfprintf_p(FILE *_File,const char *_Format,va_list _ArgList); |
| 528 |
_CRTIMP int __cdecl _vprintf_p(const char *_Format,va_list _ArgList); |
| 529 |
_CRTIMP int __cdecl _vsprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,va_list _ArgList); |
| 530 |
_CRTIMP int __cdecl _scprintf_p(const char *_Format,...); |
| 531 |
_SECIMP int __cdecl _vscprintf_p(const char *_Format,va_list _ArgList); |
| 532 |
_CRTIMP int __cdecl _printf_l(const char *_Format,_locale_t _Locale,...); |
| 533 |
_CRTIMP int __cdecl _printf_p_l(const char *_Format,_locale_t _Locale,...); |
| 534 |
_CRTIMP int __cdecl _vprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList); |
| 535 |
_CRTIMP int __cdecl _vprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList); |
| 536 |
_CRTIMP int __cdecl _fprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,...); |
| 537 |
_CRTIMP int __cdecl _fprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,...); |
| 538 |
_CRTIMP int __cdecl _vfprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); |
| 539 |
_CRTIMP int __cdecl _vfprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); |
| 540 |
_CRTIMP int __cdecl _sprintf_l(char *_DstBuf,const char *_Format,_locale_t _Locale,...); |
| 541 |
_CRTIMP int __cdecl _sprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); |
| 542 |
_CRTIMP int __cdecl _vsprintf_l(char *_DstBuf,const char *_Format,_locale_t,va_list _ArgList); |
| 543 |
_CRTIMP int __cdecl _vsprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); |
| 544 |
_CRTIMP int __cdecl _scprintf_l(const char *_Format,_locale_t _Locale,...); |
| 545 |
_CRTIMP int __cdecl _scprintf_p_l(const char *_Format,_locale_t _Locale,...); |
| 546 |
_CRTIMP int __cdecl _vscprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList); |
| 547 |
_CRTIMP int __cdecl _vscprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList); |
| 548 |
_CRTIMP int __cdecl _printf_s_l(const char *_Format,_locale_t _Locale,...); |
| 549 |
_CRTIMP int __cdecl _vprintf_s_l(const char *_Format,_locale_t _Locale,va_list _ArgList); |
| 550 |
_CRTIMP int __cdecl _fprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...); |
| 551 |
_CRTIMP int __cdecl _vfprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); |
| 552 |
_CRTIMP int __cdecl _sprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,...); |
| 553 |
_CRTIMP int __cdecl _vsprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,va_list _ArgList); |
| 554 |
_CRTIMP int __cdecl _snprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); |
| 555 |
_CRTIMP int __cdecl _vsnprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); |
| 556 |
_CRTIMP int __cdecl _snprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); |
| 557 |
_CRTIMP int __cdecl _snprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); |
| 558 |
_CRTIMP int __cdecl _vsnprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); |
| 559 |
_CRTIMP int __cdecl _vsnprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *,_locale_t _Locale,va_list _ArgList); |
| 560 |
#endif /* !_UCRT */ |
| 561 |
|
| 562 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(int,vsnprintf_s,char,_DstBuf,size_t,_MaxCount,const char*,_Format,va_list,_ArgList) |
| 563 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(int,_vsnprintf_s,char,_DstBuf,size_t,_MaxCount,const char*,_Format,va_list,_ArgList) |
| 564 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(int, vsprintf_s, char, _DstBuf, const char*, _Format, va_list, _ArgList) |
| 565 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1_ARGLIST(int,sprintf_s,vsprintf_s,char,_DstBuf,const char*,_Format) |
| 566 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2_ARGLIST(int,_snprintf_s,_vsnprintf_s,char,_DstBuf,size_t,_MaxCount,const char*,_Format) |
| 567 |
|
| 568 |
_CRTIMP errno_t __cdecl fopen_s(FILE **_File,const char *_Filename,const char *_Mode); |
| 569 |
_CRTIMP errno_t __cdecl freopen_s(FILE** _File, const char *_Filename, const char *_Mode, FILE *_Stream); |
| 570 |
|
| 571 |
_CRTIMP char* __cdecl gets_s(char*,rsize_t); |
| 572 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(char*,get_s,char,_DstBuf) |
| 573 |
|
| 574 |
_CRTIMP errno_t __cdecl tmpnam_s(char*,rsize_t); |
| 575 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(errno_t,tmpnam_s,char,_DstBuf) |
| 576 |
|
| 577 |
|
| 578 |
#ifndef _WSTDIO_S_DEFINED |
| 579 |
#define _WSTDIO_S_DEFINED |
| 580 |
_CRTIMP wchar_t *__cdecl _getws_s(wchar_t *_Str,size_t _SizeInWords); |
| 581 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(wchar_t*,_getws_s,wchar_t,_DstBuf) |
| 582 |
|
| 583 |
#ifdef _UCRT |
| 584 |
int __cdecl __stdio_common_vswprintf_s(unsigned __int64 _Options, wchar_t *_Str, size_t _Len, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList); |
| 585 |
int __cdecl __stdio_common_vsnwprintf_s(unsigned __int64 _Options, wchar_t *_Str, size_t _Len, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList); |
| 586 |
int __cdecl __stdio_common_vfwprintf_s(unsigned __int64 _Options, FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList); |
| 587 |
|
| 588 |
__mingw_ovr int __cdecl _vfwscanf_s_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) |
| 589 |
{ |
| 590 |
return __stdio_common_vfwscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS | _CRT_INTERNAL_SCANF_SECURECRT, _File, _Format, _Locale, _ArgList); |
| 591 |
} |
| 592 |
|
| 593 |
__mingw_ovr int __cdecl _fwscanf_s_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, ...) |
| 594 |
{ |
| 595 |
__builtin_va_list _ArgList; |
| 596 |
int _Ret; |
| 597 |
__builtin_va_start(_ArgList, _Locale); |
| 598 |
_Ret = _vfwscanf_s_l(_File, _Format, _Locale, _ArgList); |
| 599 |
__builtin_va_end(_ArgList); |
| 600 |
return _Ret; |
| 601 |
} |
| 602 |
|
| 603 |
__mingw_ovr int __cdecl fwscanf_s(FILE *_File, const wchar_t *_Format, ...) |
| 604 |
{ |
| 605 |
__builtin_va_list _ArgList; |
| 606 |
int _Ret; |
| 607 |
__builtin_va_start(_ArgList, _Format); |
| 608 |
_Ret = _vfwscanf_s_l(_File, _Format, NULL, _ArgList); |
| 609 |
__builtin_va_end(_ArgList); |
| 610 |
return _Ret; |
| 611 |
} |
| 612 |
|
| 613 |
__mingw_ovr int __cdecl _wscanf_s_l(const wchar_t *_Format, _locale_t _Locale, ...) |
| 614 |
{ |
| 615 |
__builtin_va_list _ArgList; |
| 616 |
int _Ret; |
| 617 |
__builtin_va_start(_ArgList, _Locale); |
| 618 |
_Ret = _vfwscanf_s_l(stdin, _Format, _Locale, _ArgList); |
| 619 |
__builtin_va_end(_ArgList); |
| 620 |
return _Ret; |
| 621 |
} |
| 622 |
|
| 623 |
__mingw_ovr int __cdecl wscanf_s(const wchar_t *_Format, ...) |
| 624 |
{ |
| 625 |
__builtin_va_list _ArgList; |
| 626 |
int _Ret; |
| 627 |
__builtin_va_start(_ArgList, _Format); |
| 628 |
_Ret = _vfwscanf_s_l(stdin, _Format, NULL, _ArgList); |
| 629 |
__builtin_va_end(_ArgList); |
| 630 |
return _Ret; |
| 631 |
} |
| 632 |
|
| 633 |
__mingw_ovr int __cdecl _vswscanf_s_l(const wchar_t *_Src, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) |
| 634 |
{ |
| 635 |
return __stdio_common_vswscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS | _CRT_INTERNAL_SCANF_SECURECRT, _Src, (size_t)-1, _Format, _Locale, _ArgList); |
| 636 |
} |
| 637 |
__mingw_ovr int __cdecl _swscanf_s_l(const wchar_t *_Src, const wchar_t *_Format, _locale_t _Locale, ...) |
| 638 |
{ |
| 639 |
__builtin_va_list _ArgList; |
| 640 |
int _Ret; |
| 641 |
__builtin_va_start(_ArgList, _Locale); |
| 642 |
_Ret = _vswscanf_s_l(_Src, _Format, _Locale, _ArgList); |
| 643 |
__builtin_va_end(_ArgList); |
| 644 |
return _Ret; |
| 645 |
} |
| 646 |
__mingw_ovr int __cdecl swscanf_s(const wchar_t *_Src, const wchar_t *_Format, ...) |
| 647 |
{ |
| 648 |
__builtin_va_list _ArgList; |
| 649 |
int _Ret; |
| 650 |
__builtin_va_start(_ArgList, _Format); |
| 651 |
_Ret = _vswscanf_s_l(_Src, _Format, NULL, _ArgList); |
| 652 |
__builtin_va_end(_ArgList); |
| 653 |
return _Ret; |
| 654 |
} |
| 655 |
|
| 656 |
__mingw_ovr int __cdecl _vsnwscanf_s_l(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) |
| 657 |
{ |
| 658 |
return __stdio_common_vswscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS | _CRT_INTERNAL_SCANF_SECURECRT, _Src, _MaxCount, _Format, _Locale, _ArgList); |
| 659 |
} |
| 660 |
__mingw_ovr int __cdecl _snwscanf_s_l(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...) |
| 661 |
{ |
| 662 |
__builtin_va_list _ArgList; |
| 663 |
int _Ret; |
| 664 |
__builtin_va_start(_ArgList, _Locale); |
| 665 |
_Ret = _vsnwscanf_s_l(_Src, _MaxCount, _Format, _Locale, _ArgList); |
| 666 |
__builtin_va_end(_ArgList); |
| 667 |
return _Ret; |
| 668 |
} |
| 669 |
__mingw_ovr int __cdecl _snwscanf_s(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, ...) |
| 670 |
{ |
| 671 |
__builtin_va_list _ArgList; |
| 672 |
int _Ret; |
| 673 |
__builtin_va_start(_ArgList, _Format); |
| 674 |
_Ret = _vsnwscanf_s_l(_Src, _MaxCount, _Format, NULL, _ArgList); |
| 675 |
__builtin_va_end(_ArgList); |
| 676 |
return _Ret; |
| 677 |
} |
| 678 |
|
| 679 |
__mingw_ovr int __cdecl _vfwprintf_s_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) |
| 680 |
{ |
| 681 |
return __stdio_common_vfwprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _File, _Format, _Locale, _ArgList); |
| 682 |
} |
| 683 |
__mingw_ovr int __cdecl _vwprintf_s_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) |
| 684 |
{ |
| 685 |
return _vfwprintf_s_l(stdout, _Format, _Locale, _ArgList); |
| 686 |
} |
| 687 |
__mingw_ovr int __cdecl vfwprintf_s(FILE *_File, const wchar_t *_Format, va_list _ArgList) |
| 688 |
{ |
| 689 |
return _vfwprintf_s_l(_File, _Format, NULL, _ArgList); |
| 690 |
} |
| 691 |
__mingw_ovr int __cdecl vwprintf_s(const wchar_t *_Format, va_list _ArgList) |
| 692 |
{ |
| 693 |
return _vfwprintf_s_l(stdout, _Format, NULL, _ArgList); |
| 694 |
} |
| 695 |
__mingw_ovr int __cdecl _fwprintf_s_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, ...) |
| 696 |
{ |
| 697 |
__builtin_va_list _ArgList; |
| 698 |
int _Ret; |
| 699 |
__builtin_va_start(_ArgList, _Locale); |
| 700 |
_Ret = _vfwprintf_s_l(_File, _Format, _Locale, _ArgList); |
| 701 |
__builtin_va_end(_ArgList); |
| 702 |
return _Ret; |
| 703 |
} |
| 704 |
__mingw_ovr int __cdecl _wprintf_s_l(const wchar_t *_Format, _locale_t _Locale, ...) |
| 705 |
{ |
| 706 |
__builtin_va_list _ArgList; |
| 707 |
int _Ret; |
| 708 |
__builtin_va_start(_ArgList, _Locale); |
| 709 |
_Ret = _vfwprintf_s_l(stdout, _Format, _Locale, _ArgList); |
| 710 |
__builtin_va_end(_ArgList); |
| 711 |
return _Ret; |
| 712 |
} |
| 713 |
__mingw_ovr int __cdecl fwprintf_s(FILE *_File, const wchar_t *_Format, ...) |
| 714 |
{ |
| 715 |
__builtin_va_list _ArgList; |
| 716 |
int _Ret; |
| 717 |
__builtin_va_start(_ArgList, _Format); |
| 718 |
_Ret = _vfwprintf_s_l(_File, _Format, NULL, _ArgList); |
| 719 |
__builtin_va_end(_ArgList); |
| 720 |
return _Ret; |
| 721 |
} |
| 722 |
__mingw_ovr int __cdecl wprintf_s(const wchar_t *_Format, ...) |
| 723 |
{ |
| 724 |
__builtin_va_list _ArgList; |
| 725 |
int _Ret; |
| 726 |
__builtin_va_start(_ArgList, _Format); |
| 727 |
_Ret = _vfwprintf_s_l(stdout, _Format, NULL, _ArgList); |
| 728 |
__builtin_va_end(_ArgList); |
| 729 |
return _Ret; |
| 730 |
} |
| 731 |
|
| 732 |
__mingw_ovr int __cdecl _vswprintf_s_l(wchar_t *_DstBuf, size_t _DstSize, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) |
| 733 |
{ |
| 734 |
return __stdio_common_vswprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _DstBuf, _DstSize, _Format, _Locale, _ArgList); |
| 735 |
} |
| 736 |
__mingw_ovr int __cdecl vswprintf_s(wchar_t *_DstBuf, size_t _DstSize, const wchar_t *_Format, va_list _ArgList) |
| 737 |
{ |
| 738 |
return _vswprintf_s_l(_DstBuf, _DstSize, _Format, NULL, _ArgList); |
| 739 |
} |
| 740 |
__mingw_ovr int __cdecl _swprintf_s_l(wchar_t *_DstBuf, size_t _DstSize, const wchar_t *_Format, _locale_t _Locale, ...) |
| 741 |
{ |
| 742 |
__builtin_va_list _ArgList; |
| 743 |
int _Ret; |
| 744 |
__builtin_va_start(_ArgList, _Locale); |
| 745 |
_Ret = _vswprintf_s_l(_DstBuf, _DstSize, _Format, _Locale, _ArgList); |
| 746 |
__builtin_va_end(_ArgList); |
| 747 |
return _Ret; |
| 748 |
} |
| 749 |
__mingw_ovr int __cdecl swprintf_s(wchar_t *_DstBuf, size_t _DstSize, const wchar_t *_Format, ...) |
| 750 |
{ |
| 751 |
__builtin_va_list _ArgList; |
| 752 |
int _Ret; |
| 753 |
__builtin_va_start(_ArgList, _Format); |
| 754 |
_Ret = _vswprintf_s_l(_DstBuf, _DstSize, _Format, NULL, _ArgList); |
| 755 |
__builtin_va_end(_ArgList); |
| 756 |
return _Ret; |
| 757 |
} |
| 758 |
|
| 759 |
__mingw_ovr int __cdecl _vsnwprintf_s_l(wchar_t *_DstBuf, size_t _DstSize, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList) |
| 760 |
{ |
| 761 |
return __stdio_common_vsnwprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _DstBuf, _DstSize, _MaxCount, _Format, _Locale, _ArgList); |
| 762 |
} |
| 763 |
__mingw_ovr int __cdecl _vsnwprintf_s(wchar_t *_DstBuf, size_t _DstSize, size_t _MaxCount, const wchar_t *_Format, va_list _ArgList) |
| 764 |
{ |
| 765 |
return _vsnwprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, NULL, _ArgList); |
| 766 |
} |
| 767 |
__mingw_ovr int __cdecl _snwprintf_s_l(wchar_t *_DstBuf, size_t _DstSize, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...) |
| 768 |
{ |
| 769 |
__builtin_va_list _ArgList; |
| 770 |
int _Ret; |
| 771 |
__builtin_va_start(_ArgList, _Locale); |
| 772 |
_Ret = _vsnwprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, _Locale, _ArgList); |
| 773 |
__builtin_va_end(_ArgList); |
| 774 |
return _Ret; |
| 775 |
} |
| 776 |
__mingw_ovr int __cdecl _snwprintf_s(wchar_t *_DstBuf, size_t _DstSize, size_t _MaxCount, const wchar_t *_Format, ...) |
| 777 |
{ |
| 778 |
__builtin_va_list _ArgList; |
| 779 |
int _Ret; |
| 780 |
__builtin_va_start(_ArgList, _Format); |
| 781 |
_Ret = _vsnwprintf_s_l(_DstBuf, _DstSize, _MaxCount, _Format, NULL, _ArgList); |
| 782 |
__builtin_va_end(_ArgList); |
| 783 |
return _Ret; |
| 784 |
} |
| 785 |
#else /* _UCRT */ |
| 786 |
int __cdecl fwprintf_s(FILE *_File,const wchar_t *_Format,...); |
| 787 |
int __cdecl wprintf_s(const wchar_t *_Format,...); |
| 788 |
int __cdecl vfwprintf_s(FILE *_File,const wchar_t *_Format,va_list _ArgList); |
| 789 |
int __cdecl vwprintf_s(const wchar_t *_Format,va_list _ArgList); |
| 790 |
|
| 791 |
int __cdecl vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList); |
| 792 |
|
| 793 |
int __cdecl swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...); |
| 794 |
|
| 795 |
_CRTIMP int __cdecl _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList); |
| 796 |
|
| 797 |
_CRTIMP int __cdecl _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...); |
| 798 |
|
| 799 |
|
| 800 |
_CRTIMP int __cdecl _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...); |
| 801 |
_CRTIMP int __cdecl _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 802 |
_CRTIMP int __cdecl _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); |
| 803 |
_CRTIMP int __cdecl _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 804 |
_CRTIMP int __cdecl _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...); |
| 805 |
_CRTIMP int __cdecl _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 806 |
_CRTIMP int __cdecl _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); |
| 807 |
_CRTIMP int __cdecl _vsnwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 808 |
_CRTIMP int __cdecl _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); |
| 809 |
_CRTIMP int __cdecl fwscanf_s(FILE *_File, const wchar_t *_Format, ...); |
| 810 |
_CRTIMP int __cdecl _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...); |
| 811 |
_CRTIMP int __cdecl swscanf_s(const wchar_t *_Src,const wchar_t *_Format,...); |
| 812 |
_CRTIMP int __cdecl _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...); |
| 813 |
_CRTIMP int __cdecl _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); |
| 814 |
_CRTIMP int __cdecl _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...); |
| 815 |
_CRTIMP int __cdecl wscanf_s(const wchar_t *_Format, ...); |
| 816 |
#endif /* !_UCRT */ |
| 817 |
|
| 818 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(int, vswprintf_s, wchar_t, _Dst, const wchar_t*, _Format, va_list, _ArgList) |
| 819 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1_ARGLIST(int,swprintf_s,vswprintf_s,wchar_t,_Dst,const wchar_t*,_Format) |
| 820 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(int,_vsnwprintf_s,wchar_t,_DstBuf,size_t,_MaxCount,const wchar_t*,_Format,va_list,_ArgList) |
| 821 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2_ARGLIST(int,_snwprintf_s,_vsnwprintf_s,wchar_t,_DstBuf,size_t,_MaxCount,const wchar_t*,_Format) |
| 822 |
|
| 823 |
_CRTIMP errno_t __cdecl _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode); |
| 824 |
_CRTIMP errno_t __cdecl _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile); |
| 825 |
|
| 826 |
_CRTIMP errno_t __cdecl _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords); |
| 827 |
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(errno_t,_wtmpnam_s,wchar_t,_DstBuf) |
| 828 |
|
| 829 |
#ifndef _UCRT |
| 830 |
_CRTIMP int __cdecl _fwprintf_p(FILE *_File,const wchar_t *_Format,...); |
| 831 |
_CRTIMP int __cdecl _wprintf_p(const wchar_t *_Format,...); |
| 832 |
_CRTIMP int __cdecl _vfwprintf_p(FILE *_File,const wchar_t *_Format,va_list _ArgList); |
| 833 |
_CRTIMP int __cdecl _vwprintf_p(const wchar_t *_Format,va_list _ArgList); |
| 834 |
_CRTIMP int __cdecl _swprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,...); |
| 835 |
_SECIMP int __cdecl _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList); |
| 836 |
_CRTIMP int __cdecl _scwprintf_p(const wchar_t *_Format,...); |
| 837 |
_SECIMP int __cdecl _vscwprintf_p(const wchar_t *_Format,va_list _ArgList); |
| 838 |
_CRTIMP int __cdecl _wprintf_l(const wchar_t *_Format,_locale_t _Locale,...); |
| 839 |
_CRTIMP int __cdecl _wprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...); |
| 840 |
_CRTIMP int __cdecl _vwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 841 |
_CRTIMP int __cdecl _vwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 842 |
_CRTIMP int __cdecl _fwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); |
| 843 |
_CRTIMP int __cdecl _fwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); |
| 844 |
_CRTIMP int __cdecl _vfwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 845 |
_CRTIMP int __cdecl _vfwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 846 |
_CRTIMP int __cdecl _swprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); |
| 847 |
_CRTIMP int __cdecl _swprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); |
| 848 |
_CRTIMP int __cdecl _vswprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 849 |
_CRTIMP int __cdecl _vswprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 850 |
_CRTIMP int __cdecl _scwprintf_l(const wchar_t *_Format,_locale_t _Locale,...); |
| 851 |
_CRTIMP int __cdecl _scwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...); |
| 852 |
_CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 853 |
_CRTIMP int __cdecl _snwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); |
| 854 |
_CRTIMP int __cdecl _vsnwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 855 |
_CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...); |
| 856 |
_CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args); |
| 857 |
_CRTIMP int __cdecl _vscwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); |
| 858 |
_CRTIMP int __cdecl _fwscanf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); |
| 859 |
_CRTIMP int __cdecl _swscanf_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...); |
| 860 |
_CRTIMP int __cdecl _snwscanf_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); |
| 861 |
_CRTIMP int __cdecl _wscanf_l(const wchar_t *_Format,_locale_t _Locale,...); |
| 862 |
#endif /* !_UCRT */ |
| 863 |
|
| 864 |
#endif /* _WSTDIO_S_DEFINED */ |
| 865 |
#endif /* _STDIO_S_DEFINED */ |
| 866 |
|
| 867 |
#if __MSVCRT_VERSION__ >= 0x800 |
| 868 |
_CRTIMP size_t __cdecl _fread_nolock_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File); |
| 869 |
#endif |
| 870 |
|
| 871 |
#ifdef __cplusplus |
| 872 |
} |
| 873 |
#endif |
| 874 |
#endif |