From 216cc6e0e32f199e2459cfc403b566869006c157 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Sun, 22 May 2005 21:12:21 +0000 Subject: [PATCH] Remove SUPPORT_68000 and add __mulsi3, __udivsi3, __divsi3, umodsi3 and modsi3 to glue.S, add puts() and putchar() to support standard include --- second/printf.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/second/printf.c b/second/printf.c index 10fd747..224ad82 100644 --- a/second/printf.c +++ b/second/printf.c @@ -63,6 +63,20 @@ typedef unsigned char u_char; static char *ksprintn(u_long ul, int base, int *lenp, int prec); +int puts(const char * s) +{ + console_print(s); + + return -1; +} + +int putchar(int c) +{ + console_put(c); + + return c; +} + int sprintf(char * s, const char * format, ...) { va_list params; @@ -219,17 +233,8 @@ ksprintn(u_long ul, int base, int *lenp, int prec) for(i=0;i> 16]; -#else *++p = "0123456789abcdef"[ul % base]; ul /= base; -#endif } while ((--prec > 0 || ul != 0) && p < buf + sizeof(buf) - 1); if (lenp) *lenp = p - buf; @@ -250,7 +255,7 @@ printf(const char * format, ...) va_end(args); if (len) - console_print(__printf_buffer); + puts(__printf_buffer); return len; }