FreeCalypso > hg > freecalypso-sw
comparison loadagent/libprintf/printf.c @ 3:45bf8af5f061
libprintf brought in from older PPC/m68k code, but fucking GCC
refuses to compile <varargs.h> - need to convert to Anshit C <stdarg.h>
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 29 Apr 2013 07:00:22 +0000 |
parents | |
children | 5c7b3d5d5702 |
comparison
equal
deleted
inserted
replaced
2:ddda170fa6f4 | 3:45bf8af5f061 |
---|---|
1 #include <varargs.h> | |
2 | |
3 extern void putchar(); | |
4 | |
5 int | |
6 printf(va_alist) | |
7 va_dcl | |
8 { | |
9 va_list ap; | |
10 char *fmt; | |
11 int len; | |
12 | |
13 va_start(ap); | |
14 fmt = va_arg(ap, char *); | |
15 len = _doprnt(fmt, ap, &putchar); | |
16 va_end(ap); | |
17 return(len); | |
18 } |