-.TP
-.B panel_userptr(pan)
-returns the user pointer for a given panel.
-.TP
-.B panel_window(pan)
-returns a pointer to the window of the given panel.
-.SH DIAGNOSTICS
-Each routine that returns a pointer returns \fBNULL\fR if an error
-occurs. Each routine that returns an int value returns \fBOK\fR if it
-executes successfully and \fBERR\fR if not.
-.SH COMPATIBILITY
-Reasonable care has been taken to ensure compatibility
-with the native panel facility introduced in SVr3.2 (inspection of
-the SVr4 manual pages suggests the programming interface is unchanged).
-The \fBPANEL\fR data structures are merely similar. The programmer
-is cautioned not to directly use \fBPANEL\fR fields.
-.P
-The functions \fBshow_panel()\fR and \fBtop_panel()\fR are identical
-in this implementation, and work equally well with displayed or hidden
-panels. In the native System V implementation, \fBshow_panel()\fR is
-intended for making a hidden panel visible (at the top of the stack)
-and \fBtop_panel()\fR is intended for making an already-visible panel
-move to the top of the stack. You are cautioned to use the correct
-function to ensure compatibility with native panel libraries.
-.SH NOTE
-In your library list, libpanel.a should be before libncurses.a; that is,
-you want to say `\-lpanel \-lncurses', not the other way around (which would
-usually give a link-error).
-.SH FILES
-.P
-panel.h
-interface for the panels library
-.P
-libpanel.a
-the panels library itself
+.\" ---------
+.SS show_panel
+\fB\%show_panel(\fIpan\fB)\fR
+makes a hidden panel visible by placing it on top of the panels in the
+panel stack.
+See \*(``PORTABILITY\*('' below.
+.\" ---------
+.SS top_panel
+\fB\%top_panel(\fIpan\fB)\fR
+puts the given visible panel \fIpan\fP on top of all panels in the
+stack.
+See \*(``PORTABILITY\*('' below.
+.\" ---------
+.SS update_panels
+\fB\%update_panels()\fR
+refreshes the virtual screen to reflect the relations between the panels
+in the stack,
+but does not call \fB\%doupdate\fP(3X) to refresh the physical screen.
+Use this function and not \fB\%wrefresh\fP(3X) or
+\fB\%wnoutrefresh\fP(3X).
+.PP
+\fB\%update_panels\fP may be called more than once before a call to
+\fB\%doupdate\fP,
+but \fB\%doupdate\fP is the function responsible for updating
+the physical screen.
+.SH "RETURN VALUE"
+Each routine that returns a pointer returns \fBNULL\fP if an error
+occurs.
+Each routine that returns an int value returns \fBOK\fP if it
+executes successfully and \fBERR\fP if not.
+.PP
+Except as noted,
+the \fIpan\fP and \fIwindow\fP parameters must be non-null.
+If either is null,
+an error is returned.
+.PP
+The \fB\%move_panel\fP function uses \fBmvwin\fP(3X),
+and returns
+.B ERR
+if \fB\%mvwin\fP returns
+.BR ERR "."
+.SH NOTES
+The header file \fI\%panel.h\fP itself includes the header file
+\fI\%curses.h\fP.
+.SH PORTABILITY
+Reasonable care has been taken to ensure compatibility
+with the native panel facility introduced in System\ V;
+inspection of the SVr4 manual pages suggests the programming interface
+never changed.
+The \fI\%PANEL\fP data structures are merely similar.
+The programmer is cautioned not to directly use \fI\%PANEL\fP fields.
+.PP
+The functions \fB\%show_panel\fP and \fB\%top_panel\fP are identical
+in this implementation,
+and work equally well with displayed or hidden panels.
+In the System\ V implementation,
+\fB\%show_panel\fP is intended for making a hidden panel visible
+(at the top of the stack)
+and \fB\%top_panel\fP is intended for making an already-visible panel
+move to the top of the stack.
+You are cautioned to use the correct
+function to ensure compatibility with System\ V panel libraries.
+.SH HISTORY
+A panel facility was documented in SVr4.2's
+\fICharacter User Interface Programming\fP document.
+.PP
+It is not part of X/Open Curses.
+.PP
+A few implementations exist:
+.bP
+Systems based on SVr4 source code,
+such as Solaris,
+provide this library.
+.bP
+\fI\%ncurses\fP (since version 0.6 in 1993)
+and \fIPDCurses\fP (since version 2.2 in 1995)
+provide a panel library whose common ancestor
+is a public domain implementation by Warren Tucker
+published in \fIu386mon\fP 2.20 (1990).
+.IP
+According to Tucker,
+the System\ V panel library was first released in SVr3.2 (1988),
+and his implementation helped with a port to SVr3.1 (1987).
+.IP
+Several developers have improved each of these;
+they are no longer the same as Tucker's implementation.
+.bP
+NetBSD 8 (2018)
+has a panel library begun by Valery Ushakov in 2015,
+based on the System\ V documentation.
+.SH AUTHORS
+Warren Tucker <wht@n4hgf.mt\-park.ga.us> originally wrote this
+implementation,
+primarily to assist in porting \fI\%u386mon\fP to systems without a
+native panel library.
+.PP
+Zeyd ben-Halim repackaged it for \fI\%ncurses\fP.
+.PP
+Juergen Pfeifer and Thomas E. Dickey revised and improved the library.