2020-11-03 15:15:01 +01:00
|
|
|
#include <fxlibc/stdio.h>
|
2020-09-17 19:27:01 +02:00
|
|
|
|
2020-10-14 15:18:10 +02:00
|
|
|
/*
|
|
|
|
** sprintf(), snprintf(), vsprintf() and vsnprintf() write the output under the
|
|
|
|
** control of a format string that specifies how subsequent arguments (or
|
|
|
|
** arguments accessed via the variable-length argument facilities of stdarg(3))
|
|
|
|
** are converted for output then write to the character string str.
|
|
|
|
*/
|
2020-09-17 19:27:01 +02:00
|
|
|
int sprintf(char *restrict str, const char *restrict format, ...)
|
|
|
|
{
|
|
|
|
va_list ap;
|
|
|
|
int size;
|
|
|
|
|
|
|
|
va_start(ap, format);
|
|
|
|
size = vsnprintf(str, 65535, format, ap);
|
|
|
|
va_end(ap);
|
|
|
|
return (size);
|
|
|
|
}
|