form_driver(3X)
NAME
form_driver − command processor for the forms subsystem
SYNOPSIS
#include <form.h>
int form_driver(FORM ∗form, int c);
DESCRIPTION
form_driver() is the workhorse of the forms subsystem; it checks to determine whether the character c is a forms request or data. If it is a request, the form driver executes the request and reports the result. If it is data (a printable ASCII character), it enters the data into the current position in the current field. If it is not recognized, the form driver assumes it is an application-defined command and returns E_UNKNOWN_COMMAND. Application defined commands should be defined relative to MAX_COMMAND, the maximum value of a request listed below.
Form driver requests:
REQ_NEXT_PAGEMove to the next page.
REQ_PREV_PAGEMove to the previous page.
REQ_FIRST_PAGEMove to the first page.
REQ_LAST_PAGEMove to the last page.
REQ_NEXT_FIELDMove to the next field.
REQ_PREV_FIELDMove to the previous field.
REQ_FIRST_FIELDMove to the first field.
REQ_LAST_FIELDMove to the last field.
REQ_SNEXT_FIELDMove to the sorted next field.
REQ_SPREV_FIELDMove to the sorted prev field.
REQ_SFIRST_FIELDMove to the sorted first field.
REQ_SLAST_FIELDMove to the sorted last field.
REQ_LEFT_FIELDMove left to field.
REQ_RIGHT_FIELDMove right to field.
REQ_UP_FIELDMove up to field.
REQ_DOWN_FIELDMove down to field.
REQ_NEXT_CHARMove to the next character in the field.
REQ_PREV_CHARMove to the previous character in the field.
REQ_NEXT_LINEMove to the next line in the field.
REQ_PREV_LINEMove to the previous line in the field.
REQ_NEXT_WORDMove to the next word in the field.
REQ_PREV_WORDMove to the previous word in the field.
REQ_BEG_FIELDMove to the first char in the field.
REQ_END_FIELDMove after the last char in the field.
REQ_BEG_LINEMove to the beginning of the line.
REQ_END_LINEMove after the last char in the line.
REQ_LEFT_CHARMove left in the field.
REQ_RIGHT_CHARMove right in the field.
REQ_UP_CHARMove up in the field.
REQ_DOWN_CHARMove down in the field.
REQ_NEW_LINEInsert/overlay a new line.
REQ_INS_CHARInsert the blank character at the cursor.
REQ_INS_LINEInsert a blank line at the cursor.
REQ_DEL_CHARDelete the character at the cursor.
REQ_DEL_PREVDelete the character before the cursor.
REQ_DEL_LINEDelete the line at the cursor.
REQ_DEL_WORDDelete the word at the cursor.
REQ_CLR_EOLClear to the end of the line.
REQ_CLR_EOFClear to the end of the field.
REQ_CLR_FIELDClear the entire field.
REQ_OVL_MODEEnter overlay mode.
REQ_INS_MODEEnter insert mode.
REQ_SCR_FLINEScroll the field forward a line.
REQ_SCR_BLINEScroll the field backward a line.
REQ_SCR_FPAGEScroll the field forward a page.
REQ_SCR_BPAGEScroll the field backward a page.
REQ_SCR_FHPAGEScroll the field forward half a page.
REQ_SCR_BHPAGEScroll the field backward half a page.
REQ_SCR_FCHARHorizontal scroll forward a character.
REQ_SCR_BCHARHorizontal scroll backward a character.
REQ_SCR_HFLINEHorizontal scroll forward a line.
REQ_SCR_HBLINEHorizontal scroll backward a line.
REQ_SCR_HFHALFHorizontal scroll forward half a line.
REQ_SCR_HBHALFHorizontal scroll backward half a line.
REQ_VALIDATIONValidate field.
REQ_PREV_CHOICEDisplay the previous field choice.
REQ_NEXT_CHOICEDisplay the next field choice.
RETURN VALUES
form_driver() returns one of the following:
E_OK−The function returned successfully.
E_SYSTEM_ERROR−System error.
E_BAD_ARGUMENT−An argument is incorrect.
E_NOT_POSTED−The form is not posted.
E_INVALID_FIELD−The field contents are invalid.
E_BAD_STATE−The routine was called from an
initialization or termination
function.
E_REQUEST_DENIED−The form driver request failed.
E_UNKNOWN_COMMAND−An unknown request was passed to
the the form driver.
NOTES
The header <form.h> automatically includes the headers <eti.h> and <curses.h>.
SEE ALSO
SunOS 5.1/SPARC — Last change: 3 Jul 1990