]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/form_fieldtype.3x
ncurses 5.1
[ncurses.git] / man / form_fieldtype.3x
index a6697eedbfba69d4b71baf4b576aaa9b2c88955a..4c5dcb6616f8d5e7e1443d6cb1d95e27893aaae9 100644 (file)
@@ -1,4 +1,33 @@
 '\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc.                        *
+.\"                                                                          *
+.\" Permission is hereby granted, free of charge, to any person obtaining a  *
+.\" copy of this software and associated documentation files (the            *
+.\" "Software"), to deal in the Software without restriction, including      *
+.\" without limitation the rights to use, copy, modify, merge, publish,      *
+.\" distribute, distribute with modifications, sublicense, and/or sell       *
+.\" copies of the Software, and to permit persons to whom the Software is    *
+.\" furnished to do so, subject to the following conditions:                 *
+.\"                                                                          *
+.\" The above copyright notice and this permission notice shall be included  *
+.\" in all copies or substantial portions of the Software.                   *
+.\"                                                                          *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
+.\"                                                                          *
+.\" Except as contained in this notice, the name(s) of the above copyright   *
+.\" holders shall not be used in advertising or otherwise to promote the     *
+.\" sale, use or other dealings in this Software without prior written       *
+.\" authorization.                                                           *
+.\"***************************************************************************
+.\"
+.\" $Id: form_fieldtype.3x,v 1.7 1998/11/29 01:07:16 Rick.Ohnemus Exp $
 .TH form_field 3X ""
 .SH NAME
 \fBform_fieldtype\fR - define validation-field types
@@ -22,9 +51,9 @@ int set_fieldtype_choice(
     bool (* const next_choice)(FIELD *, const void *),
     bool (* const prev_choice)(FIELD *, const void *));
 .br
-FIELDTYPE *link_fieldtype(FIELDTYPE *type1, 
+FIELDTYPE *link_fieldtype(FIELDTYPE *type1,
                           FIELDTYPE *type2);
-.br 
+.br
 .SH DESCRIPTION
 The function \fBnew_fieldtype\fR creates a new field type usable for data
 validation.  You supply it with \fIfield_check\fR, a predicate to check the
@@ -40,13 +69,16 @@ the character to be checked and a pointer to an argument-block structure.
 The function \fBfree_fieldtype\fR frees the space allocated for a given
 validation type.
 
-The function \fBset_fieldtype\fR associates three storage-management functions 
+The function \fBset_fieldtype\fR associates three storage-management functions
 with a field type.  The \fImak_arg\fR function is automatically applied to the
 list of arguments you give \fBset_field_type\fR when attaching validation
-to a field; its job is to bundle these into an allocated argument-block 
+to a field; its job is to bundle these into an allocated argument-block
 object which can later be passed to validation predicated.  The other two
 hook arguments should copy and free argument-block structures.  They will
-be used by the forms-driver code.
+be used by the forms-driver code. You must supply the \fImak_arg\fR function,
+the other two are optional, you may supply NULL for them. In this case it
+is assumed, that \fImak_arg\fR doesn't allocate memory but simply loads the
+argument into a single scalar value.
 
 The form driver requests \fBREQ_NEXT_CHOICE\fR and \fBREQ_PREV_CHOICE\fR assume
 that the possible values of a field form an ordered set, and provide the forms