home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / VIDEO / VPUTC.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  424 b   |  25 lines

  1. /* vputc.c (emx+gcc) -- Copyright (c) 1987-1993 by Eberhard Mattes */
  2.  
  3. #include <sys/video.h>
  4. #include "video2.h"
  5.  
  6. void v_putc (char c)
  7. {
  8.   if (c != '\n')
  9.     {
  10.       v_putn (c, 1);
  11.       ++_v_x;
  12.     }
  13.   if (c == '\n' || _v_x >= _v_width)
  14.     {
  15.       _v_x = 0;
  16.       ++_v_y;
  17.       if (_v_y >= _v_height)
  18.         {
  19.           --_v_y;
  20.           v_scrollup ();
  21.         }
  22.     }
  23.   v_gotoxy (_v_x, _v_y);
  24. }
  25.