summaryrefslogtreecommitdiff
path: root/os/src/printf.c
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-01-28 00:35:56 -0800
committerPixel <pixel@nobis-crew.org>2011-01-28 00:35:56 -0800
commitc8a010ba85e8325fdbf7468ef49744ff1f09f213 (patch)
treeaf7ef6d67d0cf47faef0c8bc339aeb75cedc139d /os/src/printf.c
parentf3906ecc2cacaf75efa1e54f453ff723cddd3d66 (diff)
Adding a few more 'syscalls' to our libc.
Diffstat (limited to 'os/src/printf.c')
-rw-r--r--os/src/printf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/os/src/printf.c b/os/src/printf.c
new file mode 100644
index 0000000..599857c
--- /dev/null
+++ b/os/src/printf.c
@@ -0,0 +1,14 @@
+#include <reent.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <osdebug.h>
+
+int printf(const char * fmt, ...) {
+ int r;
+ va_list ap;
+ DBGOUT("printf(%p, ...)\r\n", fmt);
+ va_start(ap, fmt);
+ r = _vprintf_r(_impure_ptr, fmt, ap);
+ va_end(ap);
+ return r;
+}