|
|
|
1 |
|
/*** |
2 |
|
*stdio.h - definitions/declarations for standard I/O routines |
3 |
|
* |
4 |
|
* Copyright (c) Microsoft Corporation. All rights reserved. |
5 |
|
* |
6 |
|
*Purpose: |
7 |
|
* This file defines the structures, values, macros, and functions |
8 |
|
* used by the level 2 I/O ("standard I/O") routines. |
9 |
|
* [ANSI/System V] |
10 |
|
* |
11 |
|
* [Public] |
12 |
|
* |
13 |
|
****/ |
14 |
|
|
15 |
|
#if _MSC_VER > 1000 |
16 |
|
#pragma once |
17 |
|
#endif |
18 |
|
|
19 |
|
#ifndef _INC_STDIO |
20 |
|
#define _INC_STDIO |
21 |
|
|
22 |
|
#include <crtdefs.h> |
23 |
|
#ifdef _MSC_VER |
24 |
|
/* |
25 |
|
* Currently, all MS C compilers for Win32 platforms default to 8 byte |
26 |
|
* alignment. |
27 |
|
*/ |
28 |
|
#pragma pack(push,_CRT_PACKING) |
29 |
|
#endif /* _MSC_VER */ |
30 |
|
|
31 |
|
#ifdef __cplusplus |
32 |
|
extern "C" { |
33 |
|
#endif |
34 |
|
|
35 |
|
|
36 |
|
/* Buffered I/O macros */ |
37 |
|
|
38 |
|
#define BUFSIZ 512 |
39 |
|
|
40 |
|
|
41 |
|
/* |
42 |
|
* Default number of supported streams. _NFILE is confusing and obsolete, but |
43 |
|
* supported anyway for backwards compatibility. |
44 |
|
*/ |
45 |
|
#define _NFILE _NSTREAM_ |
46 |
|
|
47 |
|
#define _NSTREAM_ 512 |
48 |
|
|
49 |
|
/* |
50 |
|
* Number of entries in _iob[] (declared below). Note that _NSTREAM_ must be |
51 |
|
* greater than or equal to _IOB_ENTRIES. |
52 |
|
*/ |
53 |
|
#define _IOB_ENTRIES 20 |
54 |
|
|
55 |
|
#define EOF (-1) |
56 |
|
|
57 |
|
|
58 |
|
#ifndef _FILE_DEFINED |
59 |
|
struct _iobuf { |
60 |
|
char *_ptr; |
61 |
|
int _cnt; |
62 |
|
char *_base; |
63 |
|
int _flag; |
64 |
|
int _file; |
65 |
|
int _charbuf; |
66 |
|
int _bufsiz; |
67 |
|
char *_tmpfname; |
68 |
|
}; |
69 |
|
typedef struct _iobuf FILE; |
70 |
|
#define _FILE_DEFINED |
71 |
|
#endif |
72 |
|
|
73 |
|
|
74 |
|
/* Directory where temporary files may be created. */ |
75 |
|
|
76 |
|
#ifdef _POSIX_ |
77 |
|
#define _P_tmpdir "/" |
78 |
|
#define _wP_tmpdir L"/" |
79 |
|
#else |
80 |
|
#define _P_tmpdir "\\" |
81 |
|
#define _wP_tmpdir L"\\" |
82 |
|
#endif |
83 |
|
|
84 |
|
/* L_tmpnam = length of string _P_tmpdir |
85 |
|
* + 1 if _P_tmpdir does not end in "/" or "\", else 0 |
86 |
|
* + 12 (for the filename string) |
87 |
|
* + 1 (for the null terminator) |
88 |
|
* L_tmpnam_s = length of string _P_tmpdir |
89 |
|
* + 1 if _P_tmpdir does not end in "/" or "\", else 0 |
90 |
|
* + 16 (for the filename string) |
91 |
|
* + 1 (for the null terminator) |
92 |
|
*/ |
93 |
|
#define L_tmpnam (sizeof(_P_tmpdir) + 12) |
94 |
|
#if __STDC_WANT_SECURE_LIB__ |
95 |
|
#define L_tmpnam_s (sizeof(_P_tmpdir) + 16) |
96 |
|
#endif |
97 |
|
|
98 |
|
#ifdef _POSIX_ |
99 |
|
#define L_ctermid 9 |
100 |
|
#define L_cuserid 32 |
101 |
|
#endif |
102 |
|
|
103 |
|
|
104 |
|
/* Seek method constants */ |
105 |
|
|
106 |
|
#define SEEK_CUR 1 |
107 |
|
#define SEEK_END 2 |
108 |
|
#define SEEK_SET 0 |
109 |
|
|
110 |
|
|
111 |
|
#define FILENAME_MAX 260 |
112 |
|
#define FOPEN_MAX 20 |
113 |
|
#define _SYS_OPEN 20 |
114 |
|
#define TMP_MAX 32767 /* SHRT_MAX */ |
115 |
|
#if __STDC_WANT_SECURE_LIB__ |
116 |
|
#define TMP_MAX_S _TMP_MAX_S |
117 |
|
#define _TMP_MAX_S 2147483647 /* INT_MAX */ |
118 |
|
#endif |
119 |
|
|
120 |
|
/* Define NULL pointer value */ |
121 |
|
#ifndef NULL |
122 |
|
#ifdef __cplusplus |
123 |
|
#define NULL 0 |
124 |
|
#else |
125 |
|
#define NULL ((void *)0) |
126 |
|
#endif |
127 |
|
#endif |
128 |
|
|
129 |
|
/* Declare _iob[] array */ |
130 |
|
|
131 |
|
#ifndef _STDIO_DEFINED |
132 |
|
_CRTIMP FILE * __cdecl __iob_func(void); |
133 |
|
#endif /* _STDIO_DEFINED */ |
134 |
|
|
135 |
|
|
136 |
|
/* Define file position type */ |
137 |
|
|
138 |
|
#ifndef _FPOS_T_DEFINED |
139 |
|
#undef _FPOSOFF |
140 |
|
|
141 |
|
#if defined (_POSIX_) |
142 |
|
typedef long fpos_t; |
143 |
|
#define _FPOSOFF(fp) ((long)(fp)) |
144 |
|
#else /* _POSIX_ */ |
145 |
|
|
146 |
|
#if !__STDC__ |
147 |
|
/* At this point we could switch both to long long, but we won't do that till next version to avoid any potential compat issues */ |
148 |
|
typedef __int64 fpos_t; |
149 |
|
#define _FPOSOFF(fp) ((long)(fp)) |
150 |
|
#else |
151 |
|
typedef long long fpos_t; |
152 |
|
#define _FPOSOFF(fp) ((long)(fp)) |
153 |
|
#endif |
154 |
|
#endif /* _POSIX_ */ |
155 |
|
|
156 |
|
#define _FPOS_T_DEFINED |
157 |
|
#endif |
158 |
|
|
159 |
|
#ifndef _STDSTREAM_DEFINED |
160 |
|
#define stdin (&__iob_func()[0]) |
161 |
|
#define stdout (&__iob_func()[1]) |
162 |
|
#define stderr (&__iob_func()[2]) |
163 |
|
#define _STDSTREAM_DEFINED |
164 |
|
#endif |
165 |
|
|
166 |
|
#define _IOREAD 0x0001 |
167 |
|
#define _IOWRT 0x0002 |
168 |
|
|
169 |
|
#define _IOFBF 0x0000 |
170 |
|
#define _IOLBF 0x0040 |
171 |
|
#define _IONBF 0x0004 |
172 |
|
|
173 |
|
#define _IOMYBUF 0x0008 |
174 |
|
#define _IOEOF 0x0010 |
175 |
|
#define _IOERR 0x0020 |
176 |
|
#define _IOSTRG 0x0040 |
177 |
|
#define _IORW 0x0080 |
178 |
|
#ifdef _POSIX_ |
179 |
|
#define _IOAPPEND 0x0200 |
180 |
|
#endif |
181 |
|
|
182 |
|
/* constants used by _set_output_format */ |
183 |
|
#define _TWO_DIGIT_EXPONENT 0x1 |
184 |
|
|
185 |
|
/* Function prototypes */ |
186 |
|
|
187 |
|
#ifndef _STDIO_DEFINED |
188 |
|
|
189 |
|
_Check_return_ _CRTIMP int __cdecl _filbuf(_Inout_ FILE * _File ); |
190 |
|
_Check_return_opt_ _CRTIMP int __cdecl _flsbuf(_In_ int _Ch, _Inout_ FILE * _File); |
191 |
|
|
192 |
|
#ifdef _POSIX_ |
193 |
|
_Check_return_ _CRTIMP FILE * __cdecl _fsopen(_In_z_ const char * _Filename, _In_z_ const char * _Mode); |
194 |
|
#else |
195 |
|
_Check_return_ _CRTIMP FILE * __cdecl _fsopen(_In_z_ const char * _Filename, _In_z_ const char * _Mode, _In_ int _ShFlag); |
196 |
|
#endif |
197 |
|
|
198 |
|
_CRTIMP void __cdecl clearerr(_Inout_ FILE * _File); |
199 |
|
#if __STDC_WANT_SECURE_LIB__ |
200 |
|
_Check_return_wat_ _CRTIMP errno_t __cdecl clearerr_s(_Inout_ FILE * _File ); |
201 |
|
#endif |
202 |
|
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE * _File); |
203 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fcloseall(void); |
204 |
|
|
205 |
|
#ifdef _POSIX_ |
206 |
|
_Check_return_ _CRTIMP FILE * __cdecl fdopen( _In_ int _FileHandle, _In_z_ const char * _Mode); |
207 |
|
#else |
208 |
|
_Check_return_ _CRTIMP FILE * __cdecl _fdopen(_In_ int _FileHandle, _In_z_ const char * _Mode); |
209 |
|
#endif |
210 |
|
|
211 |
|
_Check_return_ _CRTIMP int __cdecl feof(_In_ FILE * _File); |
212 |
|
_Check_return_ _CRTIMP int __cdecl ferror(_In_ FILE * _File); |
213 |
|
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE * _File); |
214 |
|
_Check_return_opt_ _CRTIMP int __cdecl fgetc(_Inout_ FILE * _File); |
215 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fgetchar(void); |
216 |
|
_Check_return_opt_ _CRTIMP int __cdecl fgetpos(_Inout_ FILE * _File , _Out_ fpos_t * _Pos); |
217 |
|
_Check_return_opt_ _CRTIMP char * __cdecl fgets(_Out_z_cap_(_MaxCount) char * _Buf, _In_ int _MaxCount, _Inout_ FILE * _File); |
218 |
|
|
219 |
|
#ifdef _POSIX_ |
220 |
|
_Check_return_ _CRTIMP int __cdecl fileno(_In_ FILE * _File); |
221 |
|
#else |
222 |
|
_Check_return_ _CRTIMP int __cdecl _fileno(_In_ FILE * _File); |
223 |
|
#endif |
224 |
|
|
225 |
|
#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) |
226 |
|
#pragma push_macro("_tempnam") |
227 |
|
#undef _tempnam |
228 |
|
#endif |
229 |
|
|
230 |
|
_Check_return_ _CRTIMP char * __cdecl _tempnam(_In_opt_z_ const char * _DirName, _In_opt_z_ const char * _FilePrefix); |
231 |
|
|
232 |
|
#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) |
233 |
|
#pragma pop_macro("_tempnam") |
234 |
|
#endif |
235 |
|
|
236 |
|
_Check_return_opt_ _CRTIMP int __cdecl _flushall(void); |
237 |
|
_Check_return_ _CRT_INSECURE_DEPRECATE(fopen_s) _CRTIMP FILE * __cdecl fopen(_In_z_ const char * _Filename, _In_z_ const char * _Mode); |
238 |
|
#if __STDC_WANT_SECURE_LIB__ |
239 |
|
_Check_return_wat_ _CRTIMP errno_t __cdecl fopen_s(_Deref_out_opt_ FILE ** _File, _In_z_ const char * _Filename, _In_z_ const char * _Mode); |
240 |
|
#endif |
241 |
|
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const char * _Format, ...); |
242 |
|
#if __STDC_WANT_SECURE_LIB__ |
243 |
|
_Check_return_opt_ _CRTIMP int __cdecl fprintf_s(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const char * _Format, ...); |
244 |
|
#endif |
245 |
|
_Check_return_opt_ _CRTIMP int __cdecl fputc(_In_ int _Ch, _Inout_ FILE * _File); |
246 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fputchar(_In_ int _Ch); |
247 |
|
_Check_return_opt_ _CRTIMP int __cdecl fputs(_In_z_ const char * _Str, _Inout_ FILE * _File); |
248 |
|
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_bytecap_x_(_ElementSize*_Count) void * _DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE * _File); |
249 |
|
#if __STDC_WANT_SECURE_LIB__ |
250 |
|
_Check_return_opt_ _CRTIMP size_t __cdecl fread_s(_Out_bytecap_x_(_ElementSize*_Count) void * _DstBuf, _In_ size_t _DstSize, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE * _File); |
251 |
|
#endif |
252 |
|
_Check_return_ _CRT_INSECURE_DEPRECATE(freopen_s) _CRTIMP FILE * __cdecl freopen(_In_z_ const char * _Filename, _In_z_ const char * _Mode, _Inout_ FILE * _File); |
253 |
|
#if __STDC_WANT_SECURE_LIB__ |
254 |
|
_Check_return_wat_ _CRTIMP errno_t __cdecl freopen_s(_Deref_out_opt_ FILE ** _File, _In_z_ const char * _Filename, _In_z_ const char * _Mode, _Inout_ FILE * _OldFile); |
255 |
|
#endif |
256 |
|
_Check_return_ _CRT_INSECURE_DEPRECATE(fscanf_s) _CRTIMP int __cdecl fscanf(_Inout_ FILE * _File, _In_z_ _Scanf_format_string_ const char * _Format, ...); |
257 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_fscanf_s_l) _CRTIMP int __cdecl _fscanf_l(_Inout_ FILE * _File, _In_z_ _Scanf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
258 |
|
#pragma warning(push) |
259 |
|
#pragma warning(disable:6530) |
260 |
|
#if __STDC_WANT_SECURE_LIB__ |
261 |
|
_Check_return_opt_ _CRTIMP int __cdecl fscanf_s(_Inout_ FILE * _File, _In_z_ _Scanf_s_format_string_ const char * _Format, ...); |
262 |
|
#endif |
263 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fscanf_s_l(_Inout_ FILE * _File, _In_z_ _Scanf_s_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
264 |
|
_Check_return_opt_ _CRTIMP int __cdecl fsetpos(_Inout_ FILE * _File, _In_ const fpos_t * _Pos); |
265 |
|
_Check_return_opt_ _CRTIMP int __cdecl fseek(_Inout_ FILE * _File, _In_ long _Offset, _In_ int _Origin); |
266 |
|
_Check_return_ _CRTIMP long __cdecl ftell(_Inout_ FILE * _File); |
267 |
|
|
268 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fseeki64(_Inout_ FILE * _File, _In_ __int64 _Offset, _In_ int _Origin); |
269 |
|
_Check_return_ _CRTIMP __int64 __cdecl _ftelli64(_Inout_ FILE * _File); |
270 |
|
|
271 |
|
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_count_x_(_Size*_Count) const void * _Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE * _File); |
272 |
|
_Check_return_ _CRTIMP int __cdecl getc(_Inout_ FILE * _File); |
273 |
|
_Check_return_ _CRTIMP int __cdecl getchar(void); |
274 |
|
_Check_return_ _CRTIMP int __cdecl _getmaxstdio(void); |
275 |
|
#if __STDC_WANT_SECURE_LIB__ |
276 |
|
_CRTIMP char * __cdecl gets_s(_Out_z_cap_(_Size) char * _Buf, _In_ rsize_t _Size); |
277 |
|
#endif |
278 |
|
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(char *, gets_s, char, _Buffer) |
279 |
|
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(char *, __RETURN_POLICY_SAME, _CRTIMP, gets, _Pre_notnull_ _Post_z_ _Out_z_cap_c_(((size_t)-1)), char, _Buffer) |
280 |
|
_Check_return_ int __cdecl _getw(_Inout_ FILE * _File); |
281 |
|
#ifndef _CRT_PERROR_DEFINED |
282 |
|
#define _CRT_PERROR_DEFINED |
283 |
|
_CRTIMP void __cdecl perror(_In_opt_z_ const char * _ErrMsg); |
284 |
|
#endif |
285 |
|
_Check_return_opt_ _CRTIMP int __cdecl _pclose(_Inout_ FILE * _File); |
286 |
|
_Check_return_ _CRTIMP FILE * __cdecl _popen(_In_z_ const char * _Command, _In_z_ const char * _Mode); |
287 |
|
_Check_return_opt_ _CRTIMP int __cdecl printf(_In_z_ _Printf_format_string_ const char * _Format, ...); |
288 |
|
#if __STDC_WANT_SECURE_LIB__ |
289 |
|
_Check_return_opt_ _CRTIMP int __cdecl printf_s(_In_z_ _Printf_format_string_ const char * _Format, ...); |
290 |
|
#endif |
291 |
|
_Check_return_opt_ _CRTIMP int __cdecl putc(_In_ int _Ch, _Inout_ FILE * _File); |
292 |
|
_Check_return_opt_ _CRTIMP int __cdecl putchar(_In_ int _Ch); |
293 |
|
_Check_return_opt_ _CRTIMP int __cdecl puts(_In_z_ const char * _Str); |
294 |
|
_Check_return_opt_ _CRTIMP int __cdecl _putw(_In_ int _Word, _Inout_ FILE * _File); |
295 |
|
#ifndef _CRT_DIRECTORY_DEFINED |
296 |
|
#define _CRT_DIRECTORY_DEFINED |
297 |
|
_Check_return_ _CRTIMP int __cdecl remove(_In_z_ const char * _Filename); |
298 |
|
_Check_return_ _CRTIMP int __cdecl rename(_In_z_ const char * _OldFilename, _In_z_ const char * _NewFilename); |
299 |
|
_Check_return_ _CRTIMP int __cdecl _unlink(_In_z_ const char * _Filename); |
300 |
|
#if !__STDC__ |
301 |
|
_Check_return_ _CRT_NONSTDC_DEPRECATE(_unlink) _CRTIMP int __cdecl unlink(_In_z_ const char * _Filename); |
302 |
|
#endif |
303 |
|
#endif |
304 |
|
_CRTIMP void __cdecl rewind(_Inout_ FILE * _File); |
305 |
|
_Check_return_opt_ _CRTIMP int __cdecl _rmtmp(void); |
306 |
|
_Check_return_ _CRT_INSECURE_DEPRECATE(scanf_s) _CRTIMP int __cdecl scanf(_In_z_ _Scanf_format_string_ const char * _Format, ...); |
307 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_scanf_s_l) _CRTIMP int __cdecl _scanf_l(_In_z_ _Scanf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
308 |
|
#if __STDC_WANT_SECURE_LIB__ |
309 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl scanf_s(_In_z_ _Scanf_s_format_string_ const char * _Format, ...); |
310 |
|
#endif |
311 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _scanf_s_l(_In_z_ _Scanf_s_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
312 |
|
_CRT_INSECURE_DEPRECATE(setvbuf) _CRTIMP void __cdecl setbuf(_Inout_ FILE * _File, _Inout_opt_cap_c_(BUFSIZ) _Post_count_c_(0) char * _Buffer); |
313 |
|
_Check_return_opt_ _CRTIMP int __cdecl _setmaxstdio(_In_ int _Max); |
314 |
|
_Check_return_opt_ _CRTIMP unsigned int __cdecl _set_output_format(_In_ unsigned int _Format); |
315 |
|
_Check_return_opt_ _CRTIMP unsigned int __cdecl _get_output_format(void); |
316 |
|
_Check_return_opt_ _CRTIMP int __cdecl setvbuf(_Inout_ FILE * _File, _Inout_opt_z_bytecap_(_Size) char * _Buf, _In_ int _Mode, _In_ size_t _Size); |
317 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _snprintf_s(_Out_z_bytecap_(_SizeInBytes) char * _DstBuf, _In_ size_t _SizeInBytes, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, ...); |
318 |
|
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2_ARGLIST(int, _snprintf_s, _vsnprintf_s, char, _Dest, _In_ size_t, _MaxCount, _In_z_ _Printf_format_string_ const char *,_Format) |
319 |
|
#if __STDC_WANT_SECURE_LIB__ |
320 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl sprintf_s(_Out_z_bytecap_(_SizeInBytes) char * _DstBuf, _In_ size_t _SizeInBytes, _In_z_ _Printf_format_string_ const char * _Format, ...); |
321 |
|
#endif |
322 |
|
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1_ARGLIST(int, sprintf_s, vsprintf_s, char, _Dest, _In_z_ _Printf_format_string_ const char *, _Format) |
323 |
|
_Check_return_ _CRTIMP int __cdecl _scprintf(_In_z_ _Printf_format_string_ const char * _Format, ...); |
324 |
|
_Check_return_ _CRT_INSECURE_DEPRECATE(sscanf_s) _CRTIMP int __cdecl sscanf(_In_z_ const char * _Src, _In_z_ _Scanf_format_string_ const char * _Format, ...); |
325 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_sscanf_s_l) _CRTIMP int __cdecl _sscanf_l(_In_z_ const char * _Src, _In_z_ _Scanf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
326 |
|
#if __STDC_WANT_SECURE_LIB__ |
327 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl sscanf_s(_In_z_ const char * _Src, _In_z_ _Scanf_s_format_string_ const char * _Format, ...); |
328 |
|
#endif |
329 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _sscanf_s_l(_In_z_ const char * _Src, _In_z_ _Scanf_s_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
330 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_snscanf_s) _CRTIMP int __cdecl _snscanf(_In_bytecount_(_MaxCount) _Pre_z_ const char * _Src, _In_ size_t _MaxCount, _In_z_ _Scanf_format_string_ const char * _Format, ...); |
331 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_snscanf_s_l) _CRTIMP int __cdecl _snscanf_l(_In_bytecount_(_MaxCount) _Pre_z_ const char * _Src, _In_ size_t _MaxCount, _In_z_ _Scanf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
332 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _snscanf_s(_In_bytecount_(_MaxCount) _Pre_z_ const char * _Src, _In_ size_t _MaxCount, _In_z_ _Scanf_s_format_string_ const char * _Format, ...); |
333 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _snscanf_s_l(_In_bytecount_(_MaxCount) _Pre_z_ const char * _Src, _In_ size_t _MaxCount, _In_z_ _Scanf_s_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
334 |
|
_Check_return_ _CRT_INSECURE_DEPRECATE(tmpfile_s) _CRTIMP FILE * __cdecl tmpfile(void); |
335 |
|
#if __STDC_WANT_SECURE_LIB__ |
336 |
|
_Check_return_wat_ _CRTIMP errno_t __cdecl tmpfile_s(_Out_opt_ _Deref_post_valid_ FILE ** _File); |
337 |
|
_Check_return_wat_ _CRTIMP errno_t __cdecl tmpnam_s(_Out_z_cap_(_Size) char * _Buf, _In_ rsize_t _Size); |
338 |
|
#endif |
339 |
|
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(errno_t, tmpnam_s, _Deref_post_z_ char, _Buf) |
340 |
|
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(char *, __RETURN_POLICY_DST, _CRTIMP, tmpnam, _Pre_maybenull_ _Post_z_, char, _Buffer) |
341 |
|
_Check_return_opt_ _CRTIMP int __cdecl ungetc(_In_ int _Ch, _Inout_ FILE * _File); |
342 |
|
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
343 |
|
#if __STDC_WANT_SECURE_LIB__ |
344 |
|
_Check_return_opt_ _CRTIMP int __cdecl vfprintf_s(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
345 |
|
#endif |
346 |
|
_Check_return_opt_ _CRTIMP int __cdecl vprintf(_In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
347 |
|
#if __STDC_WANT_SECURE_LIB__ |
348 |
|
_Check_return_opt_ _CRTIMP int __cdecl vprintf_s(_In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
349 |
|
#endif |
350 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(vsnprintf_s) _CRTIMP int __cdecl vsnprintf(_Out_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
351 |
|
#if __STDC_WANT_SECURE_LIB__ |
352 |
|
_Check_return_opt_ _CRTIMP int __cdecl vsnprintf_s(_Out_z_cap_(_DstSize) char * _DstBuf, _In_ size_t _DstSize, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
353 |
|
#endif |
354 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _vsnprintf_s(_Out_z_cap_(_SizeInBytes) char * _DstBuf, _In_ size_t _SizeInBytes, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
355 |
|
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(int, _vsnprintf_s, char, _Dest, _In_ size_t, _MaxCount, _In_z_ _Printf_format_string_ const char *, _Format, va_list, _Args) |
356 |
|
#pragma warning(push) |
357 |
|
#pragma warning(disable:4793) |
358 |
|
__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_ARGLIST_EX(int, __RETURN_POLICY_SAME, _CRTIMP, _snprintf, _vsnprintf, _Pre_notnull_ _Post_maybez_ char, _Out_cap_(_Count) _Post_maybez_, char, _Dest, _In_ size_t, _Count, _In_z_ _Printf_format_string_ const char *, _Format) |
359 |
|
#pragma warning(pop) |
360 |
|
#if __STDC_WANT_SECURE_LIB__ |
361 |
|
_CRTIMP_ALTERNATIVE int __cdecl vsprintf_s(_Out_z_cap_(_SizeInBytes) char * _DstBuf, _In_ size_t _SizeInBytes, _In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
362 |
|
#endif |
363 |
|
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(int, vsprintf_s, char, _Dest, _In_z_ _Printf_format_string_ const char *, _Format, va_list, _Args) |
364 |
|
#pragma warning(push) |
365 |
|
#pragma warning(disable:4793) |
366 |
|
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_ARGLIST(int, __RETURN_POLICY_SAME, _CRTIMP, sprintf, vsprintf, _Pre_notnull_ _Post_z_, char, _Dest, _In_z_ _Printf_format_string_ const char *, _Format) |
367 |
|
#pragma warning(pop) |
368 |
|
_Check_return_ _CRTIMP int __cdecl _vscprintf(_In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
369 |
|
_Check_return_opt_ _CRTIMP int __cdecl _snprintf_c(_Out_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, ...); |
370 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vsnprintf_c(_Out_cap_(_MaxCount) char *_DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
371 |
|
|
372 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fprintf_p(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const char * _Format, ...); |
373 |
|
_Check_return_opt_ _CRTIMP int __cdecl _printf_p(_In_z_ _Printf_format_string_ const char * _Format, ...); |
374 |
|
_Check_return_opt_ _CRTIMP int __cdecl _sprintf_p(_Out_z_cap_(_MaxCount) char * _Dst, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, ...); |
375 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vfprintf_p(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
376 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vprintf_p(_In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
377 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vsprintf_p(_Out_z_cap_(_MaxCount) char * _Dst, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
378 |
|
_Check_return_ _CRTIMP int __cdecl _scprintf_p(_In_z_ _Printf_format_string_ const char * _Format, ...); |
379 |
|
_Check_return_ _CRTIMP int __cdecl _vscprintf_p(_In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList); |
380 |
|
_CRTIMP int __cdecl _set_printf_count_output(_In_ int _Value); |
381 |
|
_CRTIMP int __cdecl _get_printf_count_output(); |
382 |
|
|
383 |
|
_Check_return_opt_ _CRTIMP int __cdecl _printf_l(_In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
384 |
|
_Check_return_opt_ _CRTIMP int __cdecl _printf_p_l(_In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
385 |
|
_Check_return_opt_ _CRTIMP int __cdecl _printf_s_l(_In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
386 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vprintf_l(_In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
387 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vprintf_p_l(_In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
388 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vprintf_s_l(_In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
389 |
|
|
390 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fprintf_l(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
391 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fprintf_p_l(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
392 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fprintf_s_l(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
393 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vfprintf_l(_Inout_ FILE * _File, _In_z_ const char * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
394 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vfprintf_p_l(_Inout_ FILE * _File, _In_z_ const char * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
395 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vfprintf_s_l(_Inout_ FILE * _File, _In_z_ const char * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
396 |
|
|
397 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_sprintf_s_l) _CRTIMP int __cdecl _sprintf_l(_Pre_notnull_ _Post_z_ char * _DstBuf, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
398 |
|
_Check_return_opt_ _CRTIMP int __cdecl _sprintf_p_l(_Out_z_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
399 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _sprintf_s_l(_Out_z_bytecap_(_DstSize) char * _DstBuf, _In_ size_t _DstSize, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
400 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_vsprintf_s_l) _CRTIMP int __cdecl _vsprintf_l(_Pre_notnull_ _Post_z_ char * _DstBuf, _In_z_ const char * _Format, _In_opt_ _locale_t, va_list _ArgList); |
401 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vsprintf_p_l(_Out_z_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char* _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
402 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _vsprintf_s_l(_Out_z_cap_(_DstSize) char * _DstBuf, _In_ size_t _DstSize, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
403 |
|
|
404 |
|
_Check_return_opt_ _CRTIMP int __cdecl _scprintf_l(_In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
405 |
|
_Check_return_opt_ _CRTIMP int __cdecl _scprintf_p_l(_In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
406 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vscprintf_l(_In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
407 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vscprintf_p_l(_In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
408 |
|
|
409 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_snprintf_s_l) _CRTIMP int __cdecl _snprintf_l(_Out_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
410 |
|
_Check_return_opt_ _CRTIMP int __cdecl _snprintf_c_l(_Out_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
411 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _snprintf_s_l(_Out_z_cap_(_DstSize) char * _DstBuf, _In_ size_t _DstSize, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); |
412 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_vsnprintf_s_l) _CRTIMP int __cdecl _vsnprintf_l(_Out_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
413 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vsnprintf_c_l(_Out_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, const char *, _In_opt_ _locale_t _Locale, va_list _ArgList); |
414 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vsnprintf_s_l(_Out_z_cap_(_DstSize) char * _DstBuf, _In_ size_t _DstSize, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char* _Format,_In_opt_ _locale_t _Locale, va_list _ArgList); |
415 |
|
|
416 |
|
#ifndef _WSTDIO_DEFINED |
417 |
|
|
418 |
|
/* wide function prototypes, also declared in wchar.h */ |
419 |
|
|
420 |
|
#ifndef WEOF |
421 |
|
#define WEOF (wint_t)(0xFFFF) |
422 |
|
#endif |
423 |
|
|
424 |
|
#ifdef _POSIX_ |
425 |
|
_Check_return_ _CRTIMP FILE * __cdecl _wfsopen(_In_z_ const wchar_t * _Filename, _In_z_ const wchar_t * _Mode); |
426 |
|
#else |
427 |
|
_Check_return_ _CRTIMP FILE * __cdecl _wfsopen(_In_z_ const wchar_t * _Filename, _In_z_ const wchar_t * _Mode, _In_ int _ShFlag); |
428 |
|
#endif |
429 |
|
|
430 |
|
_Check_return_opt_ _CRTIMP wint_t __cdecl fgetwc(_Inout_ FILE * _File); |
431 |
|
_Check_return_opt_ _CRTIMP wint_t __cdecl _fgetwchar(void); |
432 |
|
_Check_return_opt_ _CRTIMP wint_t __cdecl fputwc(_In_ wchar_t _Ch, _Inout_ FILE * _File); |
433 |
|
_Check_return_opt_ _CRTIMP wint_t __cdecl _fputwchar(_In_ wchar_t _Ch); |
434 |
|
_Check_return_ _CRTIMP wint_t __cdecl getwc(_Inout_ FILE * _File); |
435 |
|
_Check_return_ _CRTIMP wint_t __cdecl getwchar(void); |
436 |
|
_Check_return_opt_ _CRTIMP wint_t __cdecl putwc(_In_ wchar_t _Ch, _Inout_ FILE * _File); |
437 |
|
_Check_return_opt_ _CRTIMP wint_t __cdecl putwchar(_In_ wchar_t _Ch); |
438 |
|
_Check_return_opt_ _CRTIMP wint_t __cdecl ungetwc(_In_ wint_t _Ch, _Inout_ FILE * _File); |
439 |
|
|
440 |
|
_Check_return_opt_ _CRTIMP wchar_t * __cdecl fgetws(_Out_z_cap_(_SizeInWords) wchar_t * _Dst, _In_ int _SizeInWords, _Inout_ FILE * _File); |
441 |
|
_Check_return_opt_ _CRTIMP int __cdecl fputws(_In_z_ const wchar_t * _Str, _Inout_ FILE * _File); |
442 |
|
_Check_return_opt_ _CRTIMP wchar_t * __cdecl _getws_s(_Out_z_cap_(_SizeInWords) wchar_t * _Str, _In_ size_t _SizeInWords); |
443 |
|
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(wchar_t *, _getws_s, wchar_t, _String) |
444 |
|
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(wchar_t *, __RETURN_POLICY_SAME, _CRTIMP, _getws, _Pre_notnull_ _Post_z_, wchar_t, _String) |
445 |
|
_Check_return_opt_ _CRTIMP int __cdecl _putws(_In_z_ const wchar_t * _Str); |
446 |
|
|
447 |
|
_Check_return_opt_ _CRTIMP int __cdecl fwprintf(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const wchar_t * _Format, ...); |
448 |
|
#if __STDC_WANT_SECURE_LIB__ |
449 |
|
_Check_return_opt_ _CRTIMP int __cdecl fwprintf_s(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const wchar_t * _Format, ...); |
450 |
|
#endif |
451 |
|
_Check_return_opt_ _CRTIMP int __cdecl wprintf(_In_z_ _Printf_format_string_ const wchar_t * _Format, ...); |
452 |
|
#if __STDC_WANT_SECURE_LIB__ |
453 |
|
_Check_return_opt_ _CRTIMP int __cdecl wprintf_s(_In_z_ _Printf_format_string_ const wchar_t * _Format, ...); |
454 |
|
#endif |
455 |
|
_Check_return_ _CRTIMP int __cdecl _scwprintf(_In_z_ _Printf_format_string_ const wchar_t * _Format, ...); |
456 |
|
_Check_return_opt_ _CRTIMP int __cdecl vfwprintf(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const wchar_t * _Format, va_list _ArgList); |
457 |
|
#if __STDC_WANT_SECURE_LIB__ |
458 |
|
_Check_return_opt_ _CRTIMP int __cdecl vfwprintf_s(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const wchar_t * _Format, va_list _ArgList); |
459 |
|
#endif |
460 |
|
_Check_return_opt_ _CRTIMP int __cdecl vwprintf(_In_z_ _Printf_format_string_ const wchar_t * _Format, va_list _ArgList); |
461 |
|
#if __STDC_WANT_SECURE_LIB__ |
462 |
|
_Check_return_opt_ _CRTIMP int __cdecl vwprintf_s(_In_z_ _Printf_format_string_ const wchar_t * _Format, va_list _ArgList); |
463 |
|
#endif |
464 |
|
|
465 |
|
#if __STDC_WANT_SECURE_LIB__ |
466 |
|
_CRTIMP_ALTERNATIVE int __cdecl swprintf_s(_Out_z_cap_(_SizeInWords) wchar_t * _Dst, _In_ size_t _SizeInWords, _In_z_ _Printf_format_string_ const wchar_t * _Format, ...); |
467 |
|
#endif |
468 |
|
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1_ARGLIST(int, swprintf_s, vswprintf_s, wchar_t, _Dest, _In_z_ _Printf_format_string_ const wchar_t *, _Format) |
469 |
|
#if __STDC_WANT_SECURE_LIB__ |
470 |
|
_CRTIMP_ALTERNATIVE int __cdecl vswprintf_s(_Out_z_cap_(_SizeInWords) wchar_t * _Dst, _In_ size_t _SizeInWords, _In_z_ _Printf_format_string_ const wchar_t * _Format, va_list _ArgList); |
471 |
|
#endif |
472 |
|
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(int, vswprintf_s, wchar_t, _Dest, _In_z_ _Printf_format_string_ const wchar_t *, _Format, va_list, _Args) |
473 |
|
|
474 |
|
_Check_return_opt_ _CRTIMP int __cdecl _swprintf_c(_Out_z_cap_(_SizeInWords) wchar_t * _DstBuf, _In_ size_t _SizeInWords, _In_z_ _Printf_format_string_ const wchar_t * _Format, ...); |
475 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vswprintf_c(_Out_z_cap_(_SizeInWords) wchar_t * _DstBuf, _In_ size_t _SizeInWords, _In_z_ _Printf_format_string_ const wchar_t * _Format, va_list _ArgList); |
476 |
|
|
477 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _snwprintf_s(_Out_z_cap_(_SizeInWords) wchar_t * _DstBuf, _In_ size_t _SizeInWords, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const wchar_t * _Format, ...); |
478 |
|
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2_ARGLIST(int, _snwprintf_s, _vsnwprintf_s, wchar_t, _Dest, _In_ size_t, _Count, _In_z_ _Printf_format_string_ const wchar_t *, _Format) |
479 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _vsnwprintf_s(_Out_z_cap_(_SizeInWords) wchar_t * _DstBuf, _In_ size_t _SizeInWords, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const wchar_t * _Format, va_list _ArgList); |
480 |
|
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(int, _vsnwprintf_s, wchar_t, _Dest, _In_ size_t, _Count, _In_z_ _Printf_format_string_ const wchar_t *, _Format, va_list, _Args) |
481 |
|
#pragma warning(push) |
482 |
|
#pragma warning(disable:4793) |
483 |
|
__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_ARGLIST_EX(int, __RETURN_POLICY_SAME, _CRTIMP, _snwprintf, _vsnwprintf, _Pre_notnull_ _Post_maybez_ wchar_t, _Out_cap_(_Count) _Post_maybez_, wchar_t, _Dest, _In_ size_t, _Count, _In_z_ _Printf_format_string_ const wchar_t *, _Format) |
484 |
|
#pragma warning(pop) |
485 |
|
|
486 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fwprintf_p(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const wchar_t * _Format, ...); |
487 |
|
_Check_return_opt_ _CRTIMP int __cdecl _wprintf_p(_In_z_ _Printf_format_string_ const wchar_t * _Format, ...); |
488 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vfwprintf_p(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const wchar_t * _Format, va_list _ArgList); |
489 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vwprintf_p(_In_z_ _Printf_format_string_ const wchar_t * _Format, va_list _ArgList); |
490 |
|
_Check_return_opt_ _CRTIMP int __cdecl _swprintf_p(_Out_z_cap_(_MaxCount) wchar_t * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const wchar_t * _Format, ...); |
491 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vswprintf_p(_Out_z_cap_(_MaxCount) wchar_t * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const wchar_t * _Format, va_list _ArgList); |
492 |
|
_Check_return_ _CRTIMP int __cdecl _scwprintf_p(_In_z_ _Printf_format_string_ const wchar_t * _Format, ...); |
503 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fwprintf_p_l(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
504 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fwprintf_s_l(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
505 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vfwprintf_l(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
506 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vfwprintf_p_l(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
507 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vfwprintf_s_l(_Inout_ FILE * _File, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
508 |
|
|
509 |
|
_Check_return_opt_ _CRTIMP int __cdecl _swprintf_c_l(_Out_z_cap_(_MaxCount) wchar_t * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
510 |
|
_Check_return_opt_ _CRTIMP int __cdecl _swprintf_p_l(_Out_z_cap_(_MaxCount) wchar_t * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
511 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _swprintf_s_l(_Out_z_cap_(_DstSize) wchar_t * _DstBuf, _In_ size_t _DstSize, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
512 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vswprintf_c_l(_Out_z_cap_(_MaxCount) wchar_t * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
513 |
|
_Check_return_opt_ _CRTIMP int __cdecl _vswprintf_p_l(_Out_z_cap_(_MaxCount) wchar_t * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
514 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _vswprintf_s_l(_Out_z_cap_(_DstSize) wchar_t * _DstBuf, _In_ size_t _DstSize, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
515 |
|
|
516 |
|
_Check_return_ _CRTIMP int __cdecl _scwprintf_l(_In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
517 |
|
_Check_return_ _CRTIMP int __cdecl _scwprintf_p_l(_In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
518 |
|
_Check_return_ _CRTIMP int __cdecl _vscwprintf_p_l(_In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
519 |
|
|
520 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_snwprintf_s_l) _CRTIMP int __cdecl _snwprintf_l(_Out_cap_(_MaxCount) wchar_t * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
521 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _snwprintf_s_l(_Out_z_cap_(_DstSize) wchar_t * _DstBuf, _In_ size_t _DstSize, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
522 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_vsnwprintf_s_l) _CRTIMP int __cdecl _vsnwprintf_l(_Out_cap_(_MaxCount) wchar_t * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
523 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _vsnwprintf_s_l(_Out_z_cap_(_DstSize) wchar_t * _DstBuf, _In_ size_t _DstSize, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
524 |
|
|
525 |
|
|
526 |
|
#ifndef _CRT_NON_CONFORMING_SWPRINTFS |
527 |
|
|
528 |
|
#define _SWPRINTFS_DEPRECATED _CRT_DEPRECATE_TEXT("swprintf has been changed to conform with the ISO C standard, adding an extra character count parameter. To use traditional Microsoft swprintf, set _CRT_NON_CONFORMING_SWPRINTFS.") |
529 |
|
|
530 |
|
#else |
531 |
|
|
532 |
|
#define _SWPRINTFS_DEPRECATED |
533 |
|
|
534 |
|
#endif /* ifndef _CRT_NON_CONFORMING_SWPRINTFS */ |
535 |
|
|
536 |
|
/* we could end up with a double deprecation, disable warnings 4141 and 4996 */ |
537 |
|
#pragma warning(push) |
538 |
|
#pragma warning(disable:4141 4996 4793) |
539 |
|
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_ARGLIST_EX(int, __RETURN_POLICY_SAME, _SWPRINTFS_DEPRECATED _CRTIMP, _swprintf, _swprintf_s, _vswprintf, vswprintf_s, _Pre_notnull_ _Post_z_, wchar_t, _Dest, _In_z_ _Printf_format_string_ const wchar_t *, _Format) |
540 |
|
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_ARGLIST_EX(int, __RETURN_POLICY_SAME, _SWPRINTFS_DEPRECATED _CRTIMP, __swprintf_l, __vswprintf_l, _vswprintf_s_l, _Pre_notnull_ _Post_z_ wchar_t, , wchar_t, _Dest, _In_z_ _Printf_format_string_ const wchar_t *, _Format, _locale_t, _Plocinfo) |
541 |
|
#pragma warning(pop) |
542 |
|
|
543 |
|
#if !defined(RC_INVOKED) && !defined(__midl) |
544 |
|
#include <swprintf.inl> |
545 |
|
#endif |
546 |
|
|
547 |
|
#ifdef _CRT_NON_CONFORMING_SWPRINTFS |
548 |
|
#ifndef __cplusplus |
549 |
|
#define swprintf _swprintf |
550 |
|
#define vswprintf _vswprintf |
551 |
|
#define _swprintf_l __swprintf_l |
552 |
|
#define _vswprintf_l __vswprintf_l |
553 |
|
#endif |
554 |
|
#endif |
555 |
|
|
556 |
|
#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) |
557 |
|
#pragma push_macro("_wtempnam") |
558 |
|
#undef _wtempnam |
559 |
|
#endif |
560 |
|
|
561 |
|
_Check_return_ _CRTIMP wchar_t * __cdecl _wtempnam(_In_opt_z_ const wchar_t * _Directory, _In_opt_z_ const wchar_t * _FilePrefix); |
562 |
|
|
563 |
|
#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) |
564 |
|
#pragma pop_macro("_wtempnam") |
565 |
|
#endif |
566 |
|
|
567 |
|
_Check_return_ _CRTIMP int __cdecl _vscwprintf(_In_z_ _Printf_format_string_ const wchar_t * _Format, va_list _ArgList); |
568 |
|
_Check_return_ _CRTIMP int __cdecl _vscwprintf_l(_In_z_ _Printf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); |
569 |
|
_Check_return_ _CRT_INSECURE_DEPRECATE(fwscanf_s) _CRTIMP int __cdecl fwscanf(_Inout_ FILE * _File, _In_z_ _Scanf_format_string_ const wchar_t * _Format, ...); |
570 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_fwscanf_s_l) _CRTIMP int __cdecl _fwscanf_l(_Inout_ FILE * _File, _In_z_ _Scanf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
571 |
|
#if __STDC_WANT_SECURE_LIB__ |
572 |
|
_Check_return_opt_ _CRTIMP int __cdecl fwscanf_s(_Inout_ FILE * _File, _In_z_ _Scanf_s_format_string_ const wchar_t * _Format, ...); |
573 |
|
#endif |
574 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fwscanf_s_l(_Inout_ FILE * _File, _In_z_ _Scanf_s_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
575 |
|
_Check_return_ _CRT_INSECURE_DEPRECATE(swscanf_s) _CRTIMP int __cdecl swscanf(_In_z_ const wchar_t * _Src, _In_z_ _Scanf_format_string_ const wchar_t * _Format, ...); |
576 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_swscanf_s_l) _CRTIMP int __cdecl _swscanf_l(_In_z_ const wchar_t * _Src, _In_z_ _Scanf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
577 |
|
#if __STDC_WANT_SECURE_LIB__ |
578 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl swscanf_s(_In_z_ const wchar_t *_Src, _In_z_ _Scanf_s_format_string_ const wchar_t * _Format, ...); |
579 |
|
#endif |
580 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _swscanf_s_l(_In_z_ const wchar_t * _Src, _In_z_ _Scanf_s_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
581 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_snwscanf_s) _CRTIMP int __cdecl _snwscanf(_In_count_(_MaxCount) _Pre_z_ const wchar_t * _Src, _In_ size_t _MaxCount, _In_z_ _Scanf_format_string_ const wchar_t * _Format, ...); |
582 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_snwscanf_s_l) _CRTIMP int __cdecl _snwscanf_l(_In_count_(_MaxCount) _Pre_z_ const wchar_t * _Src, _In_ size_t _MaxCount, _In_z_ _Scanf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
583 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _snwscanf_s(_In_count_(_MaxCount) _Pre_z_ const wchar_t * _Src, _In_ size_t _MaxCount, _In_z_ _Scanf_s_format_string_ const wchar_t * _Format, ...); |
584 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _snwscanf_s_l(_In_count_(_MaxCount) _Pre_z_ const wchar_t * _Src, _In_ size_t _MaxCount, _In_z_ _Scanf_s_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
585 |
|
_Check_return_ _CRT_INSECURE_DEPRECATE(wscanf_s) _CRTIMP int __cdecl wscanf(_In_z_ _Scanf_format_string_ const wchar_t * _Format, ...); |
586 |
|
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_wscanf_s_l) _CRTIMP int __cdecl _wscanf_l(_In_z_ _Scanf_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
587 |
|
#if __STDC_WANT_SECURE_LIB__ |
588 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl wscanf_s(_In_z_ _Scanf_s_format_string_ const wchar_t * _Format, ...); |
589 |
|
#endif |
590 |
|
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _wscanf_s_l(_In_z_ _Scanf_s_format_string_ const wchar_t * _Format, _In_opt_ _locale_t _Locale, ...); |
591 |
|
#pragma warning(pop) |
592 |
|
|
593 |
|
_Check_return_ _CRTIMP FILE * __cdecl _wfdopen(_In_ int _FileHandle , _In_z_ const wchar_t * _Mode); |
594 |
|
_Check_return_ _CRT_INSECURE_DEPRECATE(_wfopen_s) _CRTIMP FILE * __cdecl _wfopen(_In_z_ const wchar_t * _Filename, _In_z_ const wchar_t * _Mode); |
595 |
|
_Check_return_wat_ _CRTIMP errno_t __cdecl _wfopen_s(_Deref_out_opt_ FILE ** _File, _In_z_ const wchar_t * _Filename, _In_z_ const wchar_t * _Mode); |
596 |
|
_Check_return_ _CRT_INSECURE_DEPRECATE(_wfreopen_s) _CRTIMP FILE * __cdecl _wfreopen(_In_z_ const wchar_t * _Filename, _In_z_ const wchar_t * _Mode, _Inout_ FILE * _OldFile); |
597 |
|
_Check_return_wat_ _CRTIMP errno_t __cdecl _wfreopen_s(_Deref_out_opt_ FILE ** _File, _In_z_ const wchar_t * _Filename, _In_z_ const wchar_t * _Mode, _Inout_ FILE * _OldFile); |
598 |
|
|
599 |
|
#ifndef _CRT_WPERROR_DEFINED |
600 |
|
#define _CRT_WPERROR_DEFINED |
601 |
|
_CRTIMP void __cdecl _wperror(_In_opt_z_ const wchar_t * _ErrMsg); |
602 |
|
#endif |
603 |
|
_Check_return_ _CRTIMP FILE * __cdecl _wpopen(_In_z_ const wchar_t *_Command, _In_z_ const wchar_t * _Mode); |
604 |
|
_Check_return_ _CRTIMP int __cdecl _wremove(_In_z_ const wchar_t * _Filename); |
605 |
|
_Check_return_wat_ _CRTIMP errno_t __cdecl _wtmpnam_s(_Out_z_cap_(_SizeInWords) wchar_t * _DstBuf, _In_ size_t _SizeInWords); |
606 |
|
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(errno_t, _wtmpnam_s, _Deref_post_z_ wchar_t, _Buffer) |
607 |
|
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(wchar_t *, __RETURN_POLICY_DST, _CRTIMP, _wtmpnam, _Pre_maybenull_ _Post_z_, wchar_t, _Buffer) |
608 |
|
|
609 |
|
_Check_return_opt_ _CRTIMP wint_t __cdecl _fgetwc_nolock(_Inout_ FILE * _File); |
610 |
|
_Check_return_opt_ _CRTIMP wint_t __cdecl _fputwc_nolock(_In_ wchar_t _Ch, _Inout_ FILE * _File); |
611 |
|
_Check_return_opt_ _CRTIMP wint_t __cdecl _ungetwc_nolock(_In_ wint_t _Ch, _Inout_ FILE * _File); |
612 |
|
|
613 |
|
#undef _CRT_GETPUTWCHAR_NOINLINE |
614 |
|
|
615 |
|
#if !defined(__cplusplus) || defined(_M_CEE_PURE) || defined(_CRT_GETPUTWCHAR_NOINLINE) |
616 |
|
#define getwchar() fgetwc(stdin) |
617 |
|
#define putwchar(_c) fputwc((_c),stdout) |
618 |
|
#else /* __cplusplus */ |
619 |
|
inline wint_t __CRTDECL getwchar() |
620 |
|
{return (fgetwc(stdin)); } /* stdin */ |
621 |
|
inline wint_t __CRTDECL putwchar(wchar_t _C) |
622 |
|
{return (fputwc(_C, stdout)); } /* stdout */ |
623 |
|
#endif /* __cplusplus */ |
624 |
|
|
625 |
|
#define getwc(_stm) fgetwc(_stm) |
626 |
|
#define putwc(_c,_stm) fputwc(_c,_stm) |
627 |
|
#define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm) |
628 |
|
#define _getwc_nolock(_stm) _fgetwc_nolock(_stm) |
629 |
|
|
630 |
|
#if defined(_CRT_DISABLE_PERFCRIT_LOCKS) && !defined(_DLL) |
631 |
|
#define fgetwc(_stm) _getwc_nolock(_stm) |
632 |
|
#define fputwc(_c,_stm) _putwc_nolock(_c,_stm) |
633 |
|
#define ungetwc(_c,_stm) _ungetwc_nolock(_c,_stm) |
634 |
|
#endif |
635 |
|
|
636 |
|
#define _WSTDIO_DEFINED |
637 |
|
#endif /* _WSTDIO_DEFINED */ |
638 |
|
|
639 |
|
#define _STDIO_DEFINED |
640 |
|
#endif /* _STDIO_DEFINED */ |
641 |
|
|
642 |
|
|
643 |
|
/* Macro definitions */ |
644 |
|
|
645 |
|
#if defined(_CRT_DISABLE_PERFCRIT_LOCKS) && !defined(_DLL) |
646 |
|
#define feof(_stream) ((_stream)->_flag & _IOEOF) |
647 |
|
#define ferror(_stream) ((_stream)->_flag & _IOERR) |
648 |
|
#define _fileno(_stream) ((_stream)->_file) |
649 |
|
#define fgetc(_stream) (--(_stream)->_cnt >= 0 \ |
650 |
|
? 0xff & *(_stream)->_ptr++ : _filbuf(_stream)) |
651 |
|
#define putc(_c,_stream) (--(_stream)->_cnt >= 0 \ |
652 |
|
? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream))) |
653 |
|
#define getc(_stream) fgetc(_stream) |
654 |
|
#define getchar() getc(stdin) |
655 |
|
#define putchar(_c) putc((_c),stdout) |
656 |
|
#endif |
657 |
|
|
658 |
|
|
659 |
|
#define _fgetc_nolock(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ : _filbuf(_stream)) |
660 |
|
#define _fputc_nolock(_c,_stream) (--(_stream)->_cnt >= 0 ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream))) |
661 |
|
#define _getc_nolock(_stream) _fgetc_nolock(_stream) |
662 |
|
#define _putc_nolock(_c, _stream) _fputc_nolock(_c, _stream) |
663 |
|
#define _getchar_nolock() _getc_nolock(stdin) |
664 |
|
#define _putchar_nolock(_c) _putc_nolock((_c),stdout) |
665 |
|
#define _getwchar_nolock() _getwc_nolock(stdin) |
666 |
|
#define _putwchar_nolock(_c) _putwc_nolock((_c),stdout) |
667 |
|
|
668 |
|
#ifdef _MT |
669 |
|
_CRTIMP void __cdecl _lock_file(_Inout_ FILE * _File); |
670 |
|
_CRTIMP void __cdecl _unlock_file(_Inout_ FILE * _File); |
671 |
|
#else |
672 |
|
#define _lock_file(c) |
673 |
|
#define _unlock_file(c) |
674 |
|
#endif |
675 |
|
|
676 |
|
|
677 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fclose_nolock(_Inout_ FILE * _File); |
678 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fflush_nolock(_Inout_opt_ FILE * _File); |
679 |
|
_Check_return_opt_ _CRTIMP size_t __cdecl _fread_nolock(_Out_bytecap_x_(_ElementSize*_Count) void * _DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE * _File); |
680 |
|
_Check_return_opt_ _CRTIMP size_t __cdecl _fread_nolock_s(_Out_bytecap_x_(_ElementSize*_Count) void * _DstBuf, _In_ size_t _DstSize, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE * _File); |
681 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fseek_nolock(_Inout_ FILE * _File, _In_ long _Offset, _In_ int _Origin); |
682 |
|
_Check_return_ _CRTIMP long __cdecl _ftell_nolock(_Inout_ FILE * _File); |
683 |
|
_Check_return_opt_ _CRTIMP int __cdecl _fseeki64_nolock(_Inout_ FILE * _File, _In_ __int64 _Offset, _In_ int _Origin); |
684 |
|
_Check_return_ _CRTIMP __int64 __cdecl _ftelli64_nolock(_Inout_ FILE * _File); |
685 |
|
_Check_return_opt_ _CRTIMP size_t __cdecl _fwrite_nolock(_In_bytecount_x_(_Size*_Count) const void * _DstBuf, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE * _File); |
686 |
|
_Check_return_opt_ _CRTIMP int __cdecl _ungetc_nolock(_In_ int _Ch, _Inout_ FILE * _File); |
687 |
|
|
688 |
|
#if defined(_CRT_DISABLE_PERFCRIT_LOCKS) && !defined(_DLL) |
689 |
|
#define fclose(_stm) _fclose_nolock(_stm) |
690 |
|
#define fflush(_stm) _fflush_nolock(_stm) |
691 |
|
#define fread(_DstBuf, _ElementSize, _Count, _File) _fread_nolock(_DstBuf, _ElementSize, _Count, _File) |
692 |
|
#define fread_s(_DstBuf, _DstSize, _ElementSize, _Count, _File) _fread_nolock_s(_DstBuf, _DstSize, _ElementSize, _Count, _File) |
693 |
|
#define fseek(_stm,_offset,_origin) _fseek_nolock(_stm,_offset,_origin) |
694 |
|
#define ftell(_stm) _ftell_nolock(_stm) |
695 |
|
#define _fseeki64(_stm,_offset,_origin) _fseeki64_nolock(_stm,_offset,_origin) |
696 |
|
#define _ftelli64(_stm) _ftelli64_nolock(_stm) |
697 |
|
#define fwrite(_buf,_siz,_cnt,_stm) _fwrite_nolock(_buf,_siz,_cnt,_stm) |
698 |
|
#define ungetc(_c,_stm) _ungetc_nolock(_c,_stm) |
699 |
|
#endif |
700 |
|
|
701 |
|
#if !__STDC__ && !defined(_POSIX_) |
702 |
|
|
703 |
|
/* Non-ANSI names for compatibility */ |
704 |
|
|
705 |
|
#define P_tmpdir _P_tmpdir |
706 |
|
#define SYS_OPEN _SYS_OPEN |
707 |
|
|
708 |
|
#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) |
709 |
|
#pragma push_macro("tempnam") |
710 |
|
#undef tempnam |
711 |
|
#endif |
712 |
|
|
713 |
|
_CRT_NONSTDC_DEPRECATE(_tempnam) _CRTIMP char * __cdecl tempnam(_In_opt_z_ const char * _Directory, _In_opt_z_ const char * _FilePrefix); |
714 |
|
|
715 |
|
#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) |
716 |
|
#pragma pop_macro("tempnam") |
717 |
|
#endif |
718 |
|
|
719 |
|
_Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_fcloseall) _CRTIMP int __cdecl fcloseall(void); |
720 |
|
_Check_return_ _CRT_NONSTDC_DEPRECATE(_fdopen) _CRTIMP FILE * __cdecl fdopen(_In_ int _FileHandle, _In_z_ const char * _Format); |
721 |
|
_Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_fgetchar) _CRTIMP int __cdecl fgetchar(void); |
722 |
|
_Check_return_ _CRT_NONSTDC_DEPRECATE(_fileno) _CRTIMP int __cdecl fileno(_In_ FILE * _File); |
723 |
|
_Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_flushall) _CRTIMP int __cdecl flushall(void); |
724 |
|
_Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_fputchar) _CRTIMP int __cdecl fputchar(_In_ int _Ch); |
725 |
|
_Check_return_ _CRT_NONSTDC_DEPRECATE(_getw) _CRTIMP int __cdecl getw(_Inout_ FILE * _File); |
726 |
|
_Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_putw) _CRTIMP int __cdecl putw(_In_ int _Ch, _Inout_ FILE * _File); |
727 |
|
_Check_return_ _CRT_NONSTDC_DEPRECATE(_rmtmp) _CRTIMP int __cdecl rmtmp(void); |
728 |
|
|
729 |
|
#endif /* __STDC__ */ |
730 |
|
|
731 |
|
#ifdef __cplusplus |
732 |
|
} |
733 |
|
#endif |
734 |
|
|
735 |
|
#ifdef _MSC_VER |
736 |
|
#pragma pack(pop) |
737 |
|
#endif /* _MSC_VER */ |
738 |
|
|
739 |
|
#endif /* _INC_STDIO */ |
740 |
|
|
|
|
|