EMILE/libunix/printf.c

29 lines
419 B
C
Raw Normal View History

2005-11-12 21:30:19 +00:00
/*
*
* (c) 2004,2005 Laurent Vivier <Laurent@lvivier.info>
2005-11-12 21:30:19 +00:00
*
*/
2005-11-08 02:04:54 +00:00
#include <stdarg.h>
#include <stdio.h>
extern void console_putstring(const char *s);
static char __printf_buffer[2048];
int
printf(const char * format, ...)
{
va_list args;
int len;
va_start(args, format);
len = vsprintf(__printf_buffer, format, args);
va_end(args);
if (len)
console_putstring(__printf_buffer);
return len;
}