home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d4xx / d430 / smartfields.lha / SmartFields / Functions / cursor_pos.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-01-11  |  607 b   |  24 lines

  1. /***************************************
  2. *  CURSOR POSition v1.12
  3. *  © Copyright 1988 Timm Martin
  4. *  All Rights Reserved
  5. ****************************************/
  6.  
  7. #include <exec/io.h>
  8. #include <exec/types.h>
  9. #include <console/console.h>
  10. #include <console/functions.h>
  11.  
  12. UBYTE cpos__escdata[] = { CSI, '1', '2', ';', '1', '2', 'H' };
  13.  
  14. void cursor_pos( wreq, row, col )
  15.   struct IOStdReq *wreq;
  16.   int    row, col;
  17. {
  18.   cpos__escdata[1] = row / 10 + '0';
  19.   cpos__escdata[2] = row % 10 + '0';
  20.   cpos__escdata[4] = col / 10 + '0';
  21.   cpos__escdata[5] = col % 10 + '0';
  22.   con_write( wreq, &cpos__escdata[0], 7 );
  23. }
  24.