mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 00:53:34 +08:00
added vdprintf() library function
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user