home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
disks
/
disk430.lzh
/
SmartFields
/
Functions
/
field_tab_forward.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-01-11
|
978b
|
39 lines
/***************************************
* FIELD TAB FORWARD v1.11
* © Copyright 1988 Timm Martin
* All Rights Reserved
****************************************/
#include <exec/io.h>
#include <exec/types.h>
#include <console/console.h>
#include <console/fields.h>
#include <console/functions.h>
void field_tab_forward( field, wreq )
struct Field *field;
struct IOStdReq *wreq;
{
int jump; /* jump size */
if ((field->BufferPos + 2 < field->MaxChars) &&
(field->BufferPos < field->NumChars)) {
if (field->NumChars + 1 == field->MaxChars) {
if (field->BufferPos + TAB_JUMP < field->NumChars)
jump = TAB_JUMP;
else
jump = field->NumChars - field->BufferPos - 1;
}
else {
if (field->BufferPos + TAB_JUMP <= field->NumChars)
jump = TAB_JUMP;
else
jump = field->NumChars - field->BufferPos;
}
cursor_jump_right( wreq, jump );
field->BufferPos += jump;
}
else
FLASH_SCREEN;
}