2016-07-25 22:38:47 +02:00
|
|
|
#include <internals/stdio.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
vsnprintf()
|
|
|
|
The most generic formatted printing function around there.
|
|
|
|
*/
|
|
|
|
int vsnprintf(char *str, size_t size, const char *format, va_list args)
|
|
|
|
{
|
|
|
|
int x = __printf(size, format, args);
|
2016-08-29 11:29:07 +02:00
|
|
|
memcpy(str, __stdio_buffer, x + 1);
|
2016-07-25 22:38:47 +02:00
|
|
|
|
|
|
|
return x;
|
|
|
|
}
|