2 * PROJECT: ReactOS kernel-mode tests
3 * LICENSE: GPLv2+ - See COPYING in the top level directory
4 * PURPOSE: Kernel-Mode Test Suite stub functions for any-IRQL vsnprintf
5 * PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
13 int __cdecl
KmtWcToMb(char *mbchar
, wchar_t wchar
)
15 *mbchar
= (char)wchar
;
19 int __cdecl
streamout(FILE *stream
, const char *format
, va_list argptr
);
21 int __cdecl
KmtVSNPrintF(char *buffer
, size_t count
, const char *format
, va_list argptr
)
26 stream
._base
= (char *)buffer
;
27 stream
._ptr
= stream
._base
;
29 stream
._cnt
= (int)count
;
31 stream
._flag
= _IOSTRG
| _IOWRT
;
34 result
= streamout(&stream
, format
, argptr
);
36 /* Only zero terminate if there is enough space left */
37 if (stream
._cnt
) *(char *)stream
._ptr
= '\0';