/*
** This is a replacement for the amiga.lib kprintf for PowerPC.
** It uses the WarpUp SPrintF function to do debug output
** to the serial connector (or Sushi, if it's installed).
*/

#include <proto/exec.h>
#ifdef __STORM__
#include <clib/powerpc_protos.h>
#else
#ifdef __STORMGCC__
#include <clib/powerpc_protos.h>
#else
#include <powerpc/powerpc_protos.h>
#endif
#endif
#include <stdarg.h>

int kprintf(char *format, ...)
{
#ifndef NDEBUG
	char msg[1024];
	va_list marker;

	va_start(marker, format);
	vsprintf(msg, format, marker);
	va_end(marker);

#ifndef __STORM__
#ifndef __STORMGCC__
	SPrintF(msg, 0);
#endif
#endif
#endif
	return 1;   /* fake something... */

}
