From 758a1107f87b255678551ada7a090cc7ba28faec Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 5 Jul 2007 18:02:03 +0200 Subject: svn_rev_538 several powerpc fixes --- common/console.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'common/console.c') diff --git a/common/console.c b/common/console.c index 270c927fee..8f8e433b76 100644 --- a/common/console.c +++ b/common/console.c @@ -175,6 +175,24 @@ int fputs(int fd, const char *s) return 0; } +void fprintf (int file, const char *fmt, ...) +{ + va_list args; + uint i; + char printbuffer[CFG_PBSIZE]; + + va_start (args, fmt); + + /* For this to work, printbuffer must be larger than + * anything we ever want to print. + */ + i = vsprintf (printbuffer, fmt, args); + va_end (args); + + /* Print the string */ + fputs (file, printbuffer); +} + void printf (const char *fmt, ...) { va_list args; @@ -193,6 +211,7 @@ void printf (const char *fmt, ...) puts (printbuffer); } + void vprintf (const char *fmt, va_list args) { uint i; -- cgit v1.2.3