ep7
[lunaix-os.git] / lunaix-os / libs / libc / stdio / printf.c
1 #define __LUNAIX_LIBC
2 #include <libc/stdio.h>
3 #include <stdarg.h>
4
5 #include <lunaix/tty/tty.h>
6
7 void
8 printf(char* fmt, ...)
9 {
10     char buffer[1024];
11     va_list args;
12     va_start(args, fmt);
13     __sprintf_internal(buffer, fmt, args);
14     va_end(args);
15
16     // 啊哈,直接操纵framebuffer。日后须改进(FILE* ?)
17     tty_put_str(buffer);
18 }