kprint.c (265B)
1 #include <stdarg.h> 2 3 #include <libk.h> 4 5 #include "stream.h" 6 7 int 8 kprint(const char *fmt, ...) 9 { 10 va_list ap; 11 Stream stream; 12 13 stream.base = NULL; 14 stream.len = 0; 15 stream.cnt = 0; 16 17 va_start(ap, fmt); 18 doprnt(&stream, fmt, ap); 19 va_end(ap); 20 21 return stream.cnt; 22 }