FORM_DRIVER(3CURSES) | Curses Library Functions | FORM_DRIVER(3CURSES) |
form_driver - command processor for the forms subsystem
cc [ flag... ] file... -lform -lcurses [ library... ] #include <form.h> int form_driver(FORM *form, int c);
The form_driver() function 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_PAGE
REQ_PREV_PAGE
REQ_FIRST_PAGE
REQ_LAST_PAGE
REQ_NEXT_FIELD
REQ_PREV_FIELD
REQ_FIRST_FIELD
REQ_LAST_FIELD
REQ_SNEXT_FIELD
REQ_SPREV_FIELD
REQ_SFIRST_FIELD
REQ_SLAST_FIELD
REQ_LEFT_FIELD
REQ_RIGHT_FIELD
REQ_UP_FIELD
REQ_DOWN_FIELD
REQ_NEXT_CHAR
REQ_PREV_CHAR
REQ_NEXT_LINE
REQ_PREV_LINE
REQ_NEXT_WORD
REQ_PREV_WORD
REQ_BEG_FIELD
REQ_END_FIELD
REQ_BEG_LINE
REQ_END_LINE
REQ_LEFT_CHAR
REQ_RIGHT_CHAR
REQ_UP_CHAR
REQ_DOWN_CHAR
REQ_NEW_LINE
REQ_INS_CHAR
REQ_INS_LINE
REQ_DEL_CHAR
REQ_DEL_PREV
REQ_DEL_LINE
REQ_DEL_WORD
REQ_CLR_EOL
REQ_CLR_EOF
REQ_CLR_FIELD
REQ_OVL_MODE
REQ_INS_MODE
REQ_SCR_FLINE
REQ_SCR_BLINE
REQ_SCR_FPAGE
REQ_SCR_BPAGE
REQ_SCR_FHPAGE
REQ_SCR_BHPAGE
REQ_SCR_FCHAR
REQ_SCR_BCHAR
REQ_SCR_HFLINE
REQ_SCR_HBLINE
REQ_SCR_HFHALF
REQ_SCR_HBHALF
REQ_VALIDATION
REQ_PREV_CHOICE
REQ_NEXT_CHOICE
The form_driver() function returns one of the following:
E_OK
E_SYSTEM_ERROR
E_BAD_ARGUMENT
E_NOT_POSTED
E_INVALID_FIELD
E_BAD_STATE
E_REQUEST_DENIED
E_UNKNOWN_COMMAND
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
MT-Level | Unsafe |
The header <form.h> automatically includes the headers <eti.h> and <curses.h>.
December 31, 1996 | OmniOS |