DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

form_driver(S)


form_driver -- command processor for the forms subsystem

Syntax

cc ... -lform -lcurses

#include <form.h>

int form_driver(FORM *form, int c);

Description

form_driver(S) is the workhorse of the forms(S) subsystem; it checks to determine whether the character c is a forms( ) request or data.

If c is a request, the form driver executes the request and reports the result.

If c is data (a printable ASCII character), the form driver puts the data into the current position in the current field.

If c is not recognized, the form driver assumes that 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_PAGE Move to the next page.
REQ_PREV_PAGE Move to the previous page.
REQ_FIRST_PAGE Move to the first page.
REQ_LAST_PAGE Move to the last page.
REQ_NEXT_FIELD Move to the next field.
REQ_PREV_FIELD Move to the previous field.
REQ_FIRST_FIELD Move to the first field.
REQ_LAST_FIELD Move to the last field.
REQ_SNEXT_FIELD Move to the sorted next field.
REQ_SPREV_FIELD Move to the sorted prev field.
REQ_SFIRST_FIELD Move to the sorted first field.
REQ_SLAST_FIELD Move to the sorted last field.
REQ_LEFT_FIELD Move left to field.
REQ_RIGHT_FIELD Move right to field.
REQ_UP_FIELD Move up to field.
REQ_DOWN_FIELD Move down to field.
REQ_NEXT_CHAR Move to the next character in the field.
REQ_PREV_CHAR Move to the previous character in the field.
REQ_NEXT_LINE Move to the next line in the field.
REQ_PREV_LINE Move to the previous line in the field.
REQ_NEXT_WORD Move to the next word in the field.
REQ_PREV_WORD Move to the previous word in the field.
REQ_BEG_FIELD Move to the first char in the field.
REQ_END_FIELD Move after the last char in the field.
REQ_BEG_LINE Move to the beginning of the line.
REQ_END_LINE Move after the last char in the line.
REQ_LEFT_CHAR Move left in the field.
REQ_RIGHT_CHAR Move right in the field.
REQ_UP_CHAR Move up in the field.
REQ_DOWN_CHAR Move down in the field.
REQ_NEW_LINE Insert/overlay a new line.
REQ_INS_CHAR Insert the blank character at the cursor.
REQ_INS_LINE Insert a blank line at the cursor.
REQ_DEL_CHAR Delete the character at the cursor.
REQ_DEL_PREV Delete the character before the cursor.
REQ_DEL_LINE Delete the line at the cursor.
REQ_DEL_WORD Delete the word at the cursor.
REQ_CLR_EOL Clear to the end of the line.
REQ_CLR_EOF Clear to the end of the field.
REQ_CLR_FIELD Clear the entire field.
REQ_OVL_MODE Enter overlay mode.
REQ_INS_MODE Enter insert mode.
REQ_SCR_FLINE Scroll the field forward a line.
REQ_SCR_BLINE Scroll the field backward a line.
REQ_SCR_FPAGE Scroll the field forward a page.
REQ_SCR_BPAGE Scroll the field backward a page.
REQ_SCR_FHPAGE Scroll the field forward half a page.
REQ_SCR_BHPAGE Scroll the field backward half a page.
REQ_SCR_FCHAR Horizontal scroll forward a character.
REQ_SCR_BCHAR Horizontal scroll backward a character.
REQ_SCR_HFLINE Horizontal scroll forward a line.
REQ_SCR_HBLINE Horizontal scroll backward a line.
REQ_SCR_HFHALF Horizontal scroll forward half a line.
REQ_SCR_HBHALF Horizontal scroll backward half a line.
REQ_VALIDATION Validate field.
REQ_PREV_CHOICE Display the previous field choice.
REQ_NEXT_CHOICE Display the next field choice.

 REQ_NEXT_PAGE     Move to the next page.
 REQ_PREV_PAGE     Move to the previous page.
 REQ_FIRST_PAGE    Move to the first page.
 REQ_LAST_PAGE     Move to the last page.
 REQ_NEXT_FIELD    Move to the next field.
 REQ_PREV_FIELD    Move to the previous field.
 REQ_FIRST_FIELD   Move to the first field.
 REQ_LAST_FIELD    Move to the last field.
 REQ_SNEXT_FIELD   Move to the sorted next field.
 REQ_SPREV_FIELD   Move to the sorted prev field.
 REQ_SFIRST_FIELD  Move to the sorted first field.
 REQ_SLAST_FIELD   Move to the sorted last field.
 REQ_LEFT_FIELD    Move left to field.
 REQ_RIGHT_FIELD   Move right to field.
 REQ_UP_FIELD      Move up to field.
 REQ_DOWN_FIELD    Move down to field.
 REQ_NEXT_CHAR     Move to the next character in the field.
 REQ_PREV_CHAR     Move to the previous character in the field.
 REQ_NEXT_LINE     Move to the next line in the field.
 REQ_PREV_LINE     Move to the previous line in the field.
 REQ_NEXT_WORD     Move to the next word in the field.
 REQ_PREV_WORD     Move to the previous word in the field.
 REQ_BEG_FIELD     Move to the first char in the field.
 REQ_END_FIELD     Move after the last char in the field.
 REQ_BEG_LINE      Move to the beginning of the line.
 REQ_END_LINE      Move after the last char in the line.
 REQ_LEFT_CHAR     Move left in the field.
 REQ_RIGHT_CHAR    Move right in the field.
 REQ_UP_CHAR       Move up in the field.
 REQ_DOWN_CHAR     Move down in the field.
 REQ_NEW_LINE      Insert/overlay a new line.
 REQ_INS_CHAR      Insert the blank character at the cursor.
 REQ_INS_LINE      Insert a blank line at the cursor.
 REQ_DEL_CHAR      Delete the character at the cursor.
 REQ_DEL_PREV      Delete the character before the cursor.
 REQ_DEL_LINE      Delete the line at the cursor.
 REQ_DEL_WORD      Delete the word at the cursor.
 REQ_CLR_EOL       Clear to the end of the line.
 REQ_CLR_EOF       Clear to the end of the field.
 REQ_CLR_FIELD     Clear the entire field.
 REQ_OVL_MODE      Enter overlay mode.
 REQ_INS_MODE      Enter insert mode.
 REQ_SCR_FLINE     Scroll the field forward a line.
 REQ_SCR_BLINE     Scroll the field backward a line.
 REQ_SCR_FPAGE     Scroll the field forward a page.
 REQ_SCR_BPAGE     Scroll the field backward a page.
 REQ_SCR_FHPAGE    Scroll the field forward half a page.
 REQ_SCR_BHPAGE    Scroll the field backward half a page.
 REQ_SCR_FCHAR     Horizontal scroll forward a character.
 REQ_SCR_BCHAR     Horizontal scroll backward a character.
 REQ_SCR_HFLINE    Horizontal scroll forward a line.
 REQ_SCR_HBLINE    Horizontal scroll backward a line.
 REQ_SCR_HFHALF    Horizontal scroll forward half a line.
 REQ_SCR_HBHALF    Horizontal scroll backward half a line.
 REQ_VALIDATION    Validate field.
 REQ_PREV_CHOICE   Display the previous field choice.
 REQ_NEXT_CHOICE   Display 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.

 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.

Warning

The header file form.h automatically includes the header files eti.h and curses.h.

Files


/usr/lib/libform.a
the library

See also

curses(S), forms(S)

Standards conformance

form_driver(S) is not part of any currently supported standard; it was developed by UNIX System Laboratories, Inc. and is maintained by The SCO Group.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003