*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> form_fieldtype (3)              
Title
Content
Arch
Section
 

FORMS(3)

Contents


NAME    [Toc]    [Back]

     free_fieldtype, link_fieldtype, new_fieldtype, set_fieldtype_arg,
     set_fieldtype_choice - form library

LIBRARY    [Toc]    [Back]

     library ``libform''

SYNOPSIS    [Toc]    [Back]

     #include <form.h>

     int
     free_fieldtype(FIELDTYPE *fieldtype);

     FIELDTYPE *
     link_fieldtype(FIELDTYPE *type1, FIELDTYPE *type2);

     FIELDTYPE *
     new_fieldtype(int (*field_check)(FIELD *, char *),
             int (*char_check)(int, char *));

     int
     set_fieldtype_arg(FIELDTYPE *fieldtype, char * (*make_args)(va_list *),
             char * (*copy_args)(char *), void (*free_args)(char *));

     int
     set_fieldtype_choice(FIELDTYPE *fieldtype,
             int (*next_choice)(FIELD *, char *),
             int (*prev_choice)(FIELD *, char *));

DESCRIPTION    [Toc]    [Back]

     The function free_fieldtype() frees the storage associated with the field
     type and destroys it.  The function link_fieldtype() links together the
     two given field types to produce a new field type.  A new field type can
     be created by calling new_fieldtype() which requires pointers to two
     functions which perform validation, the field_check function must validate
 the field contents and return TRUE if they are acceptable and FALSE
     if they are not.  The char_check validates the character input into the
     field, this function will be called for each character entered, if the
     character can be entered into the field then char_check must return TRUE.
     Neither field_check nor char_check may be NULL.  The functions for handling
 the field type arguments can be defined by using the
     set_fieldtype_arg() function, the make_args function is used to create
     new arguments for the fieldtype, the copy_args is used to copy the fieldtype
 arguments to a new arguments structure and free_args is used to
     destroy the fieldtype arguments and release any associated storage, none
     of these function pointers may be NULL.  The field type choice functions
     can be set by calling set_fieldtype_choice(), the next_choice and
     prev_choice specify the next and previous choice functions for the field
     type.  These functions must perform the necessary actions to select the
     next or previous choice for the field, updating the field buffer if necessary.
  The choice functions must return TRUE if the function succeeded
     and FALSE otherwise.

RETURN VALUES    [Toc]    [Back]

     Functions returning pointers will return NULL if an error is detected.
     The functions that return an int will return one of the following error
     values:

     E_OK               The function was successful.
     E_BAD_ARGUMENT     The function was passed a bad argument.
     E_CONNECTED        The field is connected to a form.

SEE ALSO    [Toc]    [Back]

      
      
     curses(3), forms(3)

NOTES    [Toc]    [Back]

     The header <form.h> automatically includes both <curses.h> and <eti.h>.

BSD                             January 1, 2001                            BSD
[ Back ]
 Similar pages
Name OS Title
zhptrd IRIX reduce a complex Hermitian matrix A stored in packed form to real symmetric tridiagonal form T by a unitary si
chptrd IRIX reduce a complex Hermitian matrix A stored in packed form to real symmetric tridiagonal form T by a unitary si
dsptrd IRIX reduce a real symmetric matrix A stored in packed form to symmetric tridiagonal form T by an orthogonal simila
ssptrd IRIX reduce a real symmetric matrix A stored in packed form to symmetric tridiagonal form T by an orthogonal simila
form_opts_off OpenBSD set and get form options
form_opts_on OpenBSD set and get form options
form_opts_on FreeBSD set and get form options
form_opts OpenBSD set and get form options
set_form_opts OpenBSD set and get form options
form_opts_off FreeBSD set and get form options
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service