jcs's openbsd hax
openbsd
1'\" t
2.\" $OpenBSD: form_field_userptr.3,v 1.10 2023/10/17 09:52:10 nicm Exp $
3.\"
4.\"***************************************************************************
5.\" Copyright 2018-2021,2022 Thomas E. Dickey *
6.\" Copyright 1998-2010,2015 Free Software Foundation, Inc. *
7.\" *
8.\" Permission is hereby granted, free of charge, to any person obtaining a *
9.\" copy of this software and associated documentation files (the *
10.\" "Software"), to deal in the Software without restriction, including *
11.\" without limitation the rights to use, copy, modify, merge, publish, *
12.\" distribute, distribute with modifications, sublicense, and/or sell *
13.\" copies of the Software, and to permit persons to whom the Software is *
14.\" furnished to do so, subject to the following conditions: *
15.\" *
16.\" The above copyright notice and this permission notice shall be included *
17.\" in all copies or substantial portions of the Software. *
18.\" *
19.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
20.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
21.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
22.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
23.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
24.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
25.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
26.\" *
27.\" Except as contained in this notice, the name(s) of the above copyright *
28.\" holders shall not be used in advertising or otherwise to promote the *
29.\" sale, use or other dealings in this Software without prior written *
30.\" authorization. *
31.\"***************************************************************************
32.\"
33.\" $Id: form_field_userptr.3,v 1.10 2023/10/17 09:52:10 nicm Exp $
34.TH form_field_userptr 3 2022-02-12 "ncurses 6.4" "Library calls"
35.SH NAME
36\fBset_field_userptr\fP,
37\fBfield_userptr\fP \- associate application data with a form field
38.SH SYNOPSIS
39\fB#include <form.h>\fP
40.sp
41\fBint set_field_userptr(FIELD *\fIfield\fB, void *\fIuserptr\fB);\fR
42.br
43\fBvoid *field_userptr(const FIELD *\fIfield\fB);\fR
44.SH DESCRIPTION
45Every form field has a field that can be used to hold application-specific data
46(that is, the form-driver code leaves it alone).
47These functions get and set
48that field.
49.SH RETURN VALUE
50The function \fBfield_userptr\fP returns a pointer (which may be \fBNULL\fP).
51It does not set \fBerrno\fP.
52.PP
53The function \fBset_field_userptr\fP returns \fBE_OK\fP (success).
54.SH SEE ALSO
55\fBcurses\fP(3), \fBform\fP(3).
56.SH NOTES
57The header file \fB<form.h>\fP automatically includes the header file
58\fB<curses.h>\fP.
59.SH PORTABILITY
60These routines emulate the System V forms library.
61They were not supported on
62Version 7 or BSD versions.
63.PP
64The user pointer is a void pointer.
65We chose not to leave it as a char pointer for SVr4 compatibility.
66.SH AUTHORS
67Juergen Pfeifer.
68Manual pages and adaptation for new curses by Eric S. Raymond.