diff options
Diffstat (limited to 'lib/libmenu')
-rw-r--r-- | lib/libmenu/Makefile | 5 | ||||
-rw-r--r-- | lib/libmenu/menu.3 | 162 | ||||
-rw-r--r-- | lib/libmenu/menu.3tbl | 163 | ||||
-rw-r--r-- | lib/libmenu/menu_attribs.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/menu_cursor.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/menu_driver.3 | 7 | ||||
-rw-r--r-- | lib/libmenu/menu_format.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/menu_hook.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/menu_items.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/menu_mark.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/menu_new.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/menu_opts.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/menu_pattern.3 | 9 | ||||
-rw-r--r-- | lib/libmenu/menu_post.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/menu_requestname.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/menu_spacing.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/menu_userptr.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/menu_win.3 | 5 | ||||
-rw-r--r-- | lib/libmenu/mitem_current.3 | 73 | ||||
-rw-r--r-- | lib/libmenu/mitem_name.3 | 36 | ||||
-rw-r--r-- | lib/libmenu/mitem_new.3 | 55 | ||||
-rw-r--r-- | lib/libmenu/mitem_opts.3 | 56 | ||||
-rw-r--r-- | lib/libmenu/mitem_userptr.3 | 44 | ||||
-rw-r--r-- | lib/libmenu/mitem_value.3 | 49 | ||||
-rw-r--r-- | lib/libmenu/mitem_visible.3 | 31 |
25 files changed, 558 insertions, 197 deletions
diff --git a/lib/libmenu/Makefile b/lib/libmenu/Makefile index e156fd98eb4..ac0af8a1c38 100644 --- a/lib/libmenu/Makefile +++ b/lib/libmenu/Makefile @@ -6,10 +6,11 @@ SRCS= m_attribs.c m_cursor.c m_driver.c m_format.c m_global.c m_hook.c \ m_sub.c m_userptr.c m_win.c HDRS= menu.h eti.h CFLAGS+=-I. -I${.CURDIR} -I${.CURDIR}/../libcurses -DHAVE_CONFIG_H -MAN= menu.3 menu_attribs.3 menu_cursor.3 menu_driver.3 menu_format.3 \ +MAN= menu.3tbl menu_attribs.3 menu_cursor.3 menu_driver.3 menu_format.3 \ menu_hook.3 menu_items.3 menu_mark.3 menu_new.3 menu_opts.3 \ menu_pattern.3 menu_post.3 menu_requestname.3 menu_spacing.3 \ - menu_userptr.3 menu_win.3 + menu_userptr.3 menu_win.3 mitem_current.3 mitem_name.3 mitem_new.3 \ + mitem_opts.3 mitem_userptr.3 mitem_value.3 mitem_visible.3 includes: @cd ${.CURDIR}; for i in ${HDRS}; do \ diff --git a/lib/libmenu/menu.3 b/lib/libmenu/menu.3 deleted file mode 100644 index 725c04742cd..00000000000 --- a/lib/libmenu/menu.3 +++ /dev/null @@ -1,162 +0,0 @@ -'\" t -.\" Id: menu.3x,v 1.9 1997/01/05 01:23:39 tom Exp $ -.TH menus 3X "" -.SH NAME -\fBmenus\fR - curses extension for programming menus -.SH SYNOPSIS -\fB#include <menu.h>\fR -.br -.SH DESCRIPTION -The \fBmenus\fR library provides terminal-independent facilities for composing -menu systems on character-cell terminals. The library includes: item routines, -which create and modify menu items; and menu routines, which group items into -menus, display menus on the screen, and handle interaction with the user. - -The \fBmenus\fR library uses the \fBcurses\fR libraries, and a curses -initialization routine such as \fBinitscr\fR must be called before using any of -these functions. To use the \fBmenus\fR library, link with the options -\fB-lmenu -lcurses\fR. - -.SS Current Default Values for Item Attributes - -The \fBmenus\fR library maintains a default value for item attributes. You can -get or set this default by calling the appropriate \fBget_\fR or \fBset_\fR -routine with a \fBNULL\fR item pointer. Changing this default with a -\fBset_\fR function affects future item creations, but does not change the -rendering of items already created. - -.SS Routine Name Index - -The following table lists each \fBmenu\fR routine and the name of -the manual page on which it is described. - -.TS -l l . -\fBcurses\fR Routine Name Manual Page Name -= -\fBcurrent_item\fR mitem_current(3X) -\fBfree_item\fR mitem_new(3X) -\fBfree_menu\fR menu_new(3X) -\fBitem_count\fR menu_items(3X) -\fBitem_description\fR mitem_name(3X) -\fBitem_index\fR mitem_current(3X) -\fBitem_init\fR menu_hook(3X) -\fBitem_name\fR mitem_name(3X) -\fBitem_opts\fR mitem_opts(3X) -\fBitem_opts_off\fR mitem_opts(3X) -\fBitem_opts_on\fR mitem_opts(3X) -\fBitem_term\fR menu_hook(3X) -\fBitem_userptr\fR mitem_userptr(3X) -\fBitem_value\fR mitem_value(3X) -\fBitem_visible\fR mitem_visible(3X) -\fBmenu_back\fR menu_attribs(3X) -\fBmenu_driver\fR menu_driver(3X) -\fBmenu_fore\fR menu_attribs(3X) -\fBmenu_format\fR menu_format(3X) -\fBmenu_grey\fR menu_attribs(3X) -\fBmenu_init\fR menu_hook(3X) -\fBmenu_items\fR menu_items(3X) -\fBmenu_mark\fR menu_mark(3X) -\fBmenu_opts\fR menu_opts(3X) -\fBmenu_opts_off\fR menu_opts(3X) -\fBmenu_opts_on\fR menu_opts(3X) -\fBmenu_pad\fR menu_attribs(3X) -\fBmenu_pattern\fR menu_pattern(3X) -\fBmenu_request_by_name\fR menu_requestname(3X) -\fBmenu_request_name\fR menu_requestname(3X) -\fBmenu_spacing\fR menu_spacing(3X) -\fBmenu_sub\fR menu_win(3X) -\fBmenu_term\fR menu_hook(3X) -\fBmenu_userptr\fR menu_userptr(3X) -\fBmenu_win\fR menu_win(3X) -\fBnew_item\fR mitem_new(3X) -\fBnew_menu\fR menu_new(3X) -\fBpos_menu_cursor\fR menu_cursor(3X) -\fBpost_menu\fR menu_post(3X) -\fBscale_menu\fR menu_win(3X) -\fBset_current_item\fR menu_current_item(3X) -\fBset_item_init\fR menu_hook(3X) -\fBset_item_opts\fR mitem_opts(3X) -\fBset_item_term\fR menu_hook(3X) -\fBset_item_userptr\fR mitem_userptr(3X) -\fBset_item_value\fR mitem_value(3X) -\fBset_menu_back\fR menu_attribs(3X) -\fBset_menu_fore\fR menu_attribs(3X) -\fBset_menu_format\fR menu_format(3X) -\fBset_menu_grey\fR menu_attribs(3X) -\fBset_menu_init\fR menu_hook(3X) -\fBset_menu_items\fR menu_items(3X) -\fBset_menu_mark\fR menu_mark(3X) -\fBset_menu_opts\fR mitem_opts(3X) -\fBset_menu_pad\fR menu_attribs(3X) -\fBset_menu_pattern\fR menu_pattern(3X) -\fBset_menu_spacing\fR menu_spacing(3X) -\fBset_menu_sub\fR menu_win(3X) -\fBset_menu_term\fR menu_hook(3X) -\fBset_menu_userptr\fR menu_userptr(3X) -\fBset_menu_win\fR menu_win(3X) -\fBset_top_row\fR mitem_current(3X) -\fBtop_row\fR mitem_current(3X) -\fBunpost_menu\fR menu_post(3X) -.TE -.SH RETURN VALUE -Routines that return pointers return \fBNULL\fR on error. Routines that return -an integer return one of the following error codes: -.TP 5 -\fBE_OK\fR -The routine succeeded. -.TP 5 -\fBE_SYSTEM_ERROR\fR -System error occurred (see \fBerrno\fR). -.TP 5 -\fBE_BAD_ARGUMENT\fR -Routine detected an incorrect or out-of-range argument. -.TP 5 -\fBE_POSTED\fR -The menu is already posted. -.TP 5 -\fBE_BAD_STATE\fR -Routine was called from an initialization or termination function. -.TP 5 -\fBE_NO_ROOM\fR -Menu is too large for its window. -.TP 5 -\fBE_NOT_POSTED\fR -The menu has not been posted. -.TP 5 -\fBE_UNKNOWN_COMMAND\fR -The menu driver code saw an unknown request code. -.TP 5 -\fBE_NO_MATCH\fR -Character failed to match. -.TP 5 -\fBE_NOT_SELECTABLE\fR -The designated item cannot be selected. -.TP 5 -\fBE_NOT_CONNECTED\fR -No items are connected to the menu. -.TP 5 -\fBE_REQUEST_DENIED\fR -The menu driver could not process the request. -.SH SEE ALSO -\fBcurses\fR(3X) and 3X pages whose names begin "menu_" for detailed -descriptions of the entry points. -.SH NOTES -The header file \fB<menu.h>\fR automatically includes the header files -\fB<curses.h>\fR and \fB<eti.h>\fR. - -In your library list, libmenu.a should be before libcurses.a; that is, -you want to say `-lmenu -lcurses', not the other way around (which would -give you a link error using GNU \fBld\fR(1) and many other linkers). -.SH PORTABILITY -These routines emulate the System V menu library. They were not supported on -Version 7 or BSD versions. -.SH AUTHORS -Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric -S. Raymond. -.\"# -.\"# The following sets edit modes for GNU EMACS -.\"# Local Variables: -.\"# mode:nroff -.\"# fill-column:79 -.\"# End: diff --git a/lib/libmenu/menu.3tbl b/lib/libmenu/menu.3tbl new file mode 100644 index 00000000000..89aa057f1fa --- /dev/null +++ b/lib/libmenu/menu.3tbl @@ -0,0 +1,163 @@ +'\" t +.\" $OpenBSD: menu.3tbl,v 1.1 1997/12/14 23:19:31 millert Exp $ +.\" Id: menu.3x,v 1.10 1997/12/14 01:45:52 tom Exp $ +.TH menu 3 "" +.SH NAME +\fBmenu\fR - curses extension for programming menus +.SH SYNOPSIS +\fB#include <menu.h>\fR +.br +.SH DESCRIPTION +The \fBmenu\fR library provides terminal-independent facilities for composing +menu systems on character-cell terminals. The library includes: item routines, +which create and modify menu items; and menu routines, which group items into +menus, display menus on the screen, and handle interaction with the user. + +The \fBmenu\fR library uses the \fBcurses\fR libraries, and a curses +initialization routine such as \fBinitscr\fR must be called before using any of +these functions. To use the \fBmenu\fR library, link with the options +\fB-lmenu -lcurses\fR. + +.SS Current Default Values for Item Attributes + +The \fBmenu\fR library maintains a default value for item attributes. You can +get or set this default by calling the appropriate \fBget_\fR or \fBset_\fR +routine with a \fBNULL\fR item pointer. Changing this default with a +\fBset_\fR function affects future item creations, but does not change the +rendering of items already created. + +.SS Routine Name Index + +The following table lists each \fBmenu\fR routine and the name of +the manual page on which it is described. + +.TS +l l . +\fBcurses\fR Routine Name Manual Page Name += +current_item \fBmitem_current\fR(3) +free_item \fBmitem_new\fR(3) +free_menu \fBmenu_new\fR(3) +item_count \fBmenu_items\fR(3) +item_description \fBmitem_name\fR(3) +item_index \fBmitem_current\fR(3) +item_init \fBmenu_hook\fR(3) +item_name \fBmitem_name\fR(3) +item_opts \fBmitem_opts\fR(3) +item_opts_off \fBmitem_opts\fR(3) +item_opts_on \fBmitem_opts\fR(3) +item_term \fBmenu_hook\fR(3) +item_userptr \fBmitem_userptr\fR(3) +item_value \fBmitem_value\fR(3) +item_visible \fBmitem_visible\fR(3) +menu_back \fBmenu_attribs\fR(3) +menu_driver \fBmenu_driver\fR(3) +menu_fore \fBmenu_attribs\fR(3) +menu_format \fBmenu_format\fR(3) +menu_grey \fBmenu_attribs\fR(3) +menu_init \fBmenu_hook\fR(3) +menu_items \fBmenu_items\fR(3) +menu_mark \fBmenu_mark\fR(3) +menu_opts \fBmenu_opts\fR(3) +menu_opts_off \fBmenu_opts\fR(3) +menu_opts_on \fBmenu_opts\fR(3) +menu_pad \fBmenu_attribs\fR(3) +menu_pattern \fBmenu_pattern\fR(3) +menu_request_by_name \fBmenu_requestname\fR(3) +menu_request_name \fBmenu_requestname\fR(3) +menu_spacing \fBmenu_spacing\fR(3) +menu_sub \fBmenu_win\fR(3) +menu_term \fBmenu_hook\fR(3) +menu_userptr \fBmenu_userptr\fR(3) +menu_win \fBmenu_win\fR(3) +new_item \fBmitem_new\fR(3) +new_menu \fBmenu_new\fR(3) +pos_menu_cursor \fBmenu_cursor\fR(3) +post_menu \fBmenu_post\fR(3) +scale_menu \fBmenu_win\fR(3) +set_current_item \fBmitem_current\fR(3) +set_item_init \fBmenu_hook\fR(3) +set_item_opts \fBmitem_opts\fR(3) +set_item_term \fBmenu_hook\fR(3) +set_item_userptr \fBmitem_userptr\fR(3) +set_item_value \fBmitem_value\fR(3) +set_menu_back \fBmenu_attribs\fR(3) +set_menu_fore \fBmenu_attribs\fR(3) +set_menu_format \fBmenu_format\fR(3) +set_menu_grey \fBmenu_attribs\fR(3) +set_menu_init \fBmenu_hook\fR(3) +set_menu_items \fBmenu_items\fR(3) +set_menu_mark \fBmenu_mark\fR(3) +set_menu_opts \fBmitem_opts\fR(3) +set_menu_pad \fBmenu_attribs\fR(3) +set_menu_pattern \fBmenu_pattern\fR(3) +set_menu_spacing \fBmenu_spacing\fR(3) +set_menu_sub \fBmenu_win\fR(3) +set_menu_term \fBmenu_hook\fR(3) +set_menu_userptr \fBmenu_userptr\fR(3) +set_menu_win \fBmenu_win\fR(3) +set_top_row \fBmitem_current\fR(3) +top_row \fBmitem_current\fR(3) +unpost_menu \fBmenu_post\fR(3) +.TE +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error. Routines that return +an integer return one of the following error codes: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_POSTED\fR +The menu is already posted. +.TP 5 +\fBE_BAD_STATE\fR +Routine was called from an initialization or termination function. +.TP 5 +\fBE_NO_ROOM\fR +Menu is too large for its window. +.TP 5 +\fBE_NOT_POSTED\fR +The menu has not been posted. +.TP 5 +\fBE_UNKNOWN_COMMAND\fR +The menu driver code saw an unknown request code. +.TP 5 +\fBE_NO_MATCH\fR +Character failed to match. +.TP 5 +\fBE_NOT_SELECTABLE\fR +The designated item cannot be selected. +.TP 5 +\fBE_NOT_CONNECTED\fR +No items are connected to the menu. +.TP 5 +\fBE_REQUEST_DENIED\fR +The menu driver could not process the request. +.SH SEE ALSO +\fBcurses\fR(3) and 3 pages whose names begin "menu_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB<menu.h>\fR automatically includes the header files +\fB<curses.h>\fR and \fB<eti.h>\fR. + +In your library list, libmenu.a should be before libcurses.a; that is, +you want to say `-lmenu -lcurses', not the other way around (which would +give you a link error using GNU \fBld\fR(1) and many other linkers). +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libmenu/menu_attribs.3 b/lib/libmenu/menu_attribs.3 index 39850c1e2a6..a6da6517757 100644 --- a/lib/libmenu/menu_attribs.3 +++ b/lib/libmenu/menu_attribs.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_attributes 3X "" +.\" $OpenBSD: menu_attribs.3,v 1.3 1997/12/14 23:19:32 millert Exp $ +.TH menu_attributes 3 "" .SH NAME \fBmenu_attributes\fR - color and attribute control for menus .SH SYNOPSIS @@ -52,7 +53,7 @@ System error occurred (see \fBerrno\fR). \fBE_BAD_ARGUMENT\fR Routine detected an incorrect or out-of-range argument. .SH SEE ALSO -\fBcurses\fR(3X) and 3X pages whose names begin "menu_" for detailed +\fBcurses\fR(3) and 3 pages whose names begin "menu_" for detailed descriptions of the entry points. .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file diff --git a/lib/libmenu/menu_cursor.3 b/lib/libmenu/menu_cursor.3 index d2e5e2a3e8b..39b0a634dd1 100644 --- a/lib/libmenu/menu_cursor.3 +++ b/lib/libmenu/menu_cursor.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_cursor 3X "" +.\" $OpenBSD: menu_cursor.3,v 1.3 1997/12/14 23:19:32 millert Exp $ +.TH menu_cursor 3 "" .SH NAME \fBmenu_cursor\fR - position a menu's cursor .SH SYNOPSIS @@ -26,7 +27,7 @@ Routine detected an incorrect or out-of-range argument. \fBE_NOT_POSTED\fR The menu has not been posted. .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_driver.3 b/lib/libmenu/menu_driver.3 index d64853563a2..aedff6c2740 100644 --- a/lib/libmenu/menu_driver.3 +++ b/lib/libmenu/menu_driver.3 @@ -1,5 +1,6 @@ -'\" t -.TH menu_driver 3X "" +.\" $OpenBSD: menu_driver.3,v 1.3 1997/12/14 23:19:33 millert Exp $ +.\" Id: menu_driver.3x,v 1.5 1997/12/14 01:28:42 tom Exp $ +.TH menu_driver 3 "" .SH NAME \fBmenu_driver\fR - command-processing loop of the menu system .SH SYNOPSIS @@ -104,7 +105,7 @@ Character failed to match. \fBE_REQUEST_DENIED\fR The menu driver could not process the request. .SH SEE ALSO -\fBcurses\fR(3X), \fBmenus\fR(3x). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header files \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_format.3 b/lib/libmenu/menu_format.3 index a901a065192..e25ad5f896f 100644 --- a/lib/libmenu/menu_format.3 +++ b/lib/libmenu/menu_format.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_format 3X "" +.\" $OpenBSD: menu_format.3,v 1.3 1997/12/14 23:19:33 millert Exp $ +.TH menu_format 3 "" .SH NAME \fBmenu_format\fR - set and get menu sizes .SH SYNOPSIS @@ -36,7 +37,7 @@ Routine detected an incorrect or out-of-range argument. \fBE_POSTED\fR The menu is already posted. .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_hook.3 b/lib/libmenu/menu_hook.3 index 36adef9f7aa..ee5687acb28 100644 --- a/lib/libmenu/menu_hook.3 +++ b/lib/libmenu/menu_hook.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_hook 3X "" +.\" $OpenBSD: menu_hook.3,v 1.3 1997/12/14 23:19:33 millert Exp $ +.TH menu_hook 3 "" .SH NAME \fBmenu_hook\fR - set hooks for automatic invocation by applications .SH SYNOPSIS @@ -54,7 +55,7 @@ The routine succeeded. \fBE_SYSTEM_ERROR\fR System error occurred (see \fBerrno\fR). .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_items.3 b/lib/libmenu/menu_items.3 index 888ae819311..ead8bd96af1 100644 --- a/lib/libmenu/menu_items.3 +++ b/lib/libmenu/menu_items.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_items 3X "" +.\" $OpenBSD: menu_items.3,v 1.3 1997/12/14 23:19:34 millert Exp $ +.TH menu_items 3 "" .SH NAME \fBmenu_items\fR - make and break connections between items and menus .SH SYNOPSIS @@ -41,7 +42,7 @@ The menu is already posted. \fBE_NOT_CONNECTED\fR No items are connected to the menu. .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_mark.3 b/lib/libmenu/menu_mark.3 index 62f6d39c45c..98f01e4e27c 100644 --- a/lib/libmenu/menu_mark.3 +++ b/lib/libmenu/menu_mark.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_mark 3X "" +.\" $OpenBSD: menu_mark.3,v 1.3 1997/12/14 23:19:34 millert Exp $ +.TH menu_mark 3 "" .SH NAME \fBmenu_mark\fR - get and set the menu mark string .SH SYNOPSIS @@ -37,7 +38,7 @@ System error occurred (see \fBerrno\fR). \fBE_BAD_ARGUMENT\fR Routine detected an incorrect or out-of-range argument. .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_new.3 b/lib/libmenu/menu_new.3 index 9053fdd5579..103aad08ed3 100644 --- a/lib/libmenu/menu_new.3 +++ b/lib/libmenu/menu_new.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_new 3X "" +.\" $OpenBSD: menu_new.3,v 1.3 1997/12/14 23:19:35 millert Exp $ +.TH menu_new 3 "" .SH NAME \fBmenu_new\fR - create and destroy menus .SH SYNOPSIS @@ -32,7 +33,7 @@ Routine detected an incorrect or out-of-range argument. \fBE_POSTED\fR The menu has already been posted. .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_opts.3 b/lib/libmenu/menu_opts.3 index f5b67b19d90..a97682ee81a 100644 --- a/lib/libmenu/menu_opts.3 +++ b/lib/libmenu/menu_opts.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_opts 3X "" +.\" $OpenBSD: menu_opts.3,v 1.3 1997/12/14 23:19:35 millert Exp $ +.TH menu_opts 3 "" .SH NAME \fBmenu_opts\fR - set and get menu options .SH SYNOPSIS @@ -57,7 +58,7 @@ System error occurred (see \fBerrno\fR). \fBE_POSTED\fR The menu is already posted. .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_pattern.3 b/lib/libmenu/menu_pattern.3 index 30bc52793d1..e02bf66a60c 100644 --- a/lib/libmenu/menu_pattern.3 +++ b/lib/libmenu/menu_pattern.3 @@ -1,5 +1,6 @@ -'\" t -.TH menu_pattern 3X "" +.\" $OpenBSD: menu_pattern.3,v 1.3 1997/12/14 23:19:36 millert Exp $ +.\" Id: menu_pattern.3x,v 1.4 1997/12/06 22:10:02 tom Exp $ +.TH menu_pattern 3 "" .SH NAME \fBmenu_pattern\fR - get and set a menu's pattern buffer .SH SYNOPSIS @@ -12,7 +13,7 @@ char *menu_pattern(const MENU *menu); .SH DESCRIPTION Every menu has an associated pattern match buffer. As input events that are printable ASCII characters come in, they are appended to this match buffer -and tested for a match, as described in \fBmenu_driver\fR(3x). +and tested for a match, as described in \fBmenu_driver\fR(3). The function \fBset_menu_pattern\fR sets the pattern buffer for the given menu and tries to find the first matching item. If it succeeds, that item becomes @@ -36,7 +37,7 @@ Routine detected an incorrect or out-of-range argument. \fBE_NO_MATCH\fR Character failed to match. .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_post.3 b/lib/libmenu/menu_post.3 index 0cf8dfd30a8..539874a84f7 100644 --- a/lib/libmenu/menu_post.3 +++ b/lib/libmenu/menu_post.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_post 3X "" +.\" $OpenBSD: menu_post.3,v 1.3 1997/12/14 23:19:36 millert Exp $ +.TH menu_post 3 "" .SH NAME \fBmenu_post\fR - write or erase menus from associated subwindows .SH SYNOPSIS @@ -43,7 +44,7 @@ The menu has not been posted. \fBE_NOT_CONNECTED\fR No items are connected to the menu. .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_requestname.3 b/lib/libmenu/menu_requestname.3 index 9ae823e32c6..28770253591 100644 --- a/lib/libmenu/menu_requestname.3 +++ b/lib/libmenu/menu_requestname.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_requestname 3X "" +.\" $OpenBSD: menu_requestname.3,v 1.2 1997/12/14 23:19:36 millert Exp $ +.TH menu_requestname 3 "" .SH NAME \fBmenu_requestname\fR - handle printable menu request names .SH SYNOPSIS @@ -21,7 +22,7 @@ to \fBE_BAD_ARGUMENT\fR. .br \fBmenu_request_by_name\fR returns \fBE_NO_MATCH\fR on error. .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_spacing.3 b/lib/libmenu/menu_spacing.3 index ece226321c1..5748c0a50bf 100644 --- a/lib/libmenu/menu_spacing.3 +++ b/lib/libmenu/menu_spacing.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_spacing 3X "" +.\" $OpenBSD: menu_spacing.3,v 1.2 1997/12/14 23:19:37 millert Exp $ +.TH menu_spacing 3 "" .SH NAME \fBmenu_spacing\fR - Control spacing between menu items. .SH SYNOPSIS @@ -36,7 +37,7 @@ Both routines return \fBE_OK\fR on success. \fBset_menu_spacing\fR may return \fBE_POSTED\fR if the menu is posted, or \fBE_BAD_ARGUMENT\fR if one of the spacing values is out of range. .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_userptr.3 b/lib/libmenu/menu_userptr.3 index 30afd616864..8fc1ebee079 100644 --- a/lib/libmenu/menu_userptr.3 +++ b/lib/libmenu/menu_userptr.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_userptr 3X "" +.\" $OpenBSD: menu_userptr.3,v 1.3 1997/12/14 23:19:37 millert Exp $ +.TH menu_userptr 3 "" .SH NAME \fBmenu_userptr\fR - associate application data with a menu item .SH SYNOPSIS @@ -23,7 +24,7 @@ The routine succeeded. \fBE_SYSTEM_ERROR\fR System error occurred (see \fBerrno\fR). .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/menu_win.3 b/lib/libmenu/menu_win.3 index 9ed9b4eb2ea..d1fa4fa80c6 100644 --- a/lib/libmenu/menu_win.3 +++ b/lib/libmenu/menu_win.3 @@ -1,5 +1,6 @@ '\" t -.TH menu_win 3X "" +.\" $OpenBSD: menu_win.3,v 1.3 1997/12/14 23:19:38 millert Exp $ +.TH menu_win 3 "" .SH NAME \fBmenu_win\fR - make and break menu window and subwindow associations .SH SYNOPSIS @@ -48,7 +49,7 @@ The menu has already been posted. \fBE_NOT_CONNECTED\fR No items are connected to the menu. .SH SEE ALSO -\fBcurses\fR(3X), \fBmenu\fR(3X). +\fBcurses\fR(3), \fBmenu\fR(3). .SH NOTES The header file \fB<menu.h>\fR automatically includes the header file \fB<curses.h>\fR. diff --git a/lib/libmenu/mitem_current.3 b/lib/libmenu/mitem_current.3 new file mode 100644 index 00000000000..6078b49d52b --- /dev/null +++ b/lib/libmenu/mitem_current.3 @@ -0,0 +1,73 @@ +.\" $OpenBSD: mitem_current.3,v 1.1 1997/12/14 23:19:38 millert Exp $ +'\" t +.TH mitem_current 3 "" +.SH NAME +\fBmitem_current\fR - set and get current_menu_item +.SH SYNOPSIS +\fB#include <menu.h>\fR +.br +int set_current_item(MENU *menu, const ITEM *item); +.br +ITEM *current_item(const MENU *menu); +.br +int set_top_row(MENU *menu, int row); +.br +int top_row(const MENU *menu); +.br +int item_index(const ITEM *item); +.br +.SH DESCRIPTION +The function \fBset_current_item\fR sets the current item (the item on which +the menu cursor is positioned). \fBcurrent_item\fR returns a pointer to the +current item in the given menu. + +The function \fBset_top_row\fR sets the top row of the menu to show the given +row (the top row is initially 0, and is reset to this value whenever the +\fBO_ROWMAJOR\fR option is toggled). The item leftmost on the given row +becomes current. The function \fBtop_row\fR returns the number of the top menu +row being displayed. + +The function \fBitem_index\fR returns the (zero-origin) index of \fIitem\fR in +the menu's item pointer list. +.SH RETURN VALUE +\fBcurrent_item\fR returns \fBNULL\fR on error. + +\fBtop_row\fR and \fBitem_index\fR return \fBERR\fR (the general \fBcurses\fB +error value) on error. + +\fBset_current_item\fR and \fBset_top_row\fR return one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_BAD_STATE\fR +Routine was called from an initialization or termination function. +.TP 5 +\fBE_NOT_CONNECTED\fR +No items are connected to the menu. +.SH SEE ALSO +\fBcurses\fR(3), \fBmenu\fR(3). +.SH NOTES +The header file \fB<menu.h>\fR automatically includes the header file +\fB<curses.h>\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. + +The SVr4 menu library documentation specifies the \fBtop_row\fR and +\fBindex_item\fR error value as -1 (which is the value of \fBERR\fR). +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libmenu/mitem_name.3 b/lib/libmenu/mitem_name.3 new file mode 100644 index 00000000000..bb90f04641a --- /dev/null +++ b/lib/libmenu/mitem_name.3 @@ -0,0 +1,36 @@ +.\" $OpenBSD: mitem_name.3,v 1.1 1997/12/14 23:19:39 millert Exp $ +'\" t +.TH mitem_name 3 "" +.SH NAME +\fBmitem_name\fR - get menu item name and description fields +.SH SYNOPSIS +\fB#include <menu.h>\fR +.br +const char *item_name(const ITEM *item); +.br +const char *item_description(const ITEM *item); +.br +.SH DESCRIPTION +The function \fBitem_name\fR returns the name part of the given item. +.br +The function \fBitem_description\fR returns the description part of the given +item. +.SH RETURN VALUE +These routines returns \fBNULL\fR on error. +.SH SEE ALSO +\fBcurses\fR(3), \fBmenu\fR(3). +.SH NOTES +The header file \fB<menu.h>\fR automatically includes the header file +\fB<curses.h>\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libmenu/mitem_new.3 b/lib/libmenu/mitem_new.3 new file mode 100644 index 00000000000..560e3bdb027 --- /dev/null +++ b/lib/libmenu/mitem_new.3 @@ -0,0 +1,55 @@ +.\" $OpenBSD: mitem_new.3,v 1.1 1997/12/14 23:19:39 millert Exp $ +'\" t +.TH mitem_new 3 "" +.SH NAME +\fBmitem_new\fR - create and destroy menu items +.SH SYNOPSIS +\fB#include <menu.h>\fR +.br +ITEM *new_item(const char *name, const char *description); +.br +int free_item(ITEM *item); +.br +.SH DESCRIPTION +The function \fBnew_item\fR allocates a new item and initializes it from the +\fBname\fR and \fBdescription\fR pointers. Please notice that the item stores +only the pointers to the name and description. Those pointers must be valid +during the lifetime of the item. So you should be very carefull with names +or descriptions allocated on the stack of some routines. +.br +The function \fBfree_item\fR de-allocates an item. Please notice that it +is the responsibility of the application to release the memory for the +name or the description of the item. +.SH RETURN VALUE +The function \fBnew_item\fR returns \fBNULL\fR on error. + +The function \fBfree_item\fR returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_BAD_ARGUMENT\fR +Routine detected an incorrect or out-of-range argument. +.TP 5 +\fBE_CONNECTED\fR +Item is connected to a menu. +.SH SEE ALSO +\fBcurses\fR(3), \fBmenu\fR(3). +.SH NOTES +The header file \fB<menu.h>\fR automatically includes the header file +\fB<curses.h>\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libmenu/mitem_opts.3 b/lib/libmenu/mitem_opts.3 new file mode 100644 index 00000000000..9e6fc94e3ed --- /dev/null +++ b/lib/libmenu/mitem_opts.3 @@ -0,0 +1,56 @@ +.\" $OpenBSD: mitem_opts.3,v 1.1 1997/12/14 23:19:40 millert Exp $ +'\" t +.TH mitem_opts 3 "" +.SH NAME +\fBmitem_opts\fR - set and get menu item options +.SH SYNOPSIS +\fB#include <menu.h>\fR +.br +int set_item_opts(ITEM *item, OPTIONS opts); +.br +int item_opts_on(ITEM *item, OPTIONS opts); +.br +int item_opts_off(ITEM *item, OPTIONS opts); +.br +OPTIONS item_opts(const ITEM *item); +.br +.SH DESCRIPTION +The function \fBset_item_opts\fR sets all the given item's option bits (menu +option bits may be logically-OR'ed together). + +The function \fBitem_opts_on\fR turns on the given option bits, and leaves +others alone. + +The function \fBitem_opts_off\fR turns off the given option bits, and leaves +others alone. + +The function \fBitem_opts\fR returns the item's current option bits. + +There is only one defined option bit mask, \fBO_SELECTABLE\fR. When this is +on, the item may be selected during menu processing. This option defaults +to on. +.SH RETURN VALUE +Except for \fBitem_opts\fR, each routine returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBcurses\fR(3), \fBmenu\fR(3). +.SH NOTES +The header file \fB<menu.h>\fR automatically includes the header file +\fB<curses.h>\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libmenu/mitem_userptr.3 b/lib/libmenu/mitem_userptr.3 new file mode 100644 index 00000000000..b84561297dc --- /dev/null +++ b/lib/libmenu/mitem_userptr.3 @@ -0,0 +1,44 @@ +.\" $OpenBSD: mitem_userptr.3,v 1.1 1997/12/14 23:19:40 millert Exp $ +'\" t +.TH mitem_userptr 3 "" +.SH NAME +\fBmitem_userptr\fR - associate application data with a menu item +.SH SYNOPSIS +\fB#include <menu.h>\fR +.br +int set_item_userptr(ITEM *item, void *userptr); +.br +void *item_userptr(const ITEM *item); +.br +.SH DESCRIPTION +Every menu item has a field that can be used to hold application-specific data +(that is, the menu-driver code leaves it alone). These functions get and set +that field. +.SH RETURN VALUE +Except for \fBitem_userptr\fR (which returns \fBNULL\fR on error), each function returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBcurses\fR(3), \fBmenu\fR(3). +.SH NOTES +The header file \fB<menu.h>\fR automatically includes the header file +\fB<curses.h>\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. + +The user pointer should be a void pointer. We leave it as a char pointer for +SVr4 compatibility. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libmenu/mitem_value.3 b/lib/libmenu/mitem_value.3 new file mode 100644 index 00000000000..03ed76c1f05 --- /dev/null +++ b/lib/libmenu/mitem_value.3 @@ -0,0 +1,49 @@ +.\" $OpenBSD: mitem_value.3,v 1.1 1997/12/14 23:19:40 millert Exp $ +.\" Id: mitem_value.3x,v 1.3 1997/12/06 22:07:49 tom Exp $ +.TH mitem_value 3 "" +.SH NAME +\fBmitem_value\fR - set and get menu item values +.SH SYNOPSIS +\fB#include <menu.h>\fR +.br +int set_item_value(ITEM *item, bool value); +.br +bool item_value(const ITEM *item); +.br +.SH DESCRIPTION +If you turn off the menu option \fBO_ONEVALUE\fR (e.g., with +\fBset_menu_opts\fR or \fBmenu_opts_off\fR; see \fBmenu_opts\fR(3)), the menu +becomes multi-valued; that is, more than one item may simultaneously be +selected. + +In a multi_valued menu, you can used \fBset_item_value\fR to select the +given menu item (second argument \fBTRUE\fR) or deselect it (second argument +\fBFALSE\fR). +.SH RETURN VALUE +The function \fBset_item_value\fR returns one of the following: +.TP 5 +\fBE_OK\fR +The routine succeeded. +.TP 5 +\fBE_SYSTEM_ERROR\fR +System error occurred (see \fBerrno\fR). +.TP 5 +\fBE_REQUEST_DENIED\fR +The menu driver could not process the request. +.SH SEE ALSO +\fBcurses\fR(3), \fBmenu\fR(3). +.SH NOTES +The header file \fB<menu.h>\fR automatically includes the header file +\fB<curses.h>\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: diff --git a/lib/libmenu/mitem_visible.3 b/lib/libmenu/mitem_visible.3 new file mode 100644 index 00000000000..1a5adddf866 --- /dev/null +++ b/lib/libmenu/mitem_visible.3 @@ -0,0 +1,31 @@ +.\" $OpenBSD: mitem_visible.3,v 1.1 1997/12/14 23:19:41 millert Exp $ +'\" t +.TH mitem_visible 3 "" +.SH NAME +\fBmitem_visible\fR - check visibility of a menu item +.SH SYNOPSIS +\fB#include <menu.h>\fR +.br +bool item_visible(const ITEM *item); +.br +.SH DESCRIPTION +A menu item is visible when it is in the portion of a posted menu that +is mapped onto the screen (if the menu is scrollable, in particular, this +portion will be smaller than the whole menu). +.SH SEE ALSO +\fBcurses\fR(3), \fBmenu\fR(3). +.SH NOTES +The header file \fB<menu.h>\fR automatically includes the header file +\fB<curses.h>\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: |