Chameleon

Chameleon Svn Source Tree

Root/branches/cparm/i386/libsa/__printf.c

1#include "libsa.h"
2
3static void (*print)(char *);
4
5void __printf_init(void (*print_fn)(char*))
6{
7print = print_fn ? print_fn : NULL;
8}
9
10void __printf(const char * format, ...)
11{
12char buf[4096];
13va_list ap;
14
15if (print != NULL)
16{
17va_start(ap, format);
18vsnprintf(buf, sizeof(buf), format, ap);
19va_end(ap);
20print(buf);
21}
22}

Archive Download this file

Revision: HEAD