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>
8 vsprintf(char *str
, const char *fmt
, va_list ap
)
13 f
._flag
= _IOWRT
|_IOSTRG
;
17 len
= vfprintf(&f
,fmt
, ap
);
23 vswprintf(wchar_t *str
, const wchar_t *fmt
, va_list ap
)
28 f
._flag
= _IOWRT
|_IOSTRG
;
32 len
= vfwprintf(&f
,fmt
, ap
);
39 _vsnprintf(char *str
, size_t maxlen
, const char *fmt
, va_list ap
)
43 f
._flag
= _IOWRT
|_IOSTRG
;
47 len
= vfprintf(&f
,fmt
, ap
);
48 // what if the buffer is full ??
54 _vsnwprintf(wchar_t *str
, size_t maxlen
, const wchar_t *fmt
, va_list ap
)
58 f
._flag
= _IOWRT
|_IOSTRG
;
62 len
= vfwprintf(&f
,fmt
, ap
);
63 // what if the buffer is full ??