#include "eyebot.h"
#include <stdio.h>
#include <stdarg.h>

int
myfprintf(FILE *file, char strbuf[])
{
  int fd = fileno(file);

  if (NULL == strbuf)
    return -1;

  switch (fd)
    {
    case STDOUT:
      LCDPutString(strbuf);
      break;
    case SERIAL1:
      {
	int pos = 0;
	while (strbuf[pos])
	  {
	    OSSendRS232(&strbuf[pos++], fd);
	    while (OSCheckOutRS232(SERIAL1));
	  }
	break;
      }
    }
  return 0;
}
