added vdprintf() library function

This commit is contained in:
Andrew Tridgell
2013-01-05 07:58:50 +11:00
parent 73b787a8dd
commit 920608bf36
5 changed files with 99 additions and 1 deletions
+15
View File
@@ -149,3 +149,18 @@ int lib_rawprintf(const char *fmt, ...)
return ret;
}
/****************************************************************************
* Name: lib_rawvdprintf
****************************************************************************/
int lib_rawvdprintf(int fd, const char *fmt, va_list ap)
{
/* Wrap the stdout in a stream object and let lib_vsprintf
* do the work.
*/
struct lib_rawoutstream_s rawoutstream;
lib_rawoutstream(&rawoutstream, fd);
return lib_vsprintf(&rawoutstream.public, fmt, ap);
}