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