67static int ConToCRTMode[] =
86#define CON_STREAM_SET_MODE(Stream, Mode, CacheCodePage) \
88 fflush((Stream)->fStream); \
89 if ((Mode) < ARRAYSIZE(ConToCRTMode)) \
90 _setmode(_fileno((Stream)->fStream), ConToCRTMode[(Mode)]); \
92 _setmode(_fileno((Stream)->fStream), _O_TEXT); \
110#define CON_STREAM_SET_MODE(Stream, Mode, CacheCodePage) \
112 (Stream)->Mode = (Mode); \
114 if ((Mode) == AnsiText) \
115 (Stream)->CodePage = CacheCodePage; \
116 else if ((Mode) == UTF8Text) \
117 (Stream)->CodePage = CP_UTF8; \
119 (Stream)->CodePage = INVALID_CP; \
163 if (!
Stream->IsInitialized)
220#warning The ConStreamSetCacheCodePage function does not make much sense with the CRT!
281 *
Stream->fStream = *fpOut;
#define INVALID_HANDLE_VALUE
BOOL WINAPI FlushFileBuffers(IN HANDLE hFile)
int CDECL _open_osfhandle(intptr_t handle, int oflags)
FILE *CDECL _fdopen(int fd, const char *mode)
intptr_t CDECL _get_osfhandle(int fd)
int CDECL _fileno(FILE *file)
INT __stdcall ConWrite(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
INT(__stdcall * CON_WRITE_FUNC)(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
static const PCON_STREAM StdStreams[]
#define IsConsoleHandle(h)
BOOL ConStreamInitEx(OUT PCON_STREAM Stream, IN PVOID Handle, IN CON_STREAM_MODE Mode, IN UINT CacheCodePage OPTIONAL, IN CON_WRITE_FUNC WriteFunc OPTIONAL)
BOOL ConStreamSetOSHandle(IN PCON_STREAM Stream, IN HANDLE Handle)
BOOL ConStreamSetCacheCodePage(IN PCON_STREAM Stream, IN UINT CacheCodePage)
#define CON_STREAM_SET_MODE(Stream, Mode, CacheCodePage)
BOOL ConStreamSetMode(IN PCON_STREAM Stream, IN CON_STREAM_MODE Mode, IN UINT CacheCodePage OPTIONAL)
BOOL ConStreamInit(OUT PCON_STREAM Stream, IN PVOID Handle, IN CON_STREAM_MODE Mode, IN UINT CacheCodePage OPTIONAL)
HANDLE ConStreamGetOSHandle(IN PCON_STREAM Stream)
enum _CON_STREAM_MODE CON_STREAM_MODE
PULONG MinorVersion OPTIONAL
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)