FIELDTYPE(3X) INTERACTIVE UNIX System FIELDTYPE(3X)
NAME
fieldtype - FIELDTYPE library routines
SYNOPSIS
#include <form.h>
cc [ flags ] files -lform -lcurses [ libraries ]
typedef int (* PTF_int) ();
FIELDTYPE * new_fieldtype (field_check, char_check)
PTF_int field_check;
PTF_int char_check;
int free_fieldtype(fieldtype);
FIELDTYPE * fieldtype;
typedef char * (* PFT_charP) ();
typedef void (* PFT_void) ();
int set_fieldtype_arg (fieldtype, mak_arg, cpy_arg, free_arg)
FIELDTYPE * fieldtype;
char * mak_arg(ap);
va_list * ap;
PTF_charP cpy_arg;
PTF_void free_arg;
typedef char * (* PFT_charP) ();
int set_fieldtype_choice (fieldtype, next_choice, prev_choice)
FIELDTYPE * fieldtype;
PTF_int next_choice;
PTF_int prev_choice;
int next_choice (FIELD * f, char * arg);
int prev_choice (FIELD * f, char * arg);
FIELDTYPE * link_fieldtyp (type1,type2)
FIELDTYPE * type1;
FIELDTYPE * type2;
DESCRIPTION
These FIELDTYPE routines run on the AT&T processor line
using any terminal supported by curses(3X), the low-level
ETI library. Once you compile your ETI program #includeing
the header file form.h, you should link it with the form and
curses library routines.
FUNCTIONS
The following is a list of FIELDTYPE routines. For a com-
plete description of each routine, see the UNIX System V ETI
Programmer's Guide.
new_fieldtype (field_check, char_check) creates a new field
type. You must write functions field_check, which validates
the field value and char_check, which validates each charac-
ter.
free_fieldtype(fieldtype) frees the space allocated for the
given field type.
Rev. Extended Terminal Interface Page 1
FIELDTYPE(3X) INTERACTIVE UNIX System FIELDTYPE(3X)
By associating the given function pointers with the field
type, set_fieldtype_arg (fieldtype, mak_arg, cpy_arg,
free_arg) connects to the field type additional arguments
necessary for a set_field_type() call. Function mak_arg
allocates a structure for the field specific parameters to
set_field_type() and returns a pointer to the saved data.
Function copy_arg duplicates the structure created by
make_arg. Function free_arg frees any storage allocated by
make_arg or copy_arg.
Requests REQ_NEXT_CHOICE and REQ_PREV_CHOICE let the user
choose the next or previous value of a field type comprising
an ordered set of values. set_fieldtype_choice (fieldtype,
next_choice, prev_choice) enables you to implement these
requests for the given field type. It associates with the
given field type application-defined functions that return
pointers to the next or previous choice for the field.
link_fieldtyp (type1,type2) returns a pointer to the field
type built from the two given types. The constituent types
may be any application-defined or ETI-defined types.
SEE ALSO
curses(3X), form(3X), field(3X), panel(3X), menu(3X),
item(3x), tam(3X).
The UNIX System V ETI Programmer's Guide.
DIAGNOSTICS
The following values are returned by one or more routines
that return an integer. For specific information on which
routines return which value, see the ETI Programmer's Guide.
E_OK function returned successfully
E_CONNECTED object is connected
E_SYSTEM_ERROR system error
E_BAD_ARGUMENT argument is incorrect
E_CURRENT field is current field
E_POSTED form is posted
E_INVALID_FIELD field is invalid
E_NOT_CONNECTED object is not connected
E_NO_ROOM form does not fit in subwindow
E_BAD_STATE called from inappropriate routine
Rev. Extended Terminal Interface Page 2
FIELDTYPE(3X) INTERACTIVE UNIX System FIELDTYPE(3X)
E_UNKNOWN_COMMAND unknown command was given to the form
driver
E_REQUEST_DENIED recognized request failed
Rev. Extended Terminal Interface Page 3