21#pragma pack(push, _CRT_PACKING)
133 _In_ wchar_t _Character,
149 _In_ size_t _ElementSize,
150 _In_ size_t _ElementCount,
187 "FILE member of __crt_stdio_stream_data is not at offset zero."
191 sizeof(
FILE) ==
sizeof(
void*),
192 "FILE structure has unexpected size."
297 return __crt_seh_guarded_call<decltype(action())>()(
454class __acrt_stdio_temporary_buffering_guard
458 explicit __acrt_stdio_temporary_buffering_guard(
FILE*
const stream, __crt_cached_ptd_host&
ptd)
throw()
464 __acrt_stdio_temporary_buffering_guard(__acrt_stdio_temporary_buffering_guard
const&)
throw() =
delete;
465 void operator=(__acrt_stdio_temporary_buffering_guard
const&)
throw() =
delete;
467 ~__acrt_stdio_temporary_buffering_guard()
throw()
474 __crt_cached_ptd_host& _ptd;
485template <
typename Character>
574 if (seen_commit_mode) {
578 seen_commit_mode =
true;
585 if (seen_commit_mode) {
589 seen_commit_mode =
true;
590 result._stdio_mode &= ~_IOCOMMIT;
596 if (seen_scan_mode) {
600 seen_scan_mode =
true;
607 if (seen_scan_mode) {
611 seen_scan_mode =
true;
658template <
typename Character>
660 Character
const*
const mode
671 Character
const* it =
mode;
709 bool seen_commit_mode =
false;
710 bool seen_plus =
false;
711 bool seen_scan_mode =
false;
712 bool seen_encoding_flag =
false;
713 for (
bool continue_loop =
true; continue_loop && *it !=
'\0'; it += (continue_loop ? 1 : 0))
736 seen_encoding_flag =
true;
737 continue_loop =
false;
746 if (seen_encoding_flag)
754 if (!seen_encoding_flag)
762 static Character
const ccs[] = {
'c',
'c',
's' };
763 static Character
const utf8_encoding[] = {
'U',
'T',
'F',
'-',
'8' };
764 static Character
const utf16_encoding[] = {
'U',
'T',
'F',
'-',
'1',
'6',
'L',
'E' };
765 static Character
const unicode_encoding[] = {
'U',
'N',
'I',
'C',
'O',
'D',
'E' };
768 if (stdio_traits::tcsncmp(it, ccs,
_countof(ccs)) != 0)
784 if (stdio_traits::tcsnicmp(it, utf8_encoding,
_countof(utf8_encoding)) == 0)
789 else if (stdio_traits::tcsnicmp(it, utf16_encoding,
_countof(utf16_encoding)) == 0)
794 else if (stdio_traits::tcsnicmp(it, unicode_encoding,
_countof(unicode_encoding)) == 0)
828 if (*(
last - 1) ==
'\\')
830 return reinterpret_cast<unsigned char const*
>(
last - 1)
834 if (*(
last - 1) ==
'/')
846 if (*(
last - 1) ==
L'\\')
849 if (*(
last - 1) ==
L'/')
int __cdecl __acrt_stdio_refill_and_read_wide_nolock(FILE *const stream)
int __cdecl __acrt_stdio_refill_and_read_narrow_nolock(FILE *const stream)
int __cdecl __acrt_stdio_flush_and_write_wide_nolock(int const c, FILE *const stream, __crt_cached_ptd_host &ptd)
int __cdecl __acrt_stdio_flush_and_write_narrow_nolock(int const c, FILE *const stream, __crt_cached_ptd_host &ptd)
void __cdecl __acrt_stdio_free_buffer_nolock(FILE *const public_stream)
void __cdecl __acrt_stdio_allocate_buffer_nolock(FILE *const public_stream)
bool __acrt_should_use_temporary_buffer(FILE *const stream)
bool __cdecl __acrt_stdio_begin_temporary_buffering_nolock(FILE *const public_stream)
void __cdecl __acrt_stdio_end_temporary_buffering_nolock(bool const flag, FILE *const public_stream, __crt_cached_ptd_host &ptd)
ACPI_SIZE strlen(const char *String)
bool set_flags(long const flags) const
bool has_setvbuf_buffer() const
__crt_stdio_stream(__crt_stdio_stream_data *const stream)
bool has_any_buffer() const
bool has_crt_buffer() const
__crt_stdio_stream(FILE *const stream)
FILE * public_stream() const
bool has_big_buffer() const
bool has_any_of(long const flags) const
bool is_string_backed() const
__crt_stdio_stream_data * _stream
bool has_temporary_buffer() const
bool unset_flags(long const flags) const
__crt_stdio_stream_data * operator->() const
bool has_all_of(long const flags) const
bool has_user_buffer() const
#define _VALIDATE_STREAM_ANSI_RETURN(stream, errorcode, retexpr)
void __cdecl __acrt_stdio_free_stream(__crt_stdio_stream _Stream)
__acrt_stdio_stream_mode __cdecl __acrt_stdio_parse_mode(Character const *const mode)
_Check_return_opt_ wint_t __cdecl _fputwc_nolock_internal(_In_ wchar_t _Character, _Inout_ FILE *_Stream, _Inout_ __crt_cached_ptd_host &_Ptd)
bool __acrt_stdio_parse_mode_t(__acrt_stdio_stream_mode &result)
void __cdecl __acrt_stdio_reset_buffer(__crt_stdio_stream const stream)
auto __acrt_lock_stream_and_call(FILE *const stream, Action &&action) -> decltype(action())
_Check_return_opt_ size_t __cdecl _fwrite_nolock_internal(_In_reads_bytes_(_ElementSize *_ElementCount) void const *_Buffer, _In_ size_t _ElementSize, _In_ size_t _ElementCount, _Inout_ FILE *_Stream, _Inout_ __crt_cached_ptd_host &_Ptd)
bool __acrt_stdio_parse_mode_T(__acrt_stdio_stream_mode &result)
bool __acrt_stdio_parse_mode_R(__acrt_stdio_stream_mode &result, bool &seen_scan_mode)
bool __acrt_stdio_is_initialized()
bool __acrt_stdio_parse_mode_c(__acrt_stdio_stream_mode &result, bool &seen_commit_mode)
bool __acrt_stdio_parse_mode_N(__acrt_stdio_stream_mode &result)
__crt_stdio_stream __cdecl __acrt_stdio_allocate_stream()
bool __acrt_stdio_parse_mode_b(__acrt_stdio_stream_mode &result)
_Inout_ FILE _Inout_ __crt_cached_ptd_host & _Ptd
bool __acrt_stdio_parse_mode_x(__acrt_stdio_stream_mode &result)
bool __acrt_stdio_parse_mode_n(__acrt_stdio_stream_mode &result, bool &seen_commit_mode)
bool __acrt_stdio_parse_mode_plus(__acrt_stdio_stream_mode &result, bool &seen_plus)
bool __acrt_stdio_parse_mode_D(__acrt_stdio_stream_mode &result)
_Check_return_opt_ int __cdecl _putch_nolock_internal(_In_ int _Ch, _Inout_ __crt_cached_ptd_host &_Ptd)
__crt_stdio_stream_data ** __piob
bool __acrt_stdio_parse_mode_S(__acrt_stdio_stream_mode &result, bool &seen_scan_mode)
_Check_return_opt_ wint_t __cdecl _putwch_nolock_internal(_In_ wchar_t _Ch, _Inout_ __crt_cached_ptd_host &_Ptd)
bool __cdecl __crt_stdio_path_requires_backslash(char const *const first)
_Check_return_ __int64 __cdecl _ftelli64_nolock_internal(_Inout_ FILE *_Stream, _Inout_ __crt_cached_ptd_host &_Ptd)
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
result_buffer_count char *const _In_ int const _In_ bool const _In_ unsigned const _In_ STRFLT const _In_ bool const _Inout_ __crt_cached_ptd_host &ptd throw()
_In_ size_t const _In_ int _In_ bool const _In_ unsigned const _In_ __acrt_rounding_mode const _Inout_ __crt_cached_ptd_host & ptd
int __cdecl __acrt_stdio_flush_nolock(FILE *const public_stream, __crt_cached_ptd_host &ptd)
int __cdecl _fputc_nolock_internal(int const c, FILE *const public_stream, __crt_cached_ptd_host &ptd)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
_Check_return_ _CRTIMP _CONST_RETURN unsigned char *__cdecl _mbsrchr(_In_z_ const unsigned char *_Str, _In_ unsigned int _Ch)
_CRTIMP void __cdecl _unlock_file(_Inout_ FILE *_File)
_CRTIMP void __cdecl _lock_file(_Inout_ FILE *_File)
_CRTIMP char *__cdecl gets(char *_Buffer)
_CRTIMP wchar_t *__cdecl _getws(wchar_t *_String)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_In_ _Pre_notnull_ _Buffer
long _InterlockedOr(_Interlocked_operand_ long volatile *_Value, long _Mask)
long __cdecl _InterlockedExchange(_Interlocked_operand_ long volatile *_Target, long _Value)
volatile char *const const char modify _InterlockedAnd
#define _In_reads_bytes_(s)
#define _Out_writes_z_(s)
#define _Post_satisfies_(e)
#define _Out_writes_to_(s, c)
#define UNREFERENCED_PARAMETER(P)
FILE *__cdecl _wopenfile(wchar_t const *const file_name, wchar_t const *const mode, int const share_flag, FILE *const public_stream)
FILE *__cdecl _openfile(char const *const file_name, char const *const mode, int const share_flag, FILE *const public_stream)
#define offsetof(TYPE, MEMBER)
_CRTIMP wchar_t * _cgetws(_Pre_notnull_ _Post_z_ wchar_t *_Buffer)
_Check_return_ _CRTIMP int __cdecl __cdecl eof(_In_ int _FileHandle)
_Check_return_ wchar_t _Ch
static bool validate_stream_is_ansi_if_required(FILE *const stream)
static bool validate_stream_is_ansi_if_required(FILE *const stream)
void __cdecl __acrt_stdio_free_tmpfile_name_buffers_nolock()
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0_CGETS(_ReturnType, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst)
#define _Check_return_opt_
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst)
#define __RETURN_POLICY_SAME(_FunctionCall)
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action