fxlibc/src/stdio/printf.c

20 lines
461 B
C
Raw Normal View History

2020-09-17 19:27:01 +02:00
#include <stdio.h>
#include <unistd.h>
2020-10-14 15:18:10 +02:00
/*
** printf() 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 STDOUT.
*/
2020-09-17 19:27:01 +02:00
int printf(const char *restrict format, ...)
{
va_list ap;
int ret;
va_start(ap, format);
ret = vdprintf(STDOUT_FILENO, format, ap);
va_end(ap);
return (ret);
}