jcs's openbsd hax
openbsd
at jcs 92 lines 4.2 kB view raw
1'\" t 2.\" $OpenBSD: menu_items.3,v 1.9 2023/10/17 09:52:10 nicm Exp $ 3.\" 4.\"*************************************************************************** 5.\" Copyright 2018-2022,2023 Thomas E. Dickey * 6.\" Copyright 1998-2012,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: menu_items.3,v 1.9 2023/10/17 09:52:10 nicm Exp $ 34.TH menu_items 3 2023-07-01 "ncurses 6.4" "Library calls" 35.SH NAME 36\fBset_menu_items\fP, 37\fBmenu_items\fP, 38\fBitem_count\fP \- make and break connections between items and menus 39.SH SYNOPSIS 40\fB#include <menu.h>\fP 41.sp 42\fBint set_menu_items(MENU *\fImenu\fB, ITEM **\fIitems\fB);\fR 43.br 44\fBITEM **menu_items(const MENU *\fImenu\fB);\fR 45.br 46\fBint item_count(const MENU *\fImenu\fB);\fR 47.SH DESCRIPTION 48The function \fBset_menu_items\fP changes the item pointer array of the given 49\fImenu\fP. The array must be terminated by a \fBNULL\fP. 50.PP 51The function \fBmenu_items\fP returns the item array of the given menu. 52.PP 53The function \fBitem_count\fP returns the count of items in \fImenu\fP. 54.SH RETURN VALUE 55The function \fBmenu_items\fP returns a pointer (which may be \fBNULL\fP). 56It does not set \fBerrno\fP. 57.PP 58The function \fBitem_count\fP returns \fBERR\fP (the general \fBcurses\fP error 59return value) if its \fImenu\fP parameter is \fBNULL\fP. 60.PP 61The function \fBset_menu_items\fP returns one of the following codes on error: 62.TP 5 63.B E_OK 64The routine succeeded. 65.TP 5 66.B E_BAD_ARGUMENT 67Routine detected an incorrect or out-of-range argument. 68.TP 5 69.B E_NOT_CONNECTED 70No items are connected to the menu. 71.TP 5 72.B E_POSTED 73The menu is already posted. 74.TP 5 75.B E_SYSTEM_ERROR 76System error occurred (see \fBerrno\fP(3)). 77. 78.SH SEE ALSO 79\fBcurses\fP(3), \fBmenu\fP(3). 80.SH NOTES 81The header file \fB<menu.h>\fP automatically includes the header file 82\fB<curses.h>\fP. 83.SH PORTABILITY 84These routines emulate the System V menu library. 85They were not supported on 86Version 7 or BSD versions. 87.PP 88The SVr4 menu library documentation specifies the \fBitem_count\fP error value 89as \-1 (which is the value of \fBERR\fP). 90.SH AUTHORS 91Juergen Pfeifer. 92Manual pages and adaptation for new curses by Eric S. Raymond.