.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_memleaks.3x,v 1.25 2023/09/23 21:07:59 tom Exp $
-.TH curs_memleaks 3X 2023-09-23 "ncurses 6.4" "Library calls"
-.ie \n(.g .ds `` \(lq
-.el .ds `` ``
-.ie \n(.g .ds '' \(rq
-.el .ds '' ''
+.\" $Id: curs_memleaks.3x,v 1.33 2023/12/23 16:22:08 tom Exp $
+.TH curs_memleaks 3X 2023-12-23 "ncurses 6.4" "Library calls"
+.ie \n(.g \{\
+.ds `` \(lq
+.ds '' \(rq
+.\}
+.el \{\
+.ie t .ds `` ``
+.el .ds `` ""
+.ie t .ds '' ''
+.el .ds '' ""
+.\}
+.
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
check for memory leaks in \fIcurses\fR
.SH SYNOPSIS
.nf
-\fB#include <curses.h>\fP
-\fBvoid exit_curses(int \fIcode\fB);\fR
+\fB#include <curses.h>
+\fBvoid exit_curses(int \fIcode\fP);
.PP
-\fB#include <term.h>\fP
-\fBvoid exit_terminfo(int \fIcode\fB);\fR
+\fB#include <term.h>
+\fBvoid exit_terminfo(int \fIcode\fP);
.PP
-/* deprecated (intentionally not declared in curses.h or term.h) */
-\fBvoid _nc_freeall(void);\fP
-\fBvoid _nc_free_and_exit(int \fIcode\fB);\fR
-\fBvoid _nc_free_tinfo(int \fIcode\fB);\fR
+\fI/* deprecated (intentionally not declared in curses.h or term.h) */
+\fBvoid _nc_freeall(void);
+\fBvoid _nc_free_and_exit(int \fIcode\fP);
+\fBvoid _nc_free_tinfo(int \fIcode\fP);
.fi
.SH DESCRIPTION
-These functions are used to simplify analysis of memory leaks in the ncurses
-library.
+These functions are used to simplify analysis of memory leaks in the
+\fI\%ncurses\fP library.
.PP
Any implementation of curses must not free the memory associated with
a screen, since (even after calling \fB\%endwin\fP(3X)), it must be available
for use in the next call to \fB\%refresh\fP(3X).
There are also chunks of memory held for performance reasons.
That makes it hard to analyze curses applications for memory leaks.
-When using the specially configured debugging version of the ncurses library,
+When using the specially configured debugging version of the
+\fI\%ncurses\fP library,
applications can call functions which free those chunks of memory,
simplifying the process of memory-leak checking.
.PP
because they are not intended for use in the non-debugging library:
.TP 5
\fB\%_nc_freeall\fP
-This frees (almost) all of the memory allocated by ncurses.
+This frees (almost) all of the memory allocated by \fI\%ncurses\fP.
.TP 5
\fB\%_nc_free_and_exit\fP
-This frees the memory allocated by ncurses (like \fB\%_nc_freeall\fP),
+This frees the memory allocated by \fI\%ncurses\fP
+(like \fB\%_nc_freeall\fP),
and exits the program.
It is preferred over \fB\%_nc_freeall\fP since some of that memory
may be required to keep the application running.
of the memory allocated by curses:
.bP
The portable part of \fB\%exit_curses\fP can be freed using \fB\%delscreen\fP,
-passing the \fBSCREEN*\fP pointer returned by \fB\%newterm\fP.
+passing the \fISCREEN\fP pointer returned by \fB\%newterm\fP.
.IP
In some implementations, there is a global variable \fBsp\fP
which could be used, e.g., if the screen were only initialized
using \fB\%initscr\fP.
.bP
-The portable part of \fB\%exit_terminfo\fP can be freed using \fB\%del_curterm\fP.
+The portable part of \fB\%exit_terminfo\fP can be freed
+using \fB\%del_curterm\fP.
.IP
In this case, there is a global variable \fB\%cur_term\fP which can be
used as parameter.
.SH SEE ALSO
+\fB\%curses\fP(3X),
\fB\%curs_initscr\fP(3X),
-\fB\%curs_terminfo\fP(3X),
-\fB\%curses\fP(3X)
+\fB\%curs_terminfo\fP(3X)