From fa25c8f3df6791727b9384c9b405c996ac68b8ab Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Fri, 15 May 2020 18:11:58 -0700 Subject: feat: added buffered io to libn --- sys/libc/stdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/libc/stdio.c') diff --git a/sys/libc/stdio.c b/sys/libc/stdio.c index f3295b2..8bbbe9a 100644 --- a/sys/libc/stdio.c +++ b/sys/libc/stdio.c @@ -8,7 +8,7 @@ printf(byte* fmt, ...) va_start(args, fmt); int nw, rem, peek, len; - byte* str; + byte *str, c; while (*fmt) { rem = INT_MAX - nw; @@ -30,7 +30,7 @@ printf(byte* fmt, ...) switch (*fmt++) { case 'c': - byte c = va_arg(args, int); + c = va_arg(args, int); if (rem < 0) return -1; // TODO: Print here nw++; -- cgit v1.2.1