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

  1. /***************************************
  2. *  FIELD RIGHT 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/fields.h>
  11. #include <console/functions.h>
  12.  
  13. void field_right( field, wreq )
  14.   struct Field *field;
  15.   struct IOStdReq *wreq;
  16. {
  17.   int  hold;                 /* temporary variable */
  18.  
  19.   if ((field->BufferPos + 2 < field->MaxChars) &&
  20.       (field->BufferPos < field->NumChars)) {
  21.     if (field->NumChars + 1 == field->MaxChars)
  22.       hold = field->NumChars - 1;
  23.     else
  24.       hold = field->NumChars;
  25.     cursor_jump_right( wreq, hold - field->BufferPos );
  26.     field->BufferPos = hold;
  27.   }
  28.   else
  29.     FLASH_SCREEN;
  30. }
  31.