5a4a951d2ebda30eb7a77fd0faf1d6cfa7258646
2 * COPYRIGHT: GNU GPL, see COPYING in the top level directory
3 * PROJECT: ReactOS crt library
4 * FILE: lib/sdk/crt/printf/_snwprintf.c
5 * PURPOSE: Implementation of _snwprintf
6 * PROGRAMMER: Timo Kreuzer
12 int _cdecl
wstreamout(FILE *stream
, const wchar_t *format
, va_list argptr
);
19 const wchar_t *format
,
26 stream
._base
= (char*)buffer
;
27 stream
._ptr
= stream
._base
;
28 stream
._bufsiz
= count
* sizeof(wchar_t);
29 stream
._cnt
= stream
._bufsiz
;
30 stream
._flag
= _IOSTRG
| _IOWRT
;
34 va_start(argptr
, format
);
35 result
= wstreamout(&stream
, format
, argptr
);
38 /* Only zero terminate if there is enough space left */
39 if (stream
._cnt
>= sizeof(wchar_t)) *(wchar_t*)stream
._ptr
= L
'\0';