ReactOS 0.4.16-dev-927-g467dec4
putws.cpp File Reference
Include dependency graph for putws.cpp:

Go to the source code of this file.

Functions

static int __cdecl _putws_internal (wchar_t const *const string, __crt_cached_ptd_host &ptd)
 
int __cdecl _putws (wchar_t const *const string)
 

Function Documentation

◆ _putws()

int __cdecl _putws ( wchar_t const *const  string)

Definition at line 44 of file putws.cpp.

45{
46 __crt_cached_ptd_host ptd;
47 return _putws_internal(string, ptd);
48}
_In_ size_t const _In_ int _In_ bool const _In_ unsigned const _In_ __acrt_rounding_mode const _Inout_ __crt_cached_ptd_host & ptd
Definition: cvt.cpp:355
static int __cdecl _putws_internal(wchar_t const *const string, __crt_cached_ptd_host &ptd)
Definition: putws.cpp:16

◆ _putws_internal()

static int __cdecl _putws_internal ( wchar_t const *const  string,
__crt_cached_ptd_host &  ptd 
)
static

Definition at line 16 of file putws.cpp.

17{
18 _UCRT_VALIDATE_RETURN(ptd, string != nullptr, EINVAL, WEOF);
19
20 FILE* const stream = stdout;
21
22 return __acrt_lock_stream_and_call(stream, [&]() -> int
23 {
24 __acrt_stdio_temporary_buffering_guard const buffering(stream, ptd);
25
26 // Write the string, character-by-character:
27 for (wchar_t const* it = string; *it; ++it)
28 {
30 {
31 return WEOF;
32 }
33 }
34
36 {
37 return WEOF;
38 }
39
40 return 0;
41 });
42}
#define EINVAL
Definition: acclib.h:90
#define _UCRT_VALIDATE_RETURN(ptd, expr, errorcode, retexpr)
_Check_return_opt_ wint_t __cdecl _fputwc_nolock_internal(_In_ wchar_t _Character, _Inout_ FILE *_Stream, _Inout_ __crt_cached_ptd_host &_Ptd)
auto __acrt_lock_stream_and_call(FILE *const stream, Action &&action) -> decltype(action())
#define stdout
Definition: stdio.h:99
#define L(x)
Definition: ntvdm.h:50
#define WEOF
Definition: conio.h:185
Definition: parse.h:23

Referenced by _putws().