/* vputc.c (emx+gcc) -- Copyright (c) 1987-1993 by Eberhard Mattes */

#include <sys/video.h>
#include "video2.h"

void v_putc (char c)
{
  if (c != '\n')
    {
      v_putn (c, 1);
      ++_v_x;
    }
  if (c == '\n' || _v_x >= _v_width)
    {
      _v_x = 0;
      ++_v_y;
      if (_v_y >= _v_height)
        {
          --_v_y;
          v_scrollup ();
        }
    }
  v_gotoxy (_v_x, _v_y);
}
