diff options
author | Pixel <pixel@nobis-crew.org> | 2011-01-28 00:35:56 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-01-28 00:35:56 -0800 |
commit | c8a010ba85e8325fdbf7468ef49744ff1f09f213 (patch) | |
tree | af7ef6d67d0cf47faef0c8bc339aeb75cedc139d /os/src/printf.c | |
parent | f3906ecc2cacaf75efa1e54f453ff723cddd3d66 (diff) |
Adding a few more 'syscalls' to our libc.
Diffstat (limited to 'os/src/printf.c')
-rw-r--r-- | os/src/printf.c | 14 |
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; +} |