int __cdecl _vsnwprintf ( wchar_t *string, size_t count, const wchar_t *format, va_list ap ) #endif /* _COUNT_ */ { FILE str; REG1 FILE *outfile = &str; REG2 int retval; _ASSERTE(string != NULL); _ASSERTE(format != NULL); outfile->_flag = _IOWRT|_IOSTRG; outfile->_ptr = outfile->_base = (char *) string; #ifndef _COUNT_ outfile->_cnt = MAXSTR; #else /* _COUNT_ */ outfile->_cnt = count*sizeof(wchar_t); #endif /* _COUNT_ */ retval = _woutput(outfile,format,ap ); _putc_lk('\0',outfile); /* no-lock version */ _putc_lk('\0',outfile); /* 2nd byte for wide char version */ return(retval); }
int __cdecl fwprintf ( FILE *str, const wchar_t *format, ... ) /* * 'F'ile (stream) 'W'char_t 'PRINT', 'F'ormatted */ { va_list(arglist); REG1 FILE *stream; REG2 int buffing; int retval; // UNDONE: make va_start work with wchar_t format string va_start(arglist, format); _ASSERTE(str != NULL); _ASSERTE(format != NULL); /* Init stream pointer */ stream = str; _lock_str(stream); buffing = _stbuf(stream); retval = _woutput(stream,format,arglist); _ftbuf(buffing, stream); _unlock_str(stream); return(retval); }
int __cdecl vfwprintf ( FILE *str, const wchar_t *format, va_list ap ) /* * 'V'ariable argument 'F'ile (stream) 'W'char_t 'PRINT', 'F'ormatted */ { REG1 FILE *stream; REG2 int buffing; REG3 int retval; _ASSERTE(str != NULL); _ASSERTE(format != NULL); /* Init stream pointer */ stream = str; _lock_str(stream); buffing = _stbuf(stream); retval = _woutput(stream,format,ap ); _ftbuf(buffing, stream); _unlock_str(stream); return(retval); }
int __cdecl vwprintf ( const wchar_t *format, va_list ap ) /* * stdout 'V'ariable, 'W'char_t 'PRINT', 'F'ormatted */ { REG1 FILE *stream = stdout; REG2 int buffing; REG3 int retval; _ASSERTE(format != NULL); _lock_str(stream); buffing = _stbuf(stream); retval = _woutput(stream, format, ap ); _ftbuf(buffing, stream); _unlock_str(stream); return(retval); }