+ <p>The new release has several improvements for performance and
+ building. For instance:</p>
+
+ <ul>
+ <li>
+ <p>several files in ncurses- and progs-directories were
+ modified to allow <code>const</code> data used in internal
+ tables to be put by the linker into the readonly text
+ segment.</p>
+ </li>
+
+ <li>
+ <p>various improvements were made to building the Ada95
+ binding, both in simplifying the generated files as well as
+ improving the way it uses <code>gnatmake</code></p>
+ </li>
+ </ul>
+
+ <p>There are also new features in the libraries:</p>
+
+ <ul>
+ <li>added <a href=
+ "http://invisible-island.net/ncurses/man/curs_util.3x.html#h3-use_tioctl">
+ use_tioctl</a> function</li>
+
+ <li>
+ <p>added <a href=
+ "http://invisible-island.net/ncurses/man/curs_opaque.3x.html">
+ wgetdelay</a> to retrieve _delay member of WINDOW if it
+ happens to be opaque, e.g., in the pthread configuration.</p>
+ </li>
+
+ <li>
+ <p>added <a href=
+ "http://invisible-island.net/ncurses/man/curs_attr.3x.html#h2-PORTABILITY">
+ A_ITALIC</a> extension.</p>
+ </li>
+
+ <li>
+ <p>added form library extension <a href=
+ "http://invisible-island.net/ncurses/man/form_field_opts.3x.html">
+ O_DYNAMIC_JUSTIFY</a> option which can be used to override
+ the different treatment of justification for static versus
+ dynamic fields .</p>
+ </li>
+
+ <li>
+ <p>rewrote <a href=
+ "http://invisible-island.net/ncurses/man/curs_util.3x.html#h3-putwin_getwin">
+ putwin</a> and <a href=
+ "http://invisible-island.net/ncurses/man/curs_util.3x.html#h3-putwin_getwin">
+ getwin</a>, making an extended version which is capable of
+ reading screen-dumps between the wide/normal <em class=
+ "small-caps">ncurses</em> configurations. These are text
+ files, except for a <em>magic</em> code at the beginning:</p>
+
+ <blockquote>
+ <pre class="code-block">
+0 string \210\210 Screen-dump (ncurses)
+</pre>
+ </blockquote>
+ </li>
+
+ <li>
+ <p>several changes to mouse support include:</p>
+
+ <ul>
+ <li>added decoder for xterm SGR 1006 mouse mode.</li>
+
+ <li>added experimental support for
+ “<code>%u</code>” format to terminfo.</li>
+
+ <li>improved behavior of wheel-mice for xterm protocol:
+ noting that there are only button-presses for buttons
+ “4” and “5”, so there is no need to
+ wait to combine events into double-clicks .</li>
+ </ul>
+ </li>
+ </ul>
+
+ <p>There are a few new configure options dealing with library
+ customization:</p>
+
+ <ul>
+ <li>
+ <p>add “<code>--enable-ext-putwin</code>”
+ configure option to turn on the extended putwin/getwin. By
+ default, this is enabled for ABI 6 and disabled with ABI
+ 5.</p>
+ </li>
+
+ <li>
+ <p>add “<code>--enable-string-hacks</code>”
+ option to control whether strlcat and strlcpy may be used.
+ Because <em class="small-caps">ncurses</em> already does the
+ requisite buffer-limit checks, this feature is mainly of
+ interest to quiet compiler-warnings on a few systems.</p>
+ </li>
+
+ <li>
+ <p>add configure option
+ “<code>--with-tparm-arg</code>” to allow <a href=
+ "http://invisible-island.net/ncurses/man/curs_terminfo.3x.html#h3-Formatting-Output">
+ tparm</a>'s parameters to be something more likely to be the
+ same size as a pointer, e.g., <code>intptr_t</code> (again,
+ the default is set for ABI 6).</p>
+ </li>
+ </ul>
+
+ <h3><a name="h3-programs" id="h3-programs">Program
+ improvements</a></h3>
+
+ <h4><a name="h4-utilities" id="h4-utilities">Utilities</a></h4>
+
+ <p>Most of the termcap-related changes based on development of
+ <a href="http://invisible-island.net/ncurses/tctest.html">tctest
+ (termcap library checker)</a> are implemented in the tic and
+ infocmp programs rather than affecting the library. As noted in
+ the <a href=
+ "http://invisible-island.net/ncurses/tctest.html#my-better-translation">
+ discussion</a> of <code>tctest</code>, <em class=
+ "small-caps">ncurses</em>'s ability to translate between terminfo
+ and termcap formats has been improved at different times, but
+ subject to feedback from "real" termcap users. There are very few
+ of those. Nowadays, virtually all <em>termcap</em> users are
+ using <em class="small-caps">ncurses</em> (or NetBSD, with its
+ own terminfo library) and their programs are actually using
+ terminfo rather than termcap data.</p>
+
+ <p>Still, there are a few. A comment about the translation of the
+ ASCII <code>NUL</code> character prompted a review:</p>
+
+ <ul>
+ <li>
+ <p>Both terminfo and termcap store string capabilities as
+ <code>NUL</code>-terminated strings.</p>
+ </li>
+
+ <li>
+ <p>In terminfo, a <code>\0</code> in a terminal description
+ is stored as <code>\200</code>.</p>
+ </li>
+
+ <li>
+ <p>There are no (known) terminals which would behave
+ differently when sent <code>\0</code> or
+ <code>\200</code>.</p>
+ </li>
+
+ <li>
+ <p>When translating to terminfo format (or displaying a
+ printable version of an entry using infocmp), <em class=
+ "small-caps">ncurses</em> shows <code>\200</code> as
+ <code>\0</code>.</p>
+ </li>
+
+ <li>
+ <p>It has done this since 1998 (quoting from the NEWS
+ file):</p>
+
+ <blockquote>
+ <pre class="code-block">
+<a href=
+"http://invisible-island.net/ncurses/NEWS.html#t980103">980103</a>
+...
+ + modify _nc_tic_expand() to generate \0 rather than \200.
+...
+ + correct translation of terminfo "^@", to \200, like \0.
+</pre>
+ </blockquote>
+ </li>
+
+ <li>
+ <p>However, the <code>_nc_tic_expand</code> function (which
+ optionally produces terminfo or termcap format) did not
+ address this special case for termcap. Even the later 4.4BSD
+ <a href=
+ "https://svnweb.freebsd.org/base/head/lib/libc/gen/getcap.c?revision=244092&view=markup#l784">
+ cgetstr</a> interprets a <code>\0</code> literally, ending
+ <em>that</em> string (rather than using the terminfo
+ improvement).</p>
+ </li>
+ </ul>
+
+ <p>As a result of the review, several improvements were made to
+ <em class="small-caps">ncurses</em> translation to/from termcap
+ format — and improving the checks made in tic for
+ consistency of entries. Most of these are not of general
+ interest, except for two new command-line options for tic and
+ infocmp:</p>
+
+ <ul>
+ <li>
+ <p>the “<code>-0</code>” option generates
+ termcap/terminfo source on a single line.</p>
+ </li>
+
+ <li>
+ <p>the “<code>-K</code>” option provides stricter
+ BSD-compatibility for termcap output.</p>
+ </li>
+ </ul>
+
+ <p>Other user-visible improvements and new features include:</p>
+
+ <ul>
+ <li>
+ <p>added “<code>-D</code>” option to tic and
+ infocmp, to show the database locations that it could
+ use.</p>
+ </li>
+
+ <li>
+ <p>added “<code>-s</code>” option to toe, to sort
+ its output.</p>
+ </li>
+
+ <li>
+ <p>extended “<code>-c</code>” and
+ “<code>-n</code>” options of infocmp to allow
+ comparing more than two entries.</p>
+ </li>
+
+ <li>
+ <p>modified toe's report when “<code>-a</code>”
+ and “<code>-s</code>” options are combined, to
+ add a column showing which entries belong to a given
+ database.</p>
+ </li>
+
+ <li>
+ <p>modified the clear program to take into account the
+ “<code>E3</code>” extended capability to clear
+ the terminal's scrollback buffer.</p>
+ </li>
+ </ul>
+
+ <h4><a name="h4-examples" id="h4-examples">Examples</a></h4>
+
+ <p>Along with the library and utilities, many improvements were
+ made to the <a href=
+ "http://invisible-island.net/ncurses/ncurses-examples.html">ncurses-examples</a>.
+ Some were made to allow building (and comparison-testing) against
+ NetBSD curses and PDCurses. Both lack some of the X/Open Curses
+ features, necessitating customization. But this activity was
+ useful because it showed some remaining performance issues (which
+ have been resolved in this release).</p>
+
+ <p>These changes were made to verify compatibility or compare
+ performance of <em class="small-caps">ncurses</em>:</p>
+
+ <ul>
+ <li>
+ <p>made workarounds for compiling test-programs with NetBSD
+ curses, though it lacks some common functions such as
+ <a href="http://invisible-island.net/ncurses/man/curs_util.3x.html#h3-use_env">
+ use_env</a>.</p>
+ </li>
+
+ <li>
+ <p>added dots_termcap test-program</p>
+ </li>
+
+ <li>
+ <p>added dots_curses test-program, for comparison with the
+ low-level examples.</p>
+ </li>
+
+ <li>
+ <p>added test_setupterm test-proram to demonstrate
+ normal/error returns from the setupterm and restartterm
+ functions.</p>
+ </li>
+
+ <li>
+ <p>added “<code>-d</code>”,
+ “<code>-e</code>” and
+ “<code>-q</code>” options to the demo_terminfo
+ and demo_termcap test-programs.</p>
+ </li>
+
+ <li>
+ <p>added “<code>-y</code>” option to demo_termcap
+ and test/demo_terminfo test-programs to demonstrate behavior
+ with/without extended capabilities.</p>
+ </li>
+
+ <li>
+ <p>modified demo_termcap and demo_terminfo test-programs to
+ make their options more directly comparable, and add
+ “<code>-i</code>” option to specify a terminal
+ description filename to parse for names to lookup.</p>
+ </li>
+
+ <li>
+ <p>rewrote the tests for <a href=
+ "http://invisible-island.net/ncurses/man/curs_window.3x.html#h3-derwin">
+ mvderwin</a> and test for recursive <a href=
+ "http://invisible-island.net/ncurses/man/curs_window.3x.html#h3-mvwin">
+ mvwin</a> in the movewindow test-program.</p>
+ </li>
+ </ul>
+
+ <p>These changes were made to help with the MinGW port:</p>
+
+ <ul>
+ <li>
+ <p>added test-screens to the ncurses test-program to show
+ 256-characters at a time, to help with MinGW port.</p>
+ </li>
+
+ <li>
+ <p>modified the view test-program to load UTF-8 when built
+ with MinGW by using regular win32 API because the MinGW
+ functions mblen and mbtowc do not work.</p>
+ </li>
+
+ <li>
+ <p>added “<code>-s</code>” option to the view
+ test-program to allow it to start in single-step mode,
+ reducing size of trace files when it is used for debugging
+ MinGW changes.</p>
+ </li>
+ </ul>
+
+ <p>These changes were made to verify new extensions in <em class=
+ "small-caps">ncurses</em>:</p>
+
+ <ul>
+ <li>
+ <p>added <a href=
+ "http://invisible-island.net/ncurses/man/form_driver.3x.html#h3-form_driver_w">
+ form_driver_w</a> entrypoint to wide-character forms library,
+ as well as form_driver_w test-program.</p>
+ </li>
+
+ <li>
+ <p>modified ncurses test-program's b/B tests to display lines
+ only for the attributes which a given terminal supports, to
+ make room for an italics test.</p>
+ </li>
+
+ <li>
+ <p>modified ncurses test-program, adding
+ “<code>-E</code>” and
+ “<code>-T</code>” options to demonstrate use_env
+ versus use_tioctl.</p>
+ </li>
+
+ <li>
+ <p>modified ncurses test-program's c/C tests to cycle through
+ subsets of the total number of colors, to better illustrate
+ 8/16/88/256-colors by providing directly comparable
+ screens.</p>
+ </li>
+
+ <li>
+ <p>modified the ncurses test-program to also show position
+ reports in 'a' test.</p>
+ </li>
+ </ul>
+
+ <p>These changes were made to make the examples more useful:</p>
+
+ <ul>
+ <li>
+ <p>added scripts for building dpkg and rpm test-packages</p>
+ </li>
+
+ <li>
+ <p>modified the hanoi test-program to show the minimum number
+ of moves possible for the given number of tiles.</p>
+ </li>
+
+ <li>
+ <p>modified the knight test-program to show the number of
+ choices possible for each position in automove option, e.g.,
+ to allow user to follow Warnsdorff's rule to solve the
+ puzzle.</p>
+ </li>
+ </ul>
+
+ <h3><a name="h3-database" id="h3-database">Terminal
+ database</a></h3>
+
+ <p>This release provides improvements to tic's
+ “<code>-c</code>” checking option, which was used for
+ example to</p>
+
+ <ul>
+ <li>
+ <p>make <code>sgr</code> in several entries agree with other
+ caps.</p>
+ </li>
+
+ <li>
+ <p>correct padding in some entries where earlier versions had
+ miscounted the number of octal digits.</p>
+ </li>
+ </ul>
+
+ <p>There are several new terminal descriptions:</p>
+
+ <ul>
+ <li><a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#toc-_M_L_T_E_R_M">
+ mlterm</a> is now aliased to mlterm3</li>
+
+ <li><a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#tic-nsterm">
+ nsterm</a> is now derived from nsterm-256color</li>
+
+ <li><a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#tic-putty-sco">
+ putty-sco</a></li>
+
+ <li><a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#tic-teken">
+ teken</a> is FreeBSD's "xterm" console.</li>
+
+ <li><a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#toc-_T_E_R_M_I_N_A_T_O_R">
+ terminator</a></li>
+
+ <li><a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#toc-_T_E_R_M_I_N_O_L_O_G_Y">
+ terminology</a></li>
+
+ <li><a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#tic-tmux">
+ tmux</a> is derived from screen.</li>
+
+ <li>several screen.XXX entries support the respective
+ variations for 256 colors.</li>
+
+ <li><a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#toc-_S_I_M_P_L_E_T_E_R_M">
+ simpleterm</a> is now 0.5</li>
+
+ <li><a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#tic-vte">
+ vte</a> is aliased to vte-2012</li>
+
+ <li><a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#tic-vt520ansi">
+ vt520ansi</a></li>
+ </ul>
+
+ <p>A few entries use extensions (user-defined terminal
+ capabilities):</p>
+
+ <ul>
+ <li>
+ <p><code>E3</code>, used in linux, putty and xterm-basic is
+ tested in the <a href=
+ "http://aerie.jexium-island.net/ncurses/man/clear.1.html">clear</a>
+ program to erase a terminal's scrollback.</p>
+ </li>
+
+ <li>
+ <p><code>TS</code> is used in the <a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#tic-xterm_sl">
+ xterm+sl</a> building block to help deprecate the misuse of
+ <code>tsl</code> for xterm's title-string.</p>
+ </li>
+
+ <li>
+ <p><code>XT</code> is used in some terminfo entries to
+ improve usefulness for other applications than screen, which
+ would like to pretend that xterm's title is a
+ status-line.</p>
+ </li>
+
+ <li>
+ <p><code>xm</code> is used in examples <a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#tic-xterm-1005">
+ xterm-1005</a> and <a href=
+ "http://invisible-island.net/ncurses/terminfo.src.html#tic-xterm-1006">
+ xterm-1006</a> to illustrate a way to make mouse handling
+ more general</p>
+ </li>
+ </ul>
+
+ <p>A few terminals support italics and/or dim capabilities. In
+ particular, screen does not. Documented that, and accommodated
+ the terminals where this feature works with the
+ <code>A_ITALIC</code> extension.</p>
+
+ <ul>
+ <li>konsole, mlterm3 (italics)</li>
+
+ <li>nsterm (dim)</li>
+
+ <li>screen (dim)</li>
+
+ <li>vte (dim, italics)</li>
+
+ <li>xterm (dim, italics)</li>
+ </ul>
+
+ <h3><a name="h3-documentation" id=
+ "h3-documentation">Documentation</a></h3>
+
+ <p>As usual, this release</p>
+
+ <ul>
+ <li>
+ <p>improves documentation by describing new features,</p>
+ </li>
+
+ <li>
+ <p>attempts to improve the description of features which
+ users have found confusing</p>
+ </li>
+
+ <li>
+ <p>fills in overlooked descriptions of features which were
+ described in the <a href=
+ "http://invisible-island.net/ncurses/NEWS.html">NEWS</a> file
+ but treated sketchily in manual pages.</p>
+ </li>
+ </ul>
+
+ <p>In addition, the mechanism for producing HTML versions of the
+ documentation has been improved:</p>
+
+ <ul>
+ <li>
+ <p>use an improved version of <a href=
+ "http://invisible-island.net/scripts/man2html.html">man2html</a>
+ to generate html manpages.</p>
+ </li>
+
+ <li>
+ <p>regenerated <a href=
+ "http://invisible-island.net/ncurses/NCURSES-Programming-HOWTO.html">
+ NCURSES-Programming-HOWTO.html</a> to fix some of the broken
+ html emitted by docbook.</p>
+ </li>
+ </ul>
+
+ <h3><a name="h3-bug-fixes" id="h3-bug-fixes">Interesting
+ bug-fixes</a></h3>
+
+ <ul>
+ <li>
+ <p>Ada95 binding:</p>
+
+ <ul>
+ <li>
+ <p>modify makefile rules to ensure that the PIC option is
+ not used when building a static library</p>
+ </li>
+
+ <li>
+ <p>make Ada95 build-fix for big-endian architectures such
+ as sparc. This undoes one of the fixes from <a href=
+ "http://invisible-island.net/ncurses/NEWS.html#t20110319">
+ 20110319</a>, which added an
+ “<code>Unused</code>” member to
+ representation clauses, replacing that with pragmas to
+ suppress warnings about unused bits.</p>
+ </li>
+ </ul>
+ </li>
+
+ <li>
+ <p>Color and attributes:</p>
+
+ <ul>
+ <li>
+ <p>parenthesize parameter of <code>COLOR_PAIR</code> and
+ <code>PAIR_NUMBER</code> in curses.h in case it happens
+ to be a comma-expression.</p>
+ </li>
+
+ <li>
+ <p>improve <a href=
+ "http://invisible-island.net/ncurses/NEWS.html#t20021221">
+ 20021221</a> workaround for broken acs, handling a case
+ where that ACS_<em>xxx</em> character is not in the
+ <code>acsc</code> string but there is a known
+ wide-character which can be used.</p>
+ </li>
+
+ <li>
+ <p>modify <a href=
+ "http://invisible-island.net/ncurses/man/curs_color.3x.html#h3-Routine-Descriptions">
+ init_pair</a> to accept -1's for color value after
+ <a href=
+ "http://invisible-island.net/ncurses/man/default_colors.3x.html">
+ assume_default_colors</a> has been called.</p>
+ </li>
+
+ <li>
+ <p>add a check in <a href=
+ "http://invisible-island.net/ncurses/man/curs_color.3x.html#h3-Routine-Descriptions">
+ start_color</a> to limit color-pairs to 256 when extended
+ colors are not supported.</p>
+ </li>
+ </ul>
+ </li>
+
+ <li>
+ <p>Resizing the screen:</p>
+
+ <ul>
+ <li>
+ <p>propagate error-returns from wresize, i.e., the
+ internal increase_size and decrease_size functions
+ through <a href=
+ "http://invisible-island.net/ncurses/man/resizeterm.3x.html">
+ resize_term</a>.</p>
+ </li>
+
+ <li>
+ <p>add check for zero/negative dimensions for
+ <code>resizeterm</code> and <code>resize_term</code>.</p>
+ </li>
+
+ <li>
+ <p>modify <code>resizeterm</code> to always push a
+ <code>KEY_RESIZE</code> onto the fifo, even if screensize
+ is unchanged. Modify library to push a
+ <code>KEY_RESIZE</code> if there was a SIGWINCH, even if
+ it does not call <code>resizeterm</code>). These changes
+ eliminate the case where a SIGWINCH is received, but ERR
+ is returned from <code>wgetch</code> or
+ <code>wgetnstr</code> because the screen dimensions did
+ not change.</p>
+ </li>
+ </ul>
+ </li>
+
+ <li>
+ <p>Low-level interfaces</p>
+
+ <ul>
+ <li>
+ <p>fix an old bug in the termcap emulation;
+ “<code>%i</code>” was ignored in
+ <code>tparm</code> because the parameters to be
+ incremented were already on the internal stack.</p>
+ </li>
+
+ <li>
+ <p>change “<code>%l</code>” behavior in tparm
+ to push the string length onto the stack rather than
+ saving the formatted length into the output buffer.</p>
+ </li>
+
+ <li>
+ <p>modify name-comparison for tgetstr, etc., to
+ accommodate legacy applications as well as to improve
+ compatbility with BSD 4.2 termcap implementations (see
+ note for <a href=
+ "http://invisible-island.net/ncurses/NEWS.html#t980725">980725</a>).</p>
+ </li>
+ </ul>
+ </li>
+
+ <li>High-level interfaces
+
+ <ul>
+ <li>
+ <p>modify internal recursion in <code>wgetch</code> which
+ handles cooked mode to check if the call to
+ <code>wgetnstr</code> returned an error. This can happen
+ when both <code>nocbreak</code> and <code>nodelay</code>
+ are set, for instance (see note for <a href=
+ "http://invisible-island.net/ncurses/NEWS.html#t960418">960418</a>).</p>
+ </li>
+
+ <li>
+ <p>add a check in internal function
+ <code>waddch_nosync</code> to ensure that tab characters
+ are treated as control characters; some broken locales
+ claim they are printable.</p>
+ </li>
+
+ <li>
+ <p>modify menu library to ensure that a menu's top-row is
+ adjusted as needed to ensure that the current item is on
+ the screen</p>
+ </li>
+
+ <li>
+ <p>fix special case where double-width character
+ overwrites a single- width character in the first
+ column.</p>
+ </li>
+ </ul>
+ </li>
+ </ul>
+
+ <h3><a name="h3-config-config" id=
+ "h3-config-config">Configuration changes</a></h3>
+
+ <h4><a name="h4-config-major" id="h4-config-major">Major
+ changes</a></h4>
+
+ <p>The <em class="small-caps">ncurses</em> 6.0 configure script
+ makes changes to the <em>default</em> value of several configure
+ options, depending on the <code>--with-abi-version</code> option
+ (i.e., whether its value is “5” or
+ “6”):</p>