view 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
line wrap: on
line source

#include <varargs.h>

extern void putchar();

int
printf(va_alist)
	va_dcl
{
	va_list ap;
	char *fmt;
	int len;

	va_start(ap);
	fmt = va_arg(ap, char *);
	len = _doprnt(fmt, ap, &putchar);
	va_end(ap);
	return(len);
}