2 * COPYRIGHT: GNU GPL, see COPYING in the top level directory
3 * PROJECT: ReactOS crt library
4 * FILE: lib/sdk/crt/printf/swprintf.c
5 * PURPOSE: Implementation of swprintf
6 * PROGRAMMER: Timo Kreuzer
15 #define _tstreamout wstreamout
17 #define _tstreamout streamout
20 int _cdecl
_tstreamout(FILE *stream
, const TCHAR
*format
, va_list argptr
);
23 #if defined(USER32_WSPRINTF) && defined(_M_IX86)
46 stream
._base
= (char*)buffer
;
47 stream
._ptr
= stream
._base
;
50 stream
._cnt
= count
* sizeof(TCHAR
);
52 stream
._cnt
= INT_MAX
;
55 stream
._flag
= _IOSTRG
| _IOWRT
;
59 va_start(argptr
, format
);
61 result
= _tstreamout(&stream
, format
, argptr
);
66 /* Only zero terminate if there is enough space left */
67 if (stream
._cnt
>= sizeof(TCHAR
)) *(TCHAR
*)stream
._ptr
= _T('\0');