summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libform/Makefile2
-rw-r--r--lib/libform/form.3171
-rw-r--r--lib/libform/form.3tbl172
-rw-r--r--lib/libform/form_driver.35
-rw-r--r--lib/libform/form_field_buffer.34
-rw-r--r--lib/libform/form_field_new.35
-rw-r--r--lib/libform/form_field_validation.35
-rw-r--r--lib/libmenu/Makefile5
-rw-r--r--lib/libmenu/menu.3162
-rw-r--r--lib/libmenu/menu.3tbl163
-rw-r--r--lib/libmenu/menu_attribs.35
-rw-r--r--lib/libmenu/menu_cursor.35
-rw-r--r--lib/libmenu/menu_driver.37
-rw-r--r--lib/libmenu/menu_format.35
-rw-r--r--lib/libmenu/menu_hook.35
-rw-r--r--lib/libmenu/menu_items.35
-rw-r--r--lib/libmenu/menu_mark.35
-rw-r--r--lib/libmenu/menu_new.35
-rw-r--r--lib/libmenu/menu_opts.35
-rw-r--r--lib/libmenu/menu_pattern.39
-rw-r--r--lib/libmenu/menu_post.35
-rw-r--r--lib/libmenu/menu_requestname.35
-rw-r--r--lib/libmenu/menu_spacing.35
-rw-r--r--lib/libmenu/menu_userptr.35
-rw-r--r--lib/libmenu/menu_win.35
-rw-r--r--lib/libmenu/mitem_current.373
-rw-r--r--lib/libmenu/mitem_name.336
-rw-r--r--lib/libmenu/mitem_new.355
-rw-r--r--lib/libmenu/mitem_opts.356
-rw-r--r--lib/libmenu/mitem_userptr.344
-rw-r--r--lib/libmenu/mitem_value.349
-rw-r--r--lib/libmenu/mitem_visible.331
-rw-r--r--lib/libpanel/panel.313
33 files changed, 748 insertions, 384 deletions
diff --git a/lib/libform/Makefile b/lib/libform/Makefile
index 0f3eafacbdb..579cd9418ec 100644
--- a/lib/libform/Makefile
+++ b/lib/libform/Makefile
@@ -8,7 +8,7 @@ SRCS= fld_arg.c fld_attr.c fld_current.c fld_def.c fld_dup.c fld_ftchoice.c \
fty_alpha.c fty_enum.c fty_int.c fty_ipv4.c fty_num.c fty_regex.c
HDRS= form.h
CFLAGS+=-I${.CURDIR}/../libmenu -I${.CURDIR}/../libcurses -DHAVE_CONFIG_H
-MAN= form.3 form_cursor.3 form_data.3 form_driver.3 form_field.3 \
+MAN= form.3tbl form_cursor.3 form_data.3 form_driver.3 form_field.3 \
form_field_attributes.3 form_field_buffer.3 form_field_info.3 \
form_field_just.3 form_field_new.3 form_field_opts.3 \
form_field_userptr.3 form_field_validation.3 form_fieldtype.3 \
diff --git a/lib/libform/form.3 b/lib/libform/form.3
deleted file mode 100644
index d0ba0e1112b..00000000000
--- a/lib/libform/form.3
+++ /dev/null
@@ -1,171 +0,0 @@
-'\" t
-.\" $OpenBSD: form.3,v 1.4 1997/12/03 05:46:26 millert Exp $
-.TH forms 3 ""
-.SH NAME
-\fBforms\fR - curses extension for programming forms
-.SH SYNOPSIS
-\fB#include <form.h>\fR
-.br
-.SH DESCRIPTION
-The \fBforms\fR library provides terminal-independent facilities for composing
-form screens on character-cell terminals. The library includes: field
-routines, which create and modify form fields; and form routines, which group
-fields into forms, display forms on the screen, and handle interaction with the
-user.
-
-The \fBforms\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 \fBforms\fR library, link with the options
-\fB-lform -lcurses\fR.
-
-.SS Current Default Values for Field Attributes
-
-The \fBforms\fR library maintains a default value for field attributes. You
-can get or set this default by calling the appropriate \fBget_\fR or \fBset_\fR
-routine with a \fBNULL\fR field pointer. Changing this default with a
-\fBset_\fR function affects future field creations, but does not change the
-rendering of fields already created.
-
-.SS Routine Name Index
-
-The following table lists each \fBform\fR routine and the name of
-the manual page on which it is described.
-
-.TS
-l l
-l l .
-\fBcurses\fR Routine Name Manual Page Name
-=
-\fBcurrent_field\fR form_page(3)
-\fBdata_ahead\fR form_data(3)
-\fBdata_behind\fR form_data(3)
-\fBdup_field\fR form_field_new(3)
-\fBdynamic_fieldinfo\fR form_field_info(3)
-\fBfield_arg\fR form_field_validation(3)
-\fBfield_back\fR form_field_attributes(3)
-\fBfield_buffer\fR form_field_buffer(3)
-\fBfield_count\fR form_field(3)
-\fBfield_fore\fR form_field_attributes(3)
-\fBfield_index\fR form_page(3)
-\fBfield_info\fR form_field_info(3)
-\fBfield_init\fR form_hook(3)
-\fBfield_just\fR form_field_just(3)
-\fBfield_opts\fR form_field_opts(3)
-\fBfield_opts_off\fR form_field_opts(3)
-\fBfield_opts_on\fR form_field_opts(3)
-\fBfield_pad\fR form_field_attributes(3)
-\fBfield_status\fR form_field_buffer(3)
-\fBfield_term\fR form_hook(3)
-\fBfield_type\fR form_field_validation(3)
-\fBfield_userptr\fR form_field_userptr(3)
-\fBform_driver\fR form_driver(3)
-\fBform_fields\fR form_field(3)
-\fBform_init\fR form_hook(3)
-\fBform_opts\fR form_opts(3)
-\fBform_opts_off\fR form_opts(3)
-\fBform_opts_on\fR form_opts(3)
-\fBform_page\fR form_page(3)
-\fBform_request_by_name\fR form_requestname(3)
-\fBform_request_name\fR form_requestname(3)
-\fBform_sub\fR form_win(3)
-\fBform_term\fR form_hook(3)
-\fBform_userptr\fR form_userptr(3)
-\fBform_win\fR form_win(3)
-\fBfree_field\fR form_field_new(3)
-\fBfree_form\fR form_new(3)
-\fBlink_field\fR form_field_new(3)
-\fBlink_fieldtype\fR link_fieldtype(3)
-\fBmove_field\fR form_field(3)
-\fBnew_field\fR form_field_new(3)
-\fBnew_form\fR form_new(3)
-\fBnew_page\fR form_new_page(3)
-\fBpos_form_cursor\fR form_cursor(3)
-\fBpost_form\fR form_post(3)
-\fBscale_form\fR form_win(3)
-\fBset_current_field\fR form_page(3)
-\fBset_field_back\fR form_field_attributes(3)
-\fBset_field_buffer\fR form_field_buffer(3)
-\fBset_field_fore\fR form_field_attributes(3)
-\fBset_field_init\fR form_hook(3)
-\fBset_field_just\fR form_field_just(3)
-\fBset_field_opts\fR form_field_opts(3)
-\fBset_field_pad\fR form_field_attributes(3)
-\fBset_field_status\fR form_field_buffer(3)
-\fBset_field_term\fR form_hook(3)
-\fBset_field_type\fR form_field_validation(3)
-\fBset_field_userptr\fR form_field_userptr(3)
-\fBset_fieldtype_arg\fR form_fieldtype(3)
-\fBset_fieldtype_choice\fR form_fieldtype(3)
-\fBset_form_fields\fR form_field(3)
-\fBset_form_init\fR form_hook(3)
-\fBset_form_opts\fR form_field_opts(3)
-\fBset_form_page\fR form_page(3)
-\fBset_form_sub\fR form_win(3)
-\fBset_form_term\fR form_hook(3)
-\fBset_form_userptr\fR form_userptr(3)
-\fBset_form_win\fR form_win(3)
-\fBset_max_field\fR form_field_buffer(3)
-\fBset_new_page\fR form_new_page(3)
-\fBunpost_form\fR form_post(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_CONNECTED\fR
-The field is already connected to a form.
-.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 form is already posted.
-.TP 5
-\fBE_BAD_STATE\fR
-Routine was called from an initialization or termination function.
-.TP 5
-\fBE_NO_ROOM\fR
-Form is too large for its window.
-.TP 5
-\fBE_NOT_POSTED\fR
-The form has not been posted.
-.TP 5
-\fBE_UNKNOWN_COMMAND\fR
-The form driver code saw an unknown request code.
-.TP 5
-\fBE_INVALID_FIELD\fR
-Contents of a field are not valid.
-.TP 5
-\fBE_NOT_CONNECTED\fR
-No fields are connected to the form.
-.TP 5
-\fBE_REQUEST_DENIED\fR
-The form driver could not process the request.
-.SH SEE ALSO
-\fBcurses\fR(3) and 3 pages whose names begin "form_" for detailed
-descriptions of the entry points.
-.SH NOTES
-The header file \fB<form.h>\fR automatically includes the header files
-\fB<curses.h>\fR and \fB<eti.h>\fR.
-
-In your library list, libform.a should be before libcurses.a; that is,
-you want to say `-lform -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 forms 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/libform/form.3tbl b/lib/libform/form.3tbl
new file mode 100644
index 00000000000..ac06e9e2f61
--- /dev/null
+++ b/lib/libform/form.3tbl
@@ -0,0 +1,172 @@
+'\" t
+.\" $OpenBSD: form.3tbl,v 1.1 1997/12/14 23:19:27 millert Exp $
+.\" Id: form.3x,v 0.8 1997/12/14 01:44:04 tom Exp $
+.TH form 3 ""
+.SH NAME
+\fBform\fR - curses extension for programming forms
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+.SH DESCRIPTION
+The \fBform\fR library provides terminal-independent facilities for composing
+form screens on character-cell terminals. The library includes: field
+routines, which create and modify form fields; and form routines, which group
+fields into forms, display forms on the screen, and handle interaction with the
+user.
+
+The \fBform\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 \fBform\fR library, link with the options
+\fB-lform -lcurses\fR.
+
+.SS Current Default Values for Field Attributes
+
+The \fBform\fR library maintains a default value for field attributes. You
+can get or set this default by calling the appropriate \fBget_\fR or \fBset_\fR
+routine with a \fBNULL\fR field pointer. Changing this default with a
+\fBset_\fR function affects future field creations, but does not change the
+rendering of fields already created.
+
+.SS Routine Name Index
+
+The following table lists each \fBform\fR routine and the name of
+the manual page on which it is described.
+
+.TS
+l l
+l l .
+\fBcurses\fR Routine Name Manual Page Name
+=
+current_field \fBform_page\fR(3)
+data_ahead \fBform_data\fR(3)
+data_behind \fBform_data\fR(3)
+dup_field \fBform_field_new\fR(3)
+dynamic_fieldinfo \fBform_field_info\fR(3)
+field_arg \fBform_field_validation\fR(3)
+field_back \fBform_field_attributes\fR(3)
+field_buffer \fBform_field_buffer\fR(3)
+field_count \fBform_field\fR(3)
+field_fore \fBform_field_attributes\fR(3)
+field_index \fBform_page\fR(3)
+field_info \fBform_field_info\fR(3)
+field_init \fBform_hook\fR(3)
+field_just \fBform_field_just\fR(3)
+field_opts \fBform_field_opts\fR(3)
+field_opts_off \fBform_field_opts\fR(3)
+field_opts_on \fBform_field_opts\fR(3)
+field_pad \fBform_field_attributes\fR(3)
+field_status \fBform_field_buffer\fR(3)
+field_term \fBform_hook\fR(3)
+field_type \fBform_field_validation\fR(3)
+field_userptr \fBform_field_userptr\fR(3)
+form_driver \fBform_driver\fR(3)
+form_fields \fBform_field\fR(3)
+form_init \fBform_hook\fR(3)
+form_opts \fBform_opts\fR(3)
+form_opts_off \fBform_opts\fR(3)
+form_opts_on \fBform_opts\fR(3)
+form_page \fBform_page\fR(3)
+form_request_by_name \fBform_requestname\fR(3)
+form_request_name \fBform_requestname\fR(3)
+form_sub \fBform_win\fR(3)
+form_term \fBform_hook\fR(3)
+form_userptr \fBform_userptr\fR(3)
+form_win \fBform_win\fR(3)
+free_field \fBform_field_new\fR(3)
+free_form \fBform_new\fR(3)
+link_field \fBform_field_new\fR(3)
+link_fieldtype \fBform_fieldtype\fR(3)
+move_field \fBform_field\fR(3)
+new_field \fBform_field_new\fR(3)
+new_form \fBform_new\fR(3)
+new_page \fBform_new_page\fR(3)
+pos_form_cursor \fBform_cursor\fR(3)
+post_form \fBform_post\fR(3)
+scale_form \fBform_win\fR(3)
+set_current_field \fBform_page\fR(3)
+set_field_back \fBform_field_attributes\fR(3)
+set_field_buffer \fBform_field_buffer\fR(3)
+set_field_fore \fBform_field_attributes\fR(3)
+set_field_init \fBform_hook\fR(3)
+set_field_just \fBform_field_just\fR(3)
+set_field_opts \fBform_field_opts\fR(3)
+set_field_pad \fBform_field_attributes\fR(3)
+set_field_status \fBform_field_buffer\fR(3)
+set_field_term \fBform_hook\fR(3)
+set_field_type \fBform_field_validation\fR(3)
+set_field_userptr \fBform_field_userptr\fR(3)
+set_fieldtype_arg \fBform_fieldtype\fR(3)
+set_fieldtype_choice \fBform_fieldtype\fR(3)
+set_form_fields \fBform_field\fR(3)
+set_form_init \fBform_hook\fR(3)
+set_form_opts \fBform_field_opts\fR(3)
+set_form_page \fBform_page\fR(3)
+set_form_sub \fBform_win\fR(3)
+set_form_term \fBform_hook\fR(3)
+set_form_userptr \fBform_userptr\fR(3)
+set_form_win \fBform_win\fR(3)
+set_max_field \fBform_field_buffer\fR(3)
+set_new_page \fBform_new_page\fR(3)
+unpost_form \fBform_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_CONNECTED\fR
+The field is already connected to a form.
+.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 form is already posted.
+.TP 5
+\fBE_BAD_STATE\fR
+Routine was called from an initialization or termination function.
+.TP 5
+\fBE_NO_ROOM\fR
+Form is too large for its window.
+.TP 5
+\fBE_NOT_POSTED\fR
+The form has not been posted.
+.TP 5
+\fBE_UNKNOWN_COMMAND\fR
+The form driver code saw an unknown request code.
+.TP 5
+\fBE_INVALID_FIELD\fR
+Contents of a field are not valid.
+.TP 5
+\fBE_NOT_CONNECTED\fR
+No fields are connected to the form.
+.TP 5
+\fBE_REQUEST_DENIED\fR
+The form driver could not process the request.
+.SH SEE ALSO
+\fBcurses\fR(3) and 3 pages whose names begin "form_" for detailed
+descriptions of the entry points.
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header files
+\fB<curses.h>\fR and \fB<eti.h>\fR.
+
+In your library list, libform.a should be before libcurses.a; that is,
+you want to say `-lform -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 forms 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/libform/form_driver.3 b/lib/libform/form_driver.3
index 4c1bac32be3..8e65d15797d 100644
--- a/lib/libform/form_driver.3
+++ b/lib/libform/form_driver.3
@@ -1,5 +1,6 @@
'\" t
-.\" $OpenBSD: form_driver.3,v 1.4 1997/12/03 05:46:27 millert Exp $
+.\" $OpenBSD: form_driver.3,v 1.5 1997/12/14 23:19:27 millert Exp $
+.\" Id: form_driver.3x,v 0.5 1997/12/14 01:26:33 tom Exp $
.TH form_driver 3 ""
.SH NAME
\fBform_driver\fR - command-processing loop of the form system
@@ -227,7 +228,7 @@ Contents of field is invalid.
\fBE_REQUEST_DENIED\fR
The form driver could not process the request.
.SH SEE ALSO
-\fBcurses\fR(3), \fBforms\fR(3x).
+\fBcurses\fR(3), \fBforms\fR(3).
.SH NOTES
The header file \fB<form.h>\fR automatically includes the header files
\fB<curses.h>\fR.
diff --git a/lib/libform/form_field_buffer.3 b/lib/libform/form_field_buffer.3
index 14de9c767eb..7a98d54268f 100644
--- a/lib/libform/form_field_buffer.3
+++ b/lib/libform/form_field_buffer.3
@@ -1,5 +1,5 @@
'\" t
-.\" $OpenBSD: form_field_buffer.3,v 1.4 1997/12/03 05:46:29 millert Exp $
+.\" $OpenBSD: form_field_buffer.3,v 1.5 1997/12/14 23:19:28 millert Exp $
.TH form_field_buffer 3 ""
.SH NAME
\fBform_field_buffer\fR - field buffer control
@@ -20,7 +20,7 @@ int set_max_field(FIELD *field, int max);
The function \fBset_field_buffer\fR sets the numbered buffer of the given field
to contain a given string. Buffer 0 is the displayed value of the field; other
numbered buffers may be allocated by applications through the \fBnbuf\fR
-argument of (see \fBfield_new\fR(3)) but are not manipulated by the forms
+argument of (see \fBform_field_new\fR(3)) but are not manipulated by the forms
library. The function \fBfield_buffer\fR returns the foreground attribute.
The function \fBset_field_status\fR sets the associated status flag of
diff --git a/lib/libform/form_field_new.3 b/lib/libform/form_field_new.3
index 907b16ebd19..3675b2e9296 100644
--- a/lib/libform/form_field_new.3
+++ b/lib/libform/form_field_new.3
@@ -1,5 +1,6 @@
'\" t
-.\" $OpenBSD: form_field_new.3,v 1.4 1997/12/03 05:46:30 millert Exp $
+.\" $OpenBSD: form_field_new.3,v 1.5 1997/12/14 23:19:28 millert Exp $
+.\" Id: form_field_new.3x,v 0.6 1997/12/06 22:07:19 tom Exp $
.TH form_field_new 3 ""
.SH NAME
\fBform_field_new\fR - create and destroy form fields
@@ -55,7 +56,7 @@ These routines emulate the System V forms library. They were not supported on
Version 7 or BSD versions.
It may be unwise to count on the set of attributes copied by
-\fBdup_field\fR(3x) being portable; the System V forms library documents are
+\fBdup_field\fR(3) being portable; the System V forms library documents are
not very explicit on what gets copied and was not.
.SH AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
diff --git a/lib/libform/form_field_validation.3 b/lib/libform/form_field_validation.3
index 834566906db..dfa7d4d8820 100644
--- a/lib/libform/form_field_validation.3
+++ b/lib/libform/form_field_validation.3
@@ -1,5 +1,6 @@
'\" t
-.\" $OpenBSD: form_field_validation.3,v 1.4 1997/12/03 05:46:31 millert Exp $
+.\" $OpenBSD: form_field_validation.3,v 1.5 1997/12/14 23:19:29 millert Exp $
+.\" Id: form_field_validation.3x,v 0.9 1997/12/06 22:08:27 tom Exp $
.TH form_field_validation 3 ""
.SH NAME
\fBform_field_validation\fR - data type validation for fields
@@ -55,7 +56,7 @@ For details of the precision handling see \fBprintf's\fR man-page.
TYPE_REGEXP
Regular expression data. Requires a regular expression \fB(char *)\fR third argument;
the data is valid if the regular expression matches it. Regular expressions
-are in the format of \fBregcomp\fR(3x) and \fBregexec\fR(3). Please notice
+are in the format of \fBregcomp\fR(3) and \fBregexec\fR(3). Please notice
that the regular expression must match the whole field. If you have for
example an eight character wide field, a regular expression "^[0-9]*$" always
means that you have to fill all eight positions with digits. If you want to
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:
diff --git a/lib/libpanel/panel.3 b/lib/libpanel/panel.3
index 22d4cfb3573..0bfa6279222 100644
--- a/lib/libpanel/panel.3
+++ b/lib/libpanel/panel.3
@@ -1,4 +1,5 @@
-.\" $OpenBSD: panel.3,v 1.4 1997/12/03 05:42:24 millert Exp $
+.\" $OpenBSD: panel.3,v 1.5 1997/12/14 23:19:07 millert Exp $
+.\" Id: panel.3x,v 1.8 1997/12/14 01:49:25 tom Exp $
.TH panel 3 ""
.ds n 5
.ds d /usr/share/terminfo
@@ -40,7 +41,7 @@ panel - panel stack extension for curses
\fBint del_panel(PANEL *pan)\fR
.br
.SH DESCRIPTION
-Panels are curses(3) windows with the added feature of
+Panels are \fBcurses\fR(3) windows with the added feature of
depth. Panel functions allow the use of stacked windows and ensure
the proper portions of each window and the curses \fBstdscr\fR window are
hidden or displayed when panels are added, moved, modified or removed.
@@ -52,7 +53,7 @@ A window is associated with every panel. The panel routines enable
you to create, move, hides, and show panels, as well as position a
panel at any desired location in the stack.
.P
-Panel routines are a functional layer added to curses(3), make only
+Panel routines are a functional layer added to \fBcurses\fR(3), make only
high-level curses calls, and work anywhere terminfo curses does.
.SH FUNCTIONS
.TP
@@ -98,7 +99,7 @@ to move a panel window.
\fBreplace_panel(pan,window)\fR
replaces the current window of panel with \fBwindow\fR (useful, for
example if you want to resize a panel; if you're using \fBcurses\fR,
-you can call \fBreplace_panel\fR on the output of \fBwresize\fR(3x)).
+you can call \fBreplace_panel\fR on the output of \fBwresize\fR(3)).
It does not change the position of the panel in the stack.
.TP
\fBpanel_above(pan)\fR
@@ -147,10 +148,8 @@ interface for the panels library
libpanel.a
the panels library itself
.SH SEE ALSO
-curses(3)
+\fBcurses\fR(3X)
.SH AUTHOR
Originally written by Warren Tucker <wht@n4hgf.mt-park.ga.us>,
primarily to assist in porting u386mon to systems without a native
panels library. Repackaged for ncurses by Zeyd ben-Halim.
-
-