1 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2 #include <msvcrt/stdio.h>
3 #include <msvcrt/stdarg.h>
5 #include <msvcrt/internal/file.h>
11 vsprintf(char *str, const char *fmt, va_list ap)
16 f._flag = _IOWRT|_IOSTRG|_IOBINARY;;
20 len = vfprintf(&f,fmt, ap);
29 vswprintf(wchar_t *str, const wchar_t *fmt, va_list ap)
34 f._flag = _IOWRT|_IOSTRG|_IOBINARY;
38 len = vfwprintf(&f,fmt, ap);
39 *(wchar_t*)f._ptr = 0;
48 _vsnprintf(char *str, size_t maxlen, const char *fmt, va_list ap)
52 f._flag = _IOWRT|_IOSTRG|_IOBINARY;
56 len = vfprintf(&f,fmt, ap);
57 // what if the buffer is full ??
66 _vsnwprintf(wchar_t *str, size_t maxlen, const wchar_t *fmt, va_list ap)
70 f._flag = _IOWRT|_IOSTRG|_IOBINARY;
74 len = vfwprintf(&f,fmt, ap);
75 // what if the buffer is full ??
76 *(wchar_t*)f._ptr = 0;