X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Flib%2Fsdk%2Fcrt%2Fprintf%2Fstreamout.c;h=66aae271dd5e64e7cb5c256998356b72421574b1;hp=8e9ce4f667ada1224d311bf0026595bb05cb0aba;hb=d4028b14b9055609d07b99e5a2d6a6a9ddf1798b;hpb=f7404c57db92c0937134095bf4f179bf04ab039b diff --git a/reactos/lib/sdk/crt/printf/streamout.c b/reactos/lib/sdk/crt/printf/streamout.c index 8e9ce4f667a..66aae271dd5 100644 --- a/reactos/lib/sdk/crt/printf/streamout.c +++ b/reactos/lib/sdk/crt/printf/streamout.c @@ -16,13 +16,6 @@ #ifdef _UNICODE # define streamout wstreamout # define format_float format_floatw -# define _flsbuf _flswbuf -int __cdecl _flswbuf(int ch, FILE *stream); -#endif - -#ifdef _LIBCNT_ -# undef _flsbuf -# define _flsbuf(chr, stream) _TEOF #endif #define MB_CUR_MAX 10 @@ -234,25 +227,19 @@ static int streamout_char(FILE *stream, int chr) { +#if defined(_USER32_WSPRINTF) || defined(_LIBCNT_) /* Check if the buffer is full */ if (stream->_cnt < sizeof(TCHAR)) - { -#ifdef _USER32_WSPRINTF - return _TEOF; -#else - /* Strings are done now */ - if (stream->_flag & _IOSTRG) return _TEOF; - - /* Flush buffer for files */ - return _flsbuf(chr, stream) != _TEOF; -#endif - } + return 0; *(TCHAR*)stream->_ptr = chr; stream->_ptr += sizeof(TCHAR); stream->_cnt -= sizeof(TCHAR); return 1; +#else + return _fputtc((TCHAR)chr, stream) != _TEOF; +#endif } static