#include <minilib.h>
#include <stdarg.h>
#include <output.h>
+#include <serial.h>
#define LOGLEN 96
#define LOG_ONSCREEN 4
{
strcpy(logents[prodptr], s);
prodptr = (prodptr + 1) % LOGLEN;
+ while (*s)
+ serial_tx(*(s++));
+ serial_tx('\r');
+ serial_tx('\n');
if (flush_imm)
outlog();
}
void dologf(const char *fmt, ...)
{
+ char *s;
+ va_list va;
+
+ va_start(va, fmt);
+ vsnprintf(logents[prodptr], 40, fmt, va);
+ s = logents[prodptr];
+ while (*s)
+ serial_tx(*(s++));
+ serial_tx('\r');
+ serial_tx('\n');
+ va_end(va);
+ prodptr = (prodptr + 1) % LOGLEN;
+ if (flush_imm)
+ outlog();
}
void (*outputf)(const char *s, ...) = dologf;