]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/form_new.3x
ncurses 6.2 - patch 20201107
[ncurses.git] / man / form_new.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright 2018,2020 Thomas E. Dickey                                     *
4 .\" Copyright 1998-2010,2015 Free Software Foundation, Inc.                  *
5 .\"                                                                          *
6 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
7 .\" copy of this software and associated documentation files (the            *
8 .\" "Software"), to deal in the Software without restriction, including      *
9 .\" without limitation the rights to use, copy, modify, merge, publish,      *
10 .\" distribute, distribute with modifications, sublicense, and/or sell       *
11 .\" copies of the Software, and to permit persons to whom the Software is    *
12 .\" furnished to do so, subject to the following conditions:                 *
13 .\"                                                                          *
14 .\" The above copyright notice and this permission notice shall be included  *
15 .\" in all copies or substantial portions of the Software.                   *
16 .\"                                                                          *
17 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
18 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
19 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
20 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
21 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
22 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
23 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
24 .\"                                                                          *
25 .\" Except as contained in this notice, the name(s) of the above copyright   *
26 .\" holders shall not be used in advertising or otherwise to promote the     *
27 .\" sale, use or other dealings in this Software without prior written       *
28 .\" authorization.                                                           *
29 .\"***************************************************************************
30 .\"
31 .\" $Id: form_new.3x,v 1.15 2020/10/24 09:02:26 tom Exp $
32 .TH form_new 3X ""
33 .SH NAME
34 \fBnew_form\fR,
35 \fBfree_form\fP \- create and destroy forms
36 .SH SYNOPSIS
37 \fB#include <form.h>\fR
38 .sp
39 \fBFORM *new_form(FIELD **\fP\fIfields\fP\fB);\fP
40 .br
41 \fBint free_form(FORM *\fP\fIform\fP\fB);\fP
42 .br
43 .SH DESCRIPTION
44 The function \fBnew_form\fR creates a new form connected to a specified field
45 pointer array (which must be \fBNULL\fR-terminated).
46 .PP
47 The function \fBfree_form\fR disconnects \fIform\fR from its field array
48 and frees the storage allocated for the form.
49 .SH RETURN VALUE
50 The function \fBnew_form\fR returns \fBNULL\fR on error.
51 It sets \fBerrno\fP according to the function's success:
52 .TP 5
53 .B E_OK
54 The routine succeeded.
55 .TP 5
56 .B E_BAD_ARGUMENT
57 Routine detected an incorrect or out-of-range argument.
58 .TP 5
59 .B E_CONNECTED
60 The field is already connected to a form.
61 .TP 5
62 .B E_SYSTEM_ERROR
63 System error occurred, e.g., malloc failure.
64 .PP
65 The function \fBfree_form\fR returns one of the following:
66 .TP 5
67 .B E_OK
68 The routine succeeded.
69 .TP 5
70 .B E_BAD_ARGUMENT
71 Routine detected an incorrect or out-of-range argument.
72 .TP 5
73 .B E_POSTED
74 The form has already been posted.
75 .SH SEE ALSO
76 \fBcurses\fR(3X), \fBform\fR(3X).
77 .SH NOTES
78 The header file \fB<form.h>\fR automatically includes the header file
79 \fB<curses.h>\fR.
80 .SH PORTABILITY
81 These routines emulate the System V forms library.
82 They were not supported on
83 Version 7 or BSD versions.
84 .SH AUTHORS
85 Juergen Pfeifer.
86 Manual pages and adaptation for new curses by Eric S. Raymond.