2 $Id: announce.html,v 1.70 2024/04/27 18:38:45 tom Exp $
3 ****************************************************************************
4 * Copyright 2018-2023,2024 Thomas E. Dickey *
6 * Permission is hereby granted, free of charge, to any person obtaining a *
7 * copy of this software and associated documentation files (the *
8 * "Software"), to deal in the Software without restriction, including *
9 * without limitation the rights to use, copy, modify, merge, publish, *
10 * distribute, distribute with modifications, sublicense, and/or sell *
11 * copies of the Software, and to permit persons to whom the Software is *
12 * furnished to do so, subject to the following conditions: *
14 * The above copyright notice and this permission notice shall be included *
15 * in all copies or substantial portions of the Software. *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
20 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
21 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
22 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
23 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
25 * Except as contained in this notice, the name(s) of the above copyright *
26 * holders shall not be used in advertising or otherwise to promote the *
27 * sale, use or other dealings in this Software without prior written *
29 ****************************************************************************
31 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
34 <meta name="generator" content=
35 "HTML Tidy for HTML5 for Linux version 5.6.0">
36 <title>Announcing ncurses 6.5</title>
37 <link rel="author" href="mailto:bug-ncurses@gnu.org">
38 <meta http-equiv="Content-Type" content=
39 "text/html; charset=us-ascii">
40 <style type="text/css">
41 p,li { max-width:700px; }
42 dd { max-width:630px; }
45 font-variant: small-caps;
48 font-family: "Andale Mono", "Monotype.com", monospace;
53 font-family: "Andale Mono", "Monotype.com", monospace;
59 <h1 class="no-header">Announcing ncurses 6.5</h1>
61 <h2><a name="h2-overview" id="h2-overview">Overview</a></h2>
63 <p>The <span class="main-name">ncurses</span> (new curses)
64 library is a free software emulation of curses in System V
65 Release 4.0 (SVr4), and more. It uses terminfo format, supports
66 pads and color and multiple highlights and forms characters and
67 function-key mapping, and has all the other SVr4-curses
68 enhancements over BSD curses. SVr4 curses became the basis of
71 <p>In mid-June 1995, the maintainer of 4.4BSD curses declared
72 that he considered 4.4BSD curses obsolete, and encouraged the
73 keepers of <span class="main-name">unix</span> releases such as
74 BSD/OS, FreeBSD and NetBSD to switch over to <span class=
75 "main-name">ncurses</span>.</p>
77 <p>Since 1995, <span class="main-name">ncurses</span> has been
78 ported to many systems:</p>
81 <li>It is used in almost every system based on the Linux kernel
82 (aside from some embedded applications).</li>
84 <li>It is used as the system curses library on OpenBSD, FreeBSD
87 <li>It is used in environments such as Cygwin and MinGW. The
88 first of these was EMX on OS/2 Warp.</li>
90 <li>It is used (though usually not as the <em>system</em>
91 curses) on all of the vendor <span class=
92 "main-name">unix</span> systems, e.g., AIX, HP-UX, IRIX64, SCO,
95 <li>It should work readily on any ANSI/POSIX-conforming
96 <span class="main-name">unix</span>.</li>
99 <p>The distribution includes the library and support utilities,
103 <li><a href="https://invisible-island.net/ncurses/man/captoinfo.1m.html"><span class=
104 "part-name">captoinfo</span></a>, a termcap conversion
107 <li><a href="https://invisible-island.net/ncurses/man/clear.1.html"><span class=
108 "part-name">clear</span></a>, utility for clearing the
111 <li><a href="https://invisible-island.net/ncurses/man/infocmp.1m.html"><span class=
112 "part-name">infocmp</span></a>, the terminfo decompiler</li>
114 <li><a href="https://invisible-island.net/ncurses/man/tabs.1.html"><span class=
115 "part-name">tabs</span></a>, set tabs on a terminal</li>
117 <li><a href="https://invisible-island.net/ncurses/man/tic.1m.html"><span class=
118 "part-name">tic</span></a>, the terminfo compiler</li>
120 <li><a href="https://invisible-island.net/ncurses/man/toe.1m.html"><span class=
121 "part-name">toe</span></a>, list (table of) terminfo
124 <li><a href="https://invisible-island.net/ncurses/man/tput.1.html"><span class=
125 "part-name">tput</span></a>, utility for retrieving terminal
126 capabilities in shell scripts</li>
128 <li><a href="https://invisible-island.net/ncurses/man/tset.1.html"><span class=
129 "part-name">tset</span></a>, to initialize the terminal</li>
132 <p>Full manual pages are provided for the library and tools.</p>
134 <p>The <span class="main-name">ncurses</span> distribution is
135 available at <span class="main-name">ncurses</span>' <a href=
136 "https://invisible-island.net/ncurses/">homepage</a>:</p>
140 "https://invisible-island.net/archives/ncurses/">https://invisible-island.net/archives/ncurses/</a>
143 "https://invisible-mirror.net/archives/ncurses/">https://invisible-mirror.net/archives/ncurses/</a> .</p>
146 <p>It is also available at the GNU distribution site</p>
150 "https://ftp.gnu.org/gnu/ncurses/">https://ftp.gnu.org/gnu/ncurses/</a> .</p>
153 <h2><a name="h2-release-notes" id="h2-release-notes">Release
156 <p>These notes are for <span class="main-name">ncurses</span>
157 6.5, released <strong>April 27, 2024</strong>.</p>
159 <p>This release is designed to be source-compatible with
160 <span class="main-name">ncurses</span> 5.0 through 6.4; providing
161 extensions to the application binary interface (ABI). Although
162 the source can still be configured to support the <span class=
163 "main-name">ncurses</span> 5 ABI, the reason for the release is
164 to reflect improvements to the <span class=
165 "main-name">ncurses</span> 6 ABI and the supporting utility
168 <p>There are, of course, numerous other improvements, listed in
169 this announcement.</p>
171 <p>The most <a href="#h3-bug-fixes">important
172 bug-fixes/improvements</a> dealt with robustness issues. The
173 release notes also mention some other bug-fixes, but are focused
174 on new features and improvements to existing features since
175 <span class="main-name">ncurses</span> 6.4 release.</p>
177 <h3><a name="h3-library" id="h3-library">Library improvements</a></h3>
179 <h4><a name="h4-new-library" id="h4-new-library">New features</a></h4>
181 <p>These are new features:</p>
185 <p>The low-level terminfo and termcap interfaces are used
186 both by the higher-level curses library, as well as by many
189 <p>The functions which convert parameterized terminal
190 capability strings for output to the terminal
191 (<code>tiparm</code> and <code>tparm</code>) analyze the
192 capability string to determine which parameters are strings
193 (i.e., addresses), versus numbers (not addresses).</p>
195 <p>The library's analysis of a capability string may differ
196 from the calling application's design if environment
197 variables are used to point to an invalid terminal database.
198 This is a longstanding problem with <em>all</em>
199 implementations of terminfo, dating from the early 1980s.</p>
201 <p>Two new functions address this problem: by providing a
202 function which allows the calling application to tell ncurses
203 how many string-parameters to expect:</p>
206 <li><code>tiscan_s</code> helps applications check
207 formatting capabilities that would be passed to
208 <code>tiparm_s</code>.</li>
210 <li><code>tiparm_s</code> provides applications a way to
211 tell ncurses what the expected parameters are for a
217 <p>The ncurses library supports a compile-time feature
218 (enabled with the configure <code>--enable-check-size</code>
219 option) which simplifies initialization with terminals which
220 do not negotiate window (screen) size. This is done in
221 <code>setupterm</code>, by providing for using ANSI
222 cursor-position report (in user6/user7 terminfo capabilities)
223 to obtain the screen size if neither environment variables or
226 <p>The ncurses test-program with options
227 “<code>-E -T</code>” demonstrates this
231 <li>add functions to query tty-flags in
232 <code>SCREEN</code></li>
235 <p>This release drops compatibility with obsolete versions of
236 <a href="https://invisible-island.net/ncurses/tack/">tack</a>, e.g., pre-1.08</p>
238 <h4><a name="h4-fixes-library" id="h4-fixes-library">Other
239 improvements</a></h4>
241 <p>These are improvements to existing features:</p>
245 <p>In addition to the new, safer function
246 <code>tiparm_s</code>, ncurses adds checks to make the older
247 <code>tiparm</code>, <code>tparm</code> and
248 <code>tgoto</code> functions safer:</p>
252 <p>the terminfo functions <code>tiparm</code> and
253 <code>tparm</code> ensure that the capability string
254 comes from the terminal description which ncurses loads,
255 rather than from random data which the application
260 <p>the <code>tgoto</code> function disallows capabilities
261 which its analysis shows will attempt to use string
266 <p>ncurses uses internal functions which correspond to
267 <code>tiparm</code>, and <code>tgoto</code> which ensure
268 that the capability strings which are passed to these
269 functions come from the loaded terminal description.</p>
275 <p>improve check in <code>lib_tparm.c</code>, ensuring that a
276 char* fits into a <code>TPARM_ARG</code></p>
280 <p>modify <code>_nc_syserr_abort</code> to use
281 <code>_nc_env_access</code>, rather than only checking root
286 <p>improve thread lock in <code>lib_trace.c</code></p>
290 <p>modify <code>flushinp</code> to use file descriptors in
291 <code>SCREEN</code>, rather than from <code>TERMINAL</code>,
292 and check if they are for a terminal, like SVr4</p>
296 <p>modify <code>mcprint</code> to use file descriptor in
297 <code>SCREEN</code>, for consistency</p>
301 <p>modify internal function <code>_nc_read_file_entry</code>
302 to show relevant filename in warnings</p>
306 <p>improve checks in internal function
307 <code>convert_string</code> for corrupt terminfo entry</p>
311 <p>review/improve handling of out-of-memory conditions</p>
315 <p>limit delays to 30 seconds, i.e., padding delays in
316 terminfo, as well as <code>napms</code> and
317 <code>delay_output</code> functions</p>
321 <p>fix reallocation loop for <code>vsnprintf</code> in
322 <code>_nc_sprintf_string</code> by copying the va_list
327 <p>modify <code>delscreen</code> to limit the windows which
328 it creates to just those associated with the screen</p>
332 <p>modify <code>endwin</code> to return an error if it is
333 called again without an intervening screen update</p>
337 <p>modify <code>wenclose</code> to handle pads</p>
341 <p>eliminate use of <code>PATH_MAX</code> in
342 <code>lib_trace.c</code></p>
346 <p>provide for any <code>CCHARW_MAX</code> greater than 1</p>
350 <p>These are corrections to existing features:</p>
354 <p>correct loop termination condition in
355 <code>waddnstr</code> and <code>waddnwstr</code></p>
359 <p>improve parsing in internal function
360 <code>_nc_msec_cost</code>, allowing a single decimal
365 <p>amend parameter check for entire string versus specific
366 length in <code>winsnstr</code> and <code>wins_nwstr</code>
367 to match Solaris; make similar correction to
368 <code>wins_nwstr</code></p>
372 <p>correct internal function <code>wadd_wch_literal</code>
373 when adding a non-spacing character to a double-width
378 <p>correct definition of <code>Charable</code> macro for
379 non-wide ncurses library .</p>
383 <h3><a name="h3-programs" id="h3-programs">Program
384 improvements</a></h3>
386 <p id="h4-utilities">Several improvements were made to the
387 utility programs. Some were done to make the <code>infocmp</code>
388 option “<tt>-u</tt>” option help refactor the
389 terminal database.</p>
392 <dt><span class="part-name"><a href=
393 "https://invisible-island.net/ncurses/man/infocmp.1m.html">infocmp</a></span>
399 <p>add limit checks for processing extended capabilities
400 with the “<code>-u</code>” option</p>
404 <p>correct initial alignment of extended capabilities, so
405 that the “<code>-u</code>” option can be used
406 for more than two terminal types</p>
410 <p>modify “<code>-u</code>” option to not
411 report cancels for strings which were already cancelled
412 in a use'd chunk.</p>
416 <p>correct an assignment “<code>-u</code>”
417 for detecting if a boolean is unset in a base entry and
418 set in a use'd chunk, i.e., if it was cancelled.</p>
423 <dt><span class="part-name"><a href=
424 "https://invisible-island.net/ncurses/man/tic.1m.html">tic</a></span>
430 <p>correct limit-check when dumping tc/use clause via
431 “<code>-I</code>”</p>
435 <p>check return value of <code>_nc_save_str</code>, in
436 special case where extended capabilities are processed
437 but the terminal description was not initialized</p>
441 <p>modify check for multiply defined aliases to report
442 problems within the current runtime rather than for
443 conflicts with pre-existing terminal descriptions.</p>
447 <p>disallow using <code>$TERMINFO</code> or
448 <code>$HOME/.terminfo</code> when
449 “<code>-o</code>” option is used</p>
454 <dt><span class="part-name"><a href=
455 "https://invisible-island.net/ncurses/man/tput.1.html">tput</a></span> and <span class=
457 "https://invisible-island.net/ncurses/man/tset.1.html">tset</a></span></dt>
462 <p>add “<code>-v</code>” option to tput, to
467 <p>modify <em>reset</em> command to avoid altering clocal
468 if the terminal uses a modem</p>
472 <p>modify <em>reset</em> feature to avoid 1-second sleep
473 if running in a pseudo-terminal</p>
479 <h4><a name="h4-examples" id="h4-examples">Examples</a></h4>
481 <p>Along with the library and utilities, improvements were made
483 "https://invisible-island.net/ncurses/ncurses-examples.html">ncurses-examples</a>:</p>
487 <p>modify <code>test_tparm</code> to account for extended
492 <p>corrected mouse mask in <code>test/testcurs.c</code></p>
496 <p>modify <code>test/clip_printw.c</code> to optionally test
497 non-wrapped updates</p>
501 <p>modify <code>test/test_mouse.c</code> to use curses api
506 <p>modify <code>test/clip_printw.c</code> to optionally test
507 non-wrapped updates</p>
511 <p>There is one new demo/test programs:</p>
514 <dt><span class="part-name"><em>test/test_endwin.c</em></span>
518 <p>This program shows the return-status from
519 <code>endwin</code> with different combinations of
520 <code>endwin</code> (repeated), <code>initscr</code>,
521 <code>newterm</code>.</p>
525 <h3><a name="h3-database" id="h3-database">Terminal database</a></h3>
527 <p>There are several new terminal descriptions:</p>
532 "https://invisible-island.net/ncurses/terminfo.src.html#tic-ansi_apparrows"><tt>ansi+apparrows</tt></a></p>
537 "https://invisible-island.net/ncurses/terminfo.src.html#tic-contour"><tt>contour</tt></a></p>
542 "https://invisible-island.net/ncurses/terminfo.src.html#tic-linux_kbs"><tt>linux+kbs</tt></a>
543 for terminals which imitate xterm's behavior with Linux</p>
548 "https://invisible-island.net/ncurses/terminfo.src.html#tic-rio"><tt>rio</tt></a>,
550 "https://invisible-island.net/ncurses/terminfo.src.html#tic-rio-direct"><tt>rio-direct</tt></a></p>
555 "https://invisible-island.net/ncurses/terminfo.src.html#tic-mostlike"><tt>mostlike</tt></a></p>
560 "https://invisible-island.net/ncurses/terminfo.src.html#tic-ms-vt100-16color"><tt>ms-vt100-16color</tt></a>,
562 "https://invisible-island.net/ncurses/terminfo.src.html#tic-winconsole"><tt>winconsole</tt></a></p>
567 "https://invisible-island.net/ncurses/terminfo.src.html#tic-vt100_noapp"><tt>vt100+noapp</tt></a>,
569 "https://invisible-island.net/ncurses/terminfo.src.html#tic-vt100_noapp_pc"><tt>vt100+noapp+pc</tt></a>,
571 "https://invisible-island.net/ncurses/terminfo.src.html#tic-xterm_app_pc"><tt>xterm+app+pc</tt></a>,
573 "https://invisible-island.net/ncurses/terminfo.src.html#tic-xterm_decedit"><tt>xterm+decedit</tt></a>
574 from <a href="https://invisible-island.net/xterm/xterm.log.html#xterm_389">xterm
580 "https://invisible-island.net/ncurses/terminfo.src.html#tic-putty_cursor"><tt>putty+cursor</tt></a>
581 to reflect amending of modified cursor-keys in 2021</p>
586 "https://invisible-island.net/ncurses/terminfo.src.html#tic-wezterm"><tt>wezterm</tt></a></p>
590 <p>There are many changes to existing terminal descriptions. Some
591 were updates to several descriptions, using the
592 <code>infocmp</code> “<code>-u</code>” option in a
593 script to determine which <em>building-block</em> entries could
594 be used to replace multiple capability settings (and trim
595 redundant information).</p>
597 <p>Other changes include:</p>
602 "https://invisible-island.net/ncurses/terminfo.src.html#toc-_X_T_E_R_M__Extensions_">document</a>
603 XF, kxIN and kxOUT</p>
607 <p>add note on <a href=
608 "https://invisible-island.net/ncurses/terminfo.src.html#tic-sun"><tt>sun</tt></a>
609 regarding wscons/cmdtool/shelltool</p>
613 <p>remove DECCOLM+DECSCLM from <a href=
614 "https://invisible-island.net/ncurses/terminfo.src.html#tic-foot"><tt>foot</tt></a></p>
618 <p>add xterm+focus to <a href=
619 "https://invisible-island.net/ncurses/terminfo.src.html#tic-foot_base"><tt>foot+base</tt></a></p>
623 <p>add ecma+strikeout to <a href=
624 "https://invisible-island.net/ncurses/terminfo.src.html#tic-putty"><tt>putty</tt></a></p>
628 <p>use CSI 3J in <a href=
629 "https://invisible-island.net/ncurses/terminfo.src.html#tic-vte-2017"><tt>vte-2017</tt></a></p>
633 <p>use oldxterm+sm+1006 in <a href=
634 "https://invisible-island.net/ncurses/terminfo.src.html#tic-vte-2014"><tt>vte-2014</tt></a></p>
639 "https://invisible-island.net/ncurses/terminfo.src.html#tic-xgterm"><tt>xgterm</tt></a>
640 to work around line-drawing bug</p>
644 <p>add xterm focus mode 1004 to <a href=
645 "https://invisible-island.net/ncurses/terminfo.src.html#tic-xterm_focus"><tt>xterm+focus</tt></a>
646 as fe/fd capabilities, like vim.</p>
650 <p>add xterm+focus to <a href=
651 "https://invisible-island.net/ncurses/terminfo.src.html#tic-alacritty_common"><tt>alacritty+common</tt></a></p>
655 <p>add XR/xr, to work with vim, and use RV/rv to denote DA2
660 <p>add XF flag to <a href=
661 "https://invisible-island.net/ncurses/terminfo.src.html#tic-xterm_focus"><tt>xterm+focus</tt></a>
662 so that termcap applications can be aware of terminals which
663 may support focus in/out</p>
667 <p>use xterm+focus in <a href=
668 "https://invisible-island.net/ncurses/terminfo.src.html#tic-xterm-p370"><tt>xterm-p370</tt></a>
670 "https://invisible-island.net/ncurses/terminfo.src.html#tic-tmux"><tt>tmux</tt></a></p>
674 <p>remove xterm+sm+1006 from <a href=
675 "https://invisible-island.net/ncurses/terminfo.src.html#tic-tmux"><tt>tmux</tt></a></p>
679 <p>NetBSD-related fixes for <a href=
680 "https://invisible-island.net/ncurses/terminfo.src.html#tic-x68k"><tt>x68k</tt></a> and
682 "https://invisible-island.net/ncurses/terminfo.src.html#tic-wsvt25"><tt>wsvt25</tt></a></p>
686 <h3><a name="h3-documentation" id=
687 "h3-documentation">Documentation</a></h3>
689 <p>As usual, this release</p>
693 <p>improves documentation by describing new features,</p>
697 <p>attempts to improve the description of features which
698 users have found confusing</p>
702 <p>fills in overlooked descriptions of features which were
703 described in the <a href="https://invisible-island.net/ncurses/NEWS.html">NEWS</a> file
704 but treated sketchily in manual pages.</p>
708 <p>In addition to providing background information to explain
709 these features and show how they evolved, there are corrections,
710 clarifications, etc.:</p>
718 <p>add assignment in <code>CF_MAN_PAGES</code> to fill in
719 value for <code>TERMINFO_DIRS</code> in ncurses, terminfo
720 and tic manpages.</p>
724 <p>clarify interaction of <code>-R</code> option versus
725 <code>-C</code>, <code>-I</code> and <code>-r</code> in
726 <code>infocmp</code> manpage.</p>
730 <p>correct manpage description of panel_hidden.</p>
734 <p>improve manpage description for addch versus unctrl
735 format used for non-printable characters.</p>
739 <p>improve manpages discussing file descriptors in
740 low-level functions.</p>
744 <p>improve description of search rules for terminal
745 descriptions in terminfo manpage.</p>
749 <p>modify dist.mk to avoid passing developer's comments
750 in manpages into the generated html documentation.</p>
754 <p>modify test-package "ncurses6-doc" to use
755 manpage-aliases, which in turn required a change to the
756 configure script to factor in the extra-suffix option
757 when deriving alias names.</p>
763 <p>New/improved history and portability sections:</p>
767 <p>add information about "ttycap", termcap's forerunner,
772 <p>document limitations of tparm, and error-returns in
777 <p>document limitations of tgoto, and error-returns in
784 <p>Other improvements:</p>
788 <p>This release has many changes to improve the
789 formatting and style of the manpages.</p>
793 <p>Manpages now use consistent section-naming, page
794 headers and footers (including the modification date for
799 <p>Table layout has been revised.</p>
805 <p>There are no new manual pages (all of the manual page updates
806 are to existing pages).</p>
808 <h3><a name="h3-bug-fixes" id="h3-bug-fixes">Interesting
811 <p>The changes to <tt>tparm</tt>, <tt>tgoto</tt> which improve
812 the design of the low-level interfaces are <em>interesting</em>,
813 but are not bug-fixes <em>per se</em>.</p>
815 <h3><a name="h3-config-config" id=
816 "h3-config-config">Configuration changes</a></h3>
818 <h4><a name="h4-config-major" id="h4-config-major">Major
821 <p>These are the major changes (aside from introducing <a href=
822 "#h4-new-library"><tt>tiparm_s</tt></a>):</p>
826 <p>use wide-character (ncursesw) by default</p>
830 <p>use opaque typedefs by default</p>
834 <p>However, most of the work on configure scripts was done to
835 reduce warnings within the configure script:</p>
839 <p>intrusive warnings from GNU grep regarding fgrep and
844 <p>fatal errors in compile-checks, arising from recent
845 “Modern C” efforts by some developers which
846 caused longstanding configure checks to fail.</p>
848 <p>After repairing the configure script, none of that
849 activity affected ncurses because stricter warnings are used
850 routinely in development.</p>
854 <p>Other improvements made to configure checks include</p>
859 "https://invisible-island.net/ncurses/INSTALL.html#option:enable-string-hacks">string-hacks</a>
860 in alloc_entry.c, alloc_type.c and hardscroll.c, overlooked
861 due to compiler changes in recent OpenBSD releases</p>
865 <p>revise progs.priv.h to provide for NC_ISATTY reuse</p>
869 <p>configure check for MB_LEN_MAX provides warning as
874 <p>trim a space after some "-R" options, fixing builds for
875 applications built using clang and ncurses on Solaris</p>
879 <p>work around misconfiguration of MacPorts gcc13, which
880 exposes invalid definition of <tt>MB_LEN_MAX</tt> in gcc's
881 fallback copy of <tt>limits.h</tt></p>
885 <p>modified experimental Windows driver works with xterm
890 <h4><a name="h4-config-options" id=
891 "h4-config-options">Configuration options</a></h4>
893 <p>There are a few new configure options:</p>
897 "https://invisible-island.net/ncurses/INSTALL.html#option:disable-setuid-environ"><tt>--disable-setuid-environ</tt></a>
901 <p>Compile with environment restriction, so certain
902 environment variables are not available when running via a
903 setuid/setgid application. These are (for example
904 <tt>$TERMINFO</tt>) those that allow the search path for the
905 terminfo or termcap entry to be customized.</p>
907 <p>A setuid/setgid application inherits its environment
908 variables from the current user, in contrast to sudo which
909 may limit the environment variables that ncurses uses.</p>
913 "https://invisible-island.net/ncurses/INSTALL.html#option:enable-check-size"><tt>--enable-check-size</tt></a>
917 <p>Compile-in feature to detect screensize for terminals
918 which do not advertise their screensize, e.g., serial
923 "https://invisible-island.net/ncurses/INSTALL.html#option:with-abi-altered"><tt>--with-abi-altered=<em>NUM</em></tt></a>
927 <p>Override the displayed (rather than compiled-in) ABI. Only
928 packagers who have created configurations where the ABI
929 differs from ncurses should be interested in this option.</p>
933 "https://invisible-island.net/ncurses/INSTALL.html#option:with-strip-program"><tt>--with-strip-program=<em>XXX</em></tt></a>
937 <p>When stripping executables during install, use the
938 specified program rather than “strip” overriding
939 program chosen by the install program for stripping
944 <p>These configure options are modified:</p>
948 "https://invisible-island.net/ncurses/INSTALL.html#option:with-pkg-config-libdir"><tt>--with-pkg-config-libdir[=<em>DIR</em>]</tt></a>
952 <p>The optional <em>DIR</em> parameter can now be
953 “auto” to automatically use pkg-config's library
956 <p>The default is <tt>$(libdir)</tt>.</p>
960 "https://invisible-island.net/ncurses/INSTALL.html#option:with-xterm-kbs"><tt>--with-xterm-kbs[=<em>XXX</em>]</tt></a>
964 <p>The default is “auto” which tells the
965 configure script to choose BS or DEL according to platform
970 <h3><a name="h3-portability" id="h3-portability">Portability</a></h3>
972 <p>Many of the portability changes are implemented via the
973 configure script:</p>
977 <p>add/use configure check for <code>clock_gettime</code>, to
978 supersede <code>gettimeofday</code>.</p>
982 <p>modify configure script check for pkg-config library
983 directory to take into account an older version 0.15.0 which
984 used PKG_CONFIG_PATH but not PKG_CONFIG_LIBDIR</p>
988 <p>allow for MinGW32-/64-bit configurations to use
993 <p>modify CF_XOPEN_SOURCE macro's amend default case to avoid
994 undefining _XOPEN_SOURCE if _POSIX_C_SOURCE is defined</p>
998 <p>updated configure script macro CF_XOPEN_SOURCE, for
1003 <p>modify version-check for gcc/g++, now works for msys2</p>
1007 <p>build-fixes related to configure-options and/or
1011 <li>fix for <tt>--enable-fvisibility</tt></li>
1013 <li>fix for unusual values of
1014 <tt>--with-rel-version</tt></li>
1016 <li>fix for unusual values of
1017 <tt>--with-abi-version</tt></li>
1019 <li>fix for <tt>--disable-tcap-names</tt></li>
1021 <li>fix for termcap in <tt>nc_access.h</tt></li>
1026 <p>other configure-script improvements:</p>
1029 <li>recent msys2 headers work with
1030 <tt>_DEFAULT_SOURCE</tt>; amend check</li>
1032 <li>use <tt>$ac_includes_default</tt> in most cases where
1033 stdlib.h should work</li>
1035 <li>use <tt>#error</tt> consistently vs "make an
1038 <li>add configure macro for <tt>gettimeofday</tt> vs inline
1044 <p>Here are some of the other portability fixes:</p>
1048 <p>modify configure scripts/makefiles to omit
1049 <tt>KEY_RESIZE</tt> if the corresponding <tt>SIGWINCH</tt>
1050 feature is disabled</p>
1054 <p>increase <tt>MB_CUR_MAX</tt> to 16, matching glibc's
1055 <tt>MB_LEN_MAX</tt></p>
1059 <p>add BSD <tt>erase2</tt> to characters handled by
1064 <p>use <tt>getauxval</tt> when available, to improve
1065 <tt>setuid</tt>/<tt>setgid</tt> checks</p>
1069 <p>set <tt>dwShareMode</tt> in calls to
1070 <tt>CreateConsoleScreenBuffer</tt></p>
1074 <p>use <tt>CreateFile</tt> with "<tt>CONIN$</tt>",
1075 "<tt>CONOUT$</tt>" rather than <tt>GetStdHandle</tt> to
1076 obtain a handle on the actual console, avoiding redirection
1077 in the MinGW/Win32 configurations</p>
1081 <p>modify MinGW driver to return <tt>KEY_BACKSPACE</tt> when
1082 an unmodified <tt>VK_BACK</tt> virtual key is entered</p>
1086 <p>modify MinGW configuration to provide for running in
1087 MSYS/MSYS2 shells, assuming ConPTY support</p>
1093 <h2><a name="h2-features" id="h2-features">Features of
1094 <span class="main-name">ncurses</span></a></h2>
1096 <p>The <span class="main-name">ncurses</span> package is fully
1097 upward-compatible with SVr4 (System V Release 4) curses:</p>
1101 <p>All of the SVr4 calls have been implemented (and are
1106 <p><span class="main-name">ncurses</span> supports the
1107 features of SVr4 curses including keyboard mapping, color,
1108 form drawing with ACS characters, and automatic recognition
1109 of keypad and function keys.</p>
1113 <p><span class="main-name">ncurses</span> provides work-alike
1114 replacements of SVr4 supplemental libraries based on curses,
1115 but which were not specified by X/Open Curses:</p>
1119 <p>the panel library, supporting a stack of windows with
1124 <p>the menu library, supporting a uniform but flexible
1125 interface for menu programming</p>
1129 <p>the form library, supporting data collection through
1136 <p><span class="main-name">ncurses</span>'s terminal database
1137 is fully compatible with that used by SVr4 curses.</p>
1141 <p><span class="main-name">ncurses</span> supports
1142 user-defined capabilities that it can see, but which are
1143 hidden from SVr4 curses applications using the
1144 <em>same</em> terminal database.</p>
1148 <p>It can be optionally configured to match the format
1149 used in related systems such as AIX and Tru64.</p>
1153 <p>Alternatively, <span class="main-name">ncurses</span>
1154 can be configured to use hashed databases rather than the
1155 directory of files used by SVr4 curses.</p>
1161 <p>The <span class="main-name">ncurses</span> utilities have
1162 options to allow you to filter terminfo entries for use with
1163 less capable <em>curses</em>/<em>terminfo</em> versions such
1164 as the HP-UX and AIX ports.</p>
1168 <p>The <span class="main-name">ncurses</span> package also has
1169 many useful extensions over SVr4:</p>
1173 <p>The API is 8-bit clean and base-level conformant with the
1174 X/Open Curses specification, XSI curses (that is, it
1175 implements all <em>BASE</em> level features, and almost all
1176 <em>EXTENDED</em> features). It includes many function calls
1177 not supported under SVr4 curses (but portability of all calls
1178 is documented so you can use the SVr4 subset only).</p>
1182 <p>Unlike SVr3 curses, <span class="main-name">ncurses</span>
1183 can write to the rightmost-bottommost corner of the screen if
1184 your terminal has an insert-character capability.</p>
1188 <p>Ada95 and C++ bindings.</p>
1192 <p>Support for mouse event reporting with X Window xterm and
1193 FreeBSD and OS/2 console windows.</p>
1197 <p>Extended mouse support via Alessandro Rubini's gpm
1202 <p>The function <code>wresize</code> allows you to resize
1203 windows, preserving their data.</p>
1207 <p>The function <code>use_default_colors</code> allows you to
1208 use the terminal's default colors for the default color pair,
1209 achieving the effect of transparent colors.</p>
1213 <p>The functions <code>keyok</code> and
1214 <code>define_key</code> allow you to better control the use
1215 of function keys, e.g., disabling the <span class=
1216 "main-name">ncurses</span> KEY_MOUSE, or by defining more
1217 than one control sequence to map to a given key code.</p>
1221 <p>Support for direct-color terminals, such as modern
1226 <p>Support for 256-color terminals, such as modern xterm.</p>
1230 <p>Support for 16-color terminals, such as <em>aixterm</em>
1231 and <em>modern xterm</em>.</p>
1235 <p>Better cursor-movement optimization. The package now
1236 features a cursor-local-movement computation more efficient
1237 than either BSD's or System V's.</p>
1241 <p>Super hardware scrolling support. The screen-update code
1242 incorporates a novel, simple, and cheap algorithm that
1243 enables it to make optimal use of hardware scrolling,
1244 line-insertion, and line-deletion for screen-line movements.
1245 This algorithm is more powerful than the 4.4BSD curses
1246 <code>quickch</code> routine.</p>
1250 <p>Real support for terminals with the magic-cookie glitch.
1251 The screen-update code will refrain from drawing a highlight
1252 if the magic- cookie unattributed spaces required just before
1253 the beginning and after the end would step on a non-space
1254 character. It will automatically shift highlight boundaries
1255 when doing so would make it possible to draw the highlight
1256 without changing the visual appearance of the screen.</p>
1260 <p>It is possible to generate the library with a list of
1261 pre-loaded fallback entries linked to it so that it can serve
1262 those terminal types even when no terminfo tree or termcap
1263 file is accessible (this may be useful for support of
1264 screen-oriented programs that must run in single-user
1269 <p>The <a href="https://invisible-island.net/ncurses/man/tic.1m.html"><span class=
1270 "part-name">tic</span></a>/<a href=
1271 "https://invisible-island.net/ncurses/man/captoinfo.1m.html">captoinfo</a> utility
1272 provided with <span class="main-name">ncurses</span> has the
1273 ability to translate many termcaps from the XENIX, IBM and
1274 AT&T extension sets.</p>
1278 <p>A BSD-like <a href=
1279 "https://invisible-island.net/ncurses/man/tset.1.html"><span class=
1280 "part-name">tset</span></a> utility is provided.</p>
1284 <p>The <span class="main-name">ncurses</span> library and
1285 utilities will automatically read terminfo entries from
1286 $HOME/.terminfo if it exists, and compile to that directory
1287 if it exists and the user has no write access to the system
1288 directory. This feature makes it easier for users to have
1289 personal terminfo entries without giving up access to the
1290 system terminfo directory.</p>
1294 <p>You may specify a path of directories to search for
1295 compiled descriptions with the environment variable
1296 TERMINFO_DIRS (this generalizes the feature provided by
1297 TERMINFO under stock System V.)</p>
1301 <p>In terminfo source files, use capabilities may refer not
1302 just to other entries in the same source file (as in System
1303 V) but also to compiled entries in either the system terminfo
1304 directory or the user's $HOME/.terminfo directory.</p>
1308 <p>The table-of-entries utility <a href=
1309 "https://invisible-island.net/ncurses/man/toe.1m.html"><span class=
1310 "part-name">toe</span></a> makes it easy for users to see
1311 exactly what terminal types are available on the system.</p>
1315 <p>X/Open Curses permits most functions it specifies to be
1316 made available as macros as well. ncurses does this</p>
1319 <li>to improve performance, e.g., for operations composed
1320 of simpler functions such as cursor movement following by
1321 adding text to the screen,</li>
1323 <li>to simplify the implementation by reusing functions
1324 which use common parameters, e.g., the standard screen
1325 <code>stdscr</code>, and</li>
1327 <li>to provide functions that return values via their
1331 <p>Except for the last case, ncurses provides a non-macro
1332 implementation of the function. If the macro definition is
1333 disabled with <code>#undef</code>, or by defining
1334 <code>NCURSES_NOMACROS</code> the function may be linked (and
1335 its calls will be checked against the prototype).</p>
1339 <p>Extensive documentation is provided (see the <em><a href=
1340 "https://invisible-island.net/ncurses/ncurses.faq.html#additional_reading">Additional
1341 Reading</a></em> section of the <em><a href=
1342 "https://invisible-island.net/ncurses/ncurses.faq.html"><span class=
1343 "main-name">ncurses</span> FAQ</a></em> for online
1348 <h2><a name="h2-who-uses" id="h2-who-uses">Applications using
1349 <span class="main-name">ncurses</span></a></h2>
1351 <p>The <span class="main-name">ncurses</span> distribution
1352 includes a selection of test programs (including a few games).
1353 These are available separately as <a href=
1354 "https://invisible-island.net/ncurses/ncurses-examples.html">ncurses-examples</a></p>
1356 <p>The ncurses library has been tested with a wide variety of
1357 applications including:</p>
1361 <dt><span class="part-name">aptitude</span>
1365 <p>FrontEnd to Apt, the debian package manager</p>
1368 "https://wiki.debian.org/Aptitude">https://wiki.debian.org/Aptitude</a></p>
1371 <dt><span class="part-name">cdk</span>
1375 <p>Curses Development Kit</p>
1377 <p><a href="https://invisible-island.net/cdk/">https://invisible-island.net/cdk/</a><br>
1381 <dt><span class="part-name">ded</span>
1385 <p>directory-editor</p>
1387 <p><a href="https://invisible-island.net/ded/">https://invisible-island.net/ded/</a></p>
1390 <dt><span class="part-name">dialog</span>
1394 <p>the underlying application used in Slackware's setup,
1395 and the basis for similar install/configure applications on
1398 <p><a href="https://invisible-island.net/dialog/">https://invisible-island.net/dialog/</a></p>
1401 <dt><span class="part-name">lynx</span>
1405 <p>the text WWW browser</p>
1408 "https://lynx.invisible-island.net/">https://lynx.invisible-island.net/</a></p>
1411 <dt><span class="part-name">mutt</span>
1417 <p><a href="http://www.mutt.org/">http://www.mutt.org/</a></p>
1420 <dt><span class="part-name">ncftp</span>
1424 <p>file-transfer utility</p>
1427 "https://www.ncftp.com/">https://www.ncftp.com/</a></p>
1430 <dt><span class="part-name">nvi</span>
1434 <p>New vi uses ncurses.</p>
1437 "https://sites.google.com/a/bostic.com/keithbostic/the-berkeley-vi-editor-home-page">
1438 https://sites.google.com/a/bostic.com/keithbostic/the-berkeley-vi-editor-home-page</a><br>
1443 <dt><span class="part-name">ranger</span>
1447 <p>A console file manager with VI key bindings in
1448 <em>Python</em>.</p>
1451 "https://ranger.github.io/">https://ranger.github.io/</a></p>
1454 <dt><span class="part-name">tin</span>
1458 <p>newsreader, supporting color, MIME</p>
1460 <p><a href="http://www.tin.org/">http://www.tin.org/</a></p>
1463 <dt><span class="part-name">vifm</span>
1467 <p>File manager with vi like keybindings</p>
1469 <p><a href="https://vifm.info/">https://vifm.info/</a></p>
1474 <p>as well as some that use <span class=
1475 "main-name">ncurses</span> for the terminfo support alone:</p>
1479 <dt><span class="part-name">minicom</span>
1483 <p>terminal emulator for serial modem connections</p>
1486 "https://salsa.debian.org/minicom-team/minicom">https://salsa.debian.org/minicom-team/minicom</a></p>
1489 <dt><span class="part-name">mosh</span>
1493 <p>a replacement for <code>ssh</code>.</p>
1495 <p><a href="https://mosh.org/">https://mosh.org/</a></p>
1498 <dt><span class="part-name">tack</span>
1502 <p>terminfo action checker</p>
1504 <p><a href="https://invisible-island.net/ncurses/tack.html">https://invisible-island.net/ncurses/tack.html</a></p>
1507 <dt><span class="part-name">tmux</span>
1511 <p>terminal multiplexor</p>
1514 "https://github.com/tmux/tmux/wiki">https://github.com/tmux/tmux/wiki</a></p>
1517 <dt><span class="part-name">vile</span>
1521 <p><em>vi-like-emacs</em> may be built to use the terminfo,
1522 termcap or curses interfaces.</p>
1524 <p><a href="https://invisible-island.net/vile/">https://invisible-island.net/vile/</a></p>
1529 <p>and finally, those which use only the termcap interface:</p>
1533 <dt><span class="part-name">emacs</span>
1540 "https://www.gnu.org/software/emacs/">https://www.gnu.org/software/emacs/</a></p>
1543 <dt><span class="part-name">less</span>
1547 <p>The most commonly used <em>pager</em> (a program that
1548 displays text files).</p>
1551 "http://www.greenwoodsoftware.com/less/">http://www.greenwoodsoftware.com/less/</a></p>
1554 <dt><span class="part-name">screen</span>
1558 <p>terminal multiplexor</p>
1561 "https://www.gnu.org/software/screen/">https://www.gnu.org/software/screen/</a></p>
1564 <dt><span class="part-name">vim</span>
1570 <p><a href="https://www.vim.org/">https://www.vim.org/</a></p>
1575 <h2><a name="h2-development" id="h2-development">Development
1578 <p>Zeyd Ben-Halim started <span class="main-name">ncurses</span>
1579 from a previous package pcurses, written by Pavel Curtis. Eric S.
1580 Raymond continued development. Jürgen Pfeifer wrote most of
1581 the form and menu libraries.</p>
1583 <p>Ongoing development work is done by <a href=
1584 "mailto:dickey@invisible-island.net">Thomas E. Dickey</a>. Thomas
1585 E. Dickey has acted as the maintainer for the Free Software
1586 Foundation, which held a <a href=
1587 "https://invisible-island.net/ncurses/ncurses-license.html">copyright on ncurses</a> for
1588 releases 4.2 through 6.1. Following the release of ncurses 6.1,
1589 effective as of release 6.2, copyright for ncurses reverted to
1590 Thomas E. Dickey (see the <a href=
1591 "https://invisible-island.net/ncurses/ncurses.faq.html#relicensed">ncurses FAQ</a> for
1592 additional information).</p>
1594 <p>Contact the current maintainers at</p>
1597 <a href="mailto:bug-ncurses@gnu.org">bug-ncurses@gnu.org</a>
1600 <p>To join the ncurses mailing list, please write email to</p>
1604 "mailto:bug-ncurses-request@gnu.org">bug-ncurses-request@gnu.org</a>
1606 containing the line:
1608 <p><code>subscribe</code>
1609 <em><name>@<host.domain></em></p>
1612 <p>This list is open to anyone interested in helping with the
1613 development and testing of this package.</p>
1615 <p>Beta versions of <span class="main-name">ncurses</span> are
1616 made available at</p>
1620 "https://invisible-island.net/archives/ncurses/current/">https://invisible-island.net/archives/ncurses/current/</a>
1623 "https://invisible-mirror.net/archives/ncurses/current/">https://invisible-mirror.net/archives/ncurses/current/</a> .</p>
1626 <p>Patches to the current release are made available at</p>
1630 "https://invisible-island.net/archives/ncurses/6.4/">https://invisible-island.net/archives/ncurses/6.4/</a>
1633 "https://invisible-mirror.net/archives/ncurses/6.4/">https://invisible-mirror.net/archives/ncurses/6.4/</a> .</p>
1636 <p>There is an archive of the mailing list here:</p>
1640 "https://lists.gnu.org/archive/html/bug-ncurses">https://lists.gnu.org/archive/html/bug-ncurses</a> .</p>
1643 <h2><a name="h2-this-stuff" id="h2-this-stuff">Related
1646 <p>The release notes make scattered references to these pages,
1647 which may be interesting by themselves:</p>
1650 <li><a href="https://invisible-island.net/ncurses/ncurses-license.html"><span class=
1651 "main-name">ncurses</span> licensing</a></li>
1653 <li><a href="https://invisible-island.net/ncurses/ncurses-mapsyms.html">Symbol versioning
1654 in <span class="main-name">ncurses</span></a></li>
1656 <li><a href="https://invisible-island.net/ncurses/ncurses-slang.html">Comments on
1657 <span class="main-name">ncurses</span> versus <span class=
1658 "main-name">slang</span> (S-Lang)</a></li>
1660 <li><a href="https://invisible-island.net/ncurses/ncurses-openbsd.html">Comments on
1661 <span class="main-name">OpenBSD</span></a></li>
1663 <li><a href="https://invisible-island.net/ncurses/tack.html">tack – terminfo action
1666 <li><a href="https://invisible-island.net/ncurses/tctest.html">tctest – termcap
1667 library checker</a></li>
1670 "https://invisible-island.net/ncurses/ncurses.html#download_database">Terminal
1674 <h2><a name="h2-other-stuff" id="h2-other-stuff">Other
1677 <p>The distribution provides a newer version of the
1678 terminfo-format terminal description file once maintained by
1679 <a href="http://www.catb.org/~esr/terminfo/">Eric
1680 Raymond</a> . Unlike the older version, the termcap and
1681 terminfo data are provided in the same file, which also provides
1682 several user-definable extensions beyond the X/Open Curses
1685 <p>You can find lots of information on terminal-related topics
1686 not covered in the terminfo file in <a href=
1687 "https://shuford.invisible-island.net/">Richard Shuford's
1688 archive</a> (<a href=
1689 "http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal">original</a>).
1690 The collection of computer manuals at <a href=
1691 "http://www.bitsavers.org/pdf/">bitsavers.org</a> has also been
1696 <li><a href="#h2-overview">Overview</a></li>
1699 <a href="#h2-release-notes">Release Notes</a>
1702 <a href="#h3-library">Library improvements</a>
1704 <li><a href="#h4-new-library">New features</a></li>
1706 <li><a href="#h4-fixes-library">Other
1707 improvements</a></li>
1712 <a href="#h3-programs">Program improvements</a>
1714 <li><a href="#h4-utilities">Utilities</a></li>
1716 <li><a href="#h4-examples">Examples</a></li>
1720 <li><a href="#h3-database">Terminal database</a></li>
1722 <li><a href="#h3-documentation">Documentation</a></li>
1724 <li><a href="#h3-bug-fixes">Interesting bug-fixes</a></li>
1727 <a href="#h3-config-config">Configuration changes</a>
1729 <li><a href="#h4-config-major">Major changes</a></li>
1731 <li><a href="#h4-config-options">Configuration
1736 <li><a href="#h3-portability">Portability</a></li>
1740 <li><a href="#h2-features">Features of <span class=
1741 "main-name">ncurses</span></a></li>
1743 <li><a href="#h2-who-uses">Applications using <span class=
1744 "main-name">ncurses</span></a></li>
1746 <li><a href="#h2-development">Development activities</a></li>
1748 <li><a href="#h2-this-stuff">Related resources</a></li>
1750 <li><a href="#h2-other-stuff">Other resources</a></li>