2 .\" $OpenBSD: form_userptr.3,v 1.8 2010/01/12 23:22:07 nicm Exp $
4 .\"***************************************************************************
5 .\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
7 .\" Permission is hereby granted, free of charge, to any person obtaining a *
8 .\" copy of this software and associated documentation files (the *
9 .\" "Software"), to deal in the Software without restriction, including *
10 .\" without limitation the rights to use, copy, modify, merge, publish, *
11 .\" distribute, distribute with modifications, sublicense, and/or sell *
12 .\" copies of the Software, and to permit persons to whom the Software is *
13 .\" furnished to do so, subject to the following conditions: *
15 .\" The above copyright notice and this permission notice shall be included *
16 .\" in all copies or substantial portions of the Software. *
18 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
19 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
20 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
21 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
22 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
23 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
24 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
26 .\" Except as contained in this notice, the name(s) of the above copyright *
27 .\" holders shall not be used in advertising or otherwise to promote the *
28 .\" sale, use or other dealings in this Software without prior written *
30 .\"***************************************************************************
32 .\" $Id: form_userptr.3,v 1.8 2010/01/12 23:22:07 nicm Exp $
35 \fBform_userptr\fR - associate application data with a form item
37 \fB#include <form.h>\fR
39 int set_form_userptr(FORM *form, void *userptr);
41 void* form_userptr(const FORM *form);
44 Every form and every form item has a field that can be used to hold
45 application-specific data (that is, the form-driver code leaves it alone).
46 These functions get and set the form user pointer field.
48 The function \fBform_userptr\fR returns a pointer (which may be \fBNULL\fR).
49 It does not set errno.
51 The function \fBset_form_userptr\fR returns \fBE_OK\fP (success).
53 \fBcurses\fR(3), \fBform\fR(3).
55 The header file \fB<form.h>\fR automatically includes the header file
58 These routines emulate the System V forms library. They were not supported on
59 Version 7 or BSD versions.
61 The user pointer is a void pointer.
62 We chose not to leave it as a char pointer for SVr4 compatibility.
64 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
67 .\"# The following sets edit modes for GNU EMACS