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

  1. /***************************************
  2. *  CURSOR JUMP LEFT v1.11
  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 cjl__escdata[] = { CSI, '1', '2', '3', 'D' };
  13.  
  14. void cursor_jump_left( wreq, positions )
  15.   struct IOStdReq *wreq;
  16.   int    positions;
  17. {
  18.   if (!positions) return;
  19.   /* because will move left default of 1 position if positions==0 */
  20.  
  21.   cjl__escdata[1] = (positions / 100) + '0';
  22.   cjl__escdata[2] = (positions / 10) % 10 + '0';
  23.   cjl__escdata[3] = (positions % 10) + '0';
  24.   con_write( wreq, &cjl__escdata[0], 5 );
  25. }
  26.