diff options
author | Marvin Borner | 2020-04-28 20:59:57 +0200 |
---|---|---|
committer | Marvin Borner | 2020-04-28 20:59:57 +0200 |
commit | 5f8b5ce7efb7738eaebad43f9648975788ae19ff (patch) | |
tree | ab8fc4d4baa4adb99dc90461df689650acf34cef /src/kernel/lib/stdio/vprintf.c | |
parent | bfe16de4be67565f1a1e7b1331fcbe3aedf9c54e (diff) |
Fixed userspace entering...
Many other fixes too, but I won't mention them because I don't want to
:)
Diffstat (limited to 'src/kernel/lib/stdio/vprintf.c')
-rw-r--r-- | src/kernel/lib/stdio/vprintf.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/kernel/lib/stdio/vprintf.c b/src/kernel/lib/stdio/vprintf.c index b9188c6..2431a48 100644 --- a/src/kernel/lib/stdio/vprintf.c +++ b/src/kernel/lib/stdio/vprintf.c @@ -5,10 +5,10 @@ #include <kernel/lib/stdlib.h> #include <kernel/memory/alloc.h> -void _writes(const char *data) +void _puts(const char *data) { for (size_t i = 0; i < strlen(data); i++) - writec(data[i]); + putch(data[i]); } void vprintf(const char *fmt, va_list args) @@ -20,7 +20,7 @@ void vprintf(const char *fmt, va_list args) for (; *fmt; fmt++) { if (readyToFormat) { if (*fmt == '%') { - writec('%'); + putch('%'); readyToFormat = 0; continue; } @@ -28,27 +28,27 @@ void vprintf(const char *fmt, va_list args) buff = *fmt; if (buff == 's') { const char *str = va_arg(args, const char *); - _writes(str); + _puts(str); readyToFormat = 0; } else if (buff == 'x') { char *p = htoa((uint32_t)va_arg(args, int)); - _writes(p); + _puts(p); kfree(p); readyToFormat = 0; } else if (buff == 'd') { char *p = itoa(va_arg(args, int)); - _writes(p); + _puts(p); kfree(p); readyToFormat = 0; } else if (buff == 'c') { - writec((char)va_arg(args, int)); + putch((char)va_arg(args, int)); readyToFormat = 0; } } else { if (*fmt == '%') readyToFormat = 1; else - writec(*fmt); + putch(*fmt); } } }
\ No newline at end of file |