27#define _INTERNAL_BUFSIZ 4096
28#define _SMALL_BUFSIZ 512
31#define _msbit(c) ((c) & 0x80)
34#define _utf8_is_independent(c) (_msbit(c) == 0)
67#define _utf8_is_leadbyte(c) (_utf8_no_of_trailbytes(static_cast<const unsigned char>(c)) != 0)
114#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E)
117#define IOINFO_ARRAYS 128
120#define _NHANDLE_ (IOINFO_ARRAYS * IOINFO_ARRAY_ELTS)
124#define STDIO_HANDLES_COUNT 3
129#define _pioinfo(i) (__pioinfo[(i) >> IOINFO_L2E] + ((i) & (IOINFO_ARRAY_ELTS - 1)))
130#define _osfhnd(i) (_pioinfo(i)->osfhnd)
131#define _osfile(i) (_pioinfo(i)->osfile)
132#define _pipe_lookahead(i) (_pioinfo(i)->_pipe_lookahead)
133#define _textmode(i) (_pioinfo(i)->textmode)
134#define _tm_unicode(i) (_pioinfo(i)->unicode)
135#define _startpos(i) (_pioinfo(i)->startpos)
136#define _utf8translations(i) (_pioinfo(i)->utf8translations)
137#define _mbBuffer(i) (_pioinfo(i)->mbBuffer)
138#define _dbcsBuffer(i) (_pioinfo(i)->mbBuffer[0])
139#define _dbcsBufferUsed(i) (_pioinfo(i)->dbcsBufferUsed)
145#define _pioinfo_safe(i) ((((i) != -1) && ((i) != -2)) ? _pioinfo(i) : &__badioinfo)
146#define _osfile_safe(i) (_pioinfo_safe(i)->osfile)
147#define _textmode_safe(i) (_pioinfo_safe(i)->textmode)
148#define _tm_unicode_safe(i) (_pioinfo_safe(i)->unicode)
182 _Out_ int* _UnlockFlag,
193 _Out_ int* _UnlockFlag,
220 template <
typename Action>
224 return __crt_seh_guarded_call<decltype(action())>()(
325#define _NO_CONSOLE_FILENO ((intptr_t)-2)
_Out_ int _In_z_ char const _In_ int _In_ int _In_ int _PermissionFlag
_Check_return_ int __cdecl _chsize_nolock_internal(_In_ int _FileHandle, _In_ __int64 _Size, _Inout_ __crt_cached_ptd_host &_Ptd)
_Check_return_opt_ __int64 __cdecl _lseeki64_nolock_internal(_In_ int _FileHandle, _In_ __int64 _Offset, _In_ int _Origin, _Inout_ __crt_cached_ptd_host &_Ptd)
_Out_ int _In_z_ char const _In_ int _In_ int _In_ int _In_ int _SecureFlag
const HANDLE _console_invalid_handle
void __cdecl __acrt_lowio_destroy_handle_array(_Pre_maybenull_ _Post_invalid_ _In_reads_opt_(IOINFO_ARRAY_ELTS) __crt_lowio_handle_data *_Array)
_Check_return_opt_ long __cdecl _lseek_nolock(_In_ int _FileHandle, _In_ long _Offset, _In_ int _Origin)
_Check_return_opt_ int __cdecl _close_nolock_internal(_In_ int _FileHandle, _Inout_ __crt_cached_ptd_host &_Ptd)
_Check_return_ int __cdecl _write_nolock(_In_ int _FileHandle, _In_reads_bytes_(_MaxCharCount) const void *_Buf, _In_ unsigned int _MaxCharCount, __crt_cached_ptd_host &_Ptd)
BOOL __cdecl __dcrt_read_console(_Out_ LPVOID lpBuffer, _In_ DWORD nNumberOfCharsToRead, _Out_ LPDWORD lpNumberOfCharsRead)
BOOL __cdecl __dcrt_read_console_input(_Out_ PINPUT_RECORD lpBuffer, _In_ DWORD nLength, _Out_ LPDWORD lpNumberOfEventsRead)
int __cdecl _alloc_osfhnd(void)
BOOL __cdecl __dcrt_peek_console_input_a(_Out_ PINPUT_RECORD lpBuffer, _In_ DWORD nLength, _Out_ LPDWORD lpNumberOfEventsRead)
BOOL __cdecl __dcrt_get_input_console_mode(_Out_ LPDWORD lpMode)
_Check_return_ int __cdecl _chsize_nolock(_In_ int _FileHandle, _In_ __int64 _Size)
_Check_return_opt_ int __cdecl _close_internal(_In_ int _FileHandle, _Inout_ __crt_cached_ptd_host &_Ptd)
_Check_return_opt_ __int64 __cdecl _lseeki64_internal(_In_ int _FileHandle, _In_ __int64 _Offset, _In_ int _Origin, _Inout_ __crt_cached_ptd_host &_Ptd)
int __cdecl __acrt_lowio_set_os_handle(int, intptr_t)
BOOL __cdecl __dcrt_get_number_of_console_input_events(_Out_ LPDWORD lpcNumberOfEvents)
_Check_return_opt_ errno_t __cdecl __acrt_lowio_ensure_fh_exists(_In_ int _FileHandle)
char __crt_lowio_pipe_lookahead[3]
_Check_return_ int __cdecl _setmode_nolock(_In_ int _FileHandle, _In_ int _Mode)
__crt_lowio_handle_data __badioinfo
__crt_lowio_handle_data * __crt_lowio_handle_data_array[IOINFO_ARRAYS]
_Check_return_opt_ int __cdecl _close_nolock(_In_ int _FileHandle)
BOOL __cdecl __dcrt_lowio_ensure_console_output_initialized(void)
BOOL __cdecl __dcrt_lowio_ensure_console_input_initialized(void)
#define IOINFO_ARRAY_ELTS
char _lookuptrailbytes[256]
__inline char _utf8_no_of_trailbytes(const unsigned char c)
BOOL __cdecl __dcrt_write_console(_In_ void const *lpBuffer, _In_ DWORD nNumberOfCharsToWrite, _Out_ LPDWORD lpNumberOfCharsWritten)
BOOL __cdecl __dcrt_set_input_console_mode(_In_ DWORD dwMode)
auto __acrt_lowio_lock_fh_and_call(int const fh, Action &&action) -> decltype(action())
_Check_return_ __crt_lowio_handle_data *__cdecl __acrt_lowio_create_handle_array()
_Check_return_opt_ long __cdecl _lseek_internal(_In_ int _FileHandle, _In_ long _Offset, _In_ int _Origin, _Inout_ __crt_cached_ptd_host &_Ptd)
int __cdecl _write_internal(_In_ int _FileHandle, _In_reads_bytes_(_MaxCharCount) void const *_Buf, _In_ unsigned int _MaxCharCount, _Inout_ __crt_cached_ptd_host &_Ptd)
_Check_return_ _In_ unsigned int _MaxCharCount
__crt_lowio_handle_data_array __pioinfo
_Check_return_opt_ __int64 __cdecl _lseeki64_nolock(_In_ int _FileHandle, _In_ __int64 _Offset, _In_ int _Origin)
_Out_ int _In_z_ char const _In_ int _OpenFlag
const HANDLE _console_uninitialized_handle
int __cdecl _free_osfhnd(int)
void __cdecl __acrt_lowio_lock_fh(_In_ int _FileHandle)
_Out_ int _In_z_ char const _In_ int _In_ int _ShareFlag
void __cdecl __acrt_lowio_unlock_fh(_In_ int _FileHandle)
_In_ size_t _Inout_ __crt_cached_ptd_host & _Ptd
_Check_return_ _Ret_maybenull_ _In_ size_t _In_ size_t _Size
_Check_return_ _Ret_maybenull_ _In_ size_t _In_ size_t _Offset
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define _In_reads_bytes_(s)
#define _In_reads_opt_(s)
#define _Out_writes_bytes_(s)
errno_t __cdecl _wsopen_nolock(int *const punlock_flag, int *const pfh, wchar_t const *const path, int const oflag, int const shflag, int const pmode, int const secure)
errno_t __cdecl _sopen_nolock(int *const punlock_flag, int *const pfh, char const *const path, int const oflag, int const shflag, int const pmode, int const secure)
int __cdecl _read_nolock(int const fh, void *const result_buffer, unsigned const result_buffer_size)
__crt_lowio_pipe_lookahead _pipe_lookahead
__crt_lowio_text_mode textmode
char mbBuffer[MB_LEN_MAX]
#define _Check_return_opt_
#define _CRT_END_C_HEADER
#define _CRT_BEGIN_C_HEADER
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
_In_ DWORD _Out_ LPDWORD lpNumberOfEventsRead
_In_ DWORD nNumberOfCharsToRead