From 5f8b5ce7efb7738eaebad43f9648975788ae19ff Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 28 Apr 2020 20:59:57 +0200 Subject: Fixed userspace entering... Many other fixes too, but I won't mention them because I don't want to :) --- src/kernel/lib/stdio/vprintf.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/kernel/lib/stdio/vprintf.c') 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 #include -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 -- cgit v1.2.3