home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Libraries / stdwin / Packs / vt / vtusesend.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-10-18  |  344 b   |  23 lines  |  [TEXT/????]

  1. /* VT functions that send data back to the serial port. */
  2.  
  3. #include "vtimpl.h"
  4.  
  5. void
  6. vtsendid(vt)
  7.     VT *vt;
  8. {
  9.     vtsend(vt, "\033[?0;0;0c", -1);
  10. }
  11.  
  12. void
  13. vtsendpos(vt)
  14.     VT *vt;
  15. {
  16.     char buf[256];
  17.     int row = vt->cur_row - vt->topterm + 1;
  18.     int col = vt->cur_col + 1;
  19.     CLIPMIN(row, 1);
  20.     sprintf(buf, "\033[%d;%dR", row, col);
  21.     vtsend(vt, buf, -1);
  22. }
  23.