summaryrefslogtreecommitdiffstats
path: root/usr/klibc/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/klibc/printf.c')
-rw-r--r--usr/klibc/printf.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/usr/klibc/printf.c b/usr/klibc/printf.c
new file mode 100644
index 0000000..02bdba0
--- /dev/null
+++ b/usr/klibc/printf.c
@@ -0,0 +1,19 @@
+/*
+ * printf.c
+ */
+
+#include <stdio.h>
+#include <stdarg.h>
+
+#define BUFFER_SIZE 16384
+
+int printf(const char *format, ...)
+{
+ va_list ap;
+ int rv;
+
+ va_start(ap, format);
+ rv = vfprintf(stdout, format, ap);
+ va_end(ap);
+ return rv;
+}