Support to multi-threading and pthread interface (POSIX.1-2008) (#23)
[lunaix-os.git] / lunaix-os / usr / libc / src / printf.c
1 #include "_mystdio.h"
2 #include <stdio.h>
3 #include <unistd.h>
4
5 int
6 printf(const char* fmt, ...)
7 {
8     char buf[512];
9     va_list args;
10     va_start(args, fmt);
11     int n = __vprintf_internal(buf, fmt, 512, args);
12     va_end(args);
13
14     return write(stdout, buf, n);
15 }