summaryrefslogtreecommitdiff
path: root/os/src/fprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/src/fprintf.c')
-rw-r--r--os/src/fprintf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/os/src/fprintf.c b/os/src/fprintf.c
new file mode 100644
index 0000000..10d34e7
--- /dev/null
+++ b/os/src/fprintf.c
@@ -0,0 +1,14 @@
+#include <reent.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <osdebug.h>
+
+int fprintf(FILE * file, const char * fmt, ...) {
+ int r;
+ va_list ap;
+ DBGOUT("fprintf(%p, %p, ...)\r\n", file, fmt);
+ va_start(ap, fmt);
+ r = _vfprintf_r(_impure_ptr, file, fmt, ap);
+ va_end(ap);
+ return r;
+}