# Announcing ncurses 6.6

## Overview

The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0 (SVr4), and more. It uses terminfo format, supports pads and color and multiple highlights and forms characters and function-key mapping, and has all the other SVr4-curses enhancements over BSD curses. SVr4 curses became the basis of X/Open Curses.

In mid-June 1995, the maintainer of 4.4BSD curses declared that he considered 4.4BSD curses obsolete, and encouraged the keepers of unix releases such as BSD/OS, FreeBSD and NetBSD to switch over to ncurses.

Since 1995, ncurses has been ported to many systems:

- It is used in almost every system based on the Linux kernel (aside from some embedded applications).
- It is used as the system curses library on OpenBSD, FreeBSD and MacOS.
- It is used in environments such as Cygwin and MinGW. The first of these was EMX on OS/2 Warp.
- It is used (though usually not as the system curses) on all of the vendor unix systems, e.g., AIX, HP-UX, IRIX64, SCO, Solaris, Tru64.
- It should work readily on any ANSI/POSIX-conforming unix.

The distribution includes the library and support utilities, including

- captoinfo, a termcap conversion tool
- clear, utility for clearing the screen
- infocmp, the terminfo decompiler
- tabs, set tabs on a terminal
- tic, the terminfo compiler
- toe, list (table of) terminfo entries
- tput, utility for retrieving terminal capabilities in shell scripts
- tset, to initialize the terminal

Full manual pages are provided for the library and tools.

The ncurses distribution is available at ncurses' homepage:

> https://invisible-island.net/archives/ncurses/ or
> https://invisible-mirror.net/archives/ncurses/ .

It is also available at the GNU distribution site

> https://ftp.gnu.org/gnu/ncurses/ .

## Release Notes

These notes are for ncurses 6.6, released December 30, 2025.

This release is designed to be source-compatible with ncurses 5.0 through 6.5; providing extensions to the application binary interface (ABI). Although the source can still be configured to support the ncurses 5 ABI, the reason for the release is to reflect improvements to the ncurses 6 ABI and the supporting utility programs.

There are numerous other improvements listed in this announcement.

The most important bug-fixes/improvements dealt with robustness issues. The release notes also mention some other bug-fixes, but are focused on new features and improvements to existing features since ncurses 6.5 release.

### Library improvements

#### Terminal driver improvements

This release focuses on improvements to the MinGW/Windows terminal driver. The terminal driver for MinGW32 was introduced in 2009. A new version of the terminal driver to support Windows Terminal was begun in 2020. However, there were some differences:

- Both drivers use Console API; the later Windows driver also provides for using character escape sequences.

- The MinGW32 driver was designed to imitate POSIX terminal I/O data types to simplify integration with the existing sources.

  The newer Windows driver did not integrate with the sources in the same way. In particular, the reset utility was incomplete.

- Windows Terminal support for Console API is incomplete, lacking mouse support. Additionally, its developers took a few years to resolve issues with carriage-return versus line-feed translation.

  Reflecting on these problems, both MinGW and Windows drivers are still provided in ncurses through the current release.

- The two drivers are similar, but in developing the Windows driver some renaming and refactoring was done. That resulted in duplicate source files. This release eliminates the duplication.

These improvements have been made to the terminal driver:

- made `win_driver.c` obsolete in favor of `win32_driver.c`

- made `win32_curses.h` obsolete in favor of `nc_win32.h`

- added configure check for Win32 named pipes feature, using that to make `nc_mingw.h` obsolete in favor of `nc_win32.h`

- separated the `_NC_WINDOWS` platform macro into `_NC_WINDOWS_NATIVE`, for MinGW and other native Win32 support, and `_NC_WINDOWS`, to make some Win32 features available under the Cygwin runtime, in this case the term-driver.

- modified MinGW32 configuration to account for its use of Windows-style pathnames in filesystem checks.

- changed `MS_TERMINAL` symbol to `DEFAULT_TERM_VAR`

- updated `ncurses/wcwidth.c`, for MinGW ports, from xterm.

- made fixes for reading Unicode characters in MinGW/Windows port

- improved Windows driver by restoring the scroll buffer and console mode, e.g., when `reset_prog_mode` or `endwin` is called

- simplified include for `wchar.h` in Windows port by removing the platform ifdef's

- modified driver for MinGW to handle shift-tab and control-tab as back-tab

- made fixes for port using clang-cl or cl MSVC

#### Other improvements

These are improvements to existing features:

- add comments to generated `term.h` to hint the configure options used

- change scope of `TTY`, `GET_TTY` and `SET_TTY` to ncurses-internals

- improved mouse driver

  - modify `handle_wheel` case 2 to ignore the event as in case 1 for mouse version 1, since that corresponds to a button 6 or 7 event which is not supported with ABI 6.

  - use separate read/write pointers in the mouse event queue to work with too-close events for the click-detection to work reliably, and further improve that in case `mouseinterval(0)` is used to suppress click-detection.

- modify treatment of “n” parameter for `waddnstr`, `waddnwstr`, and `wins_nwstr` to return OK when “n” is zero, for consistency with other implementations

- modify `wattron`/`wattroff` calls in `form/m_post.c` to call `wattr_on` and `wattr_off` to omit cast used in the former for X/Open compatibility

- change `winwstr` to a generated function, using the macro definition, moving its handling of negative length parameter into `winnwstr`.

- change `winwstr` to return wide character count instead of OK.

- disallow directories and block/character devices in safe-open.

- amend `scr_restore` and `scr_init` to remove the target window only after validating the source window which will replace the target

- modify `_nc_flush` to also flush stderr to help the flash capability to work in `bash`

- trim padding from sgr expression used in `trim_sgr0`, to avoid copying the padding into the resulting sgr0

- modify `misc/Makefile.in` and `misc/run_tic.in` so that `$DESTDIR` is set and used only in the makefile.

- modify `MKfallback.sh` to eliminate `TERMINFO` environment variable.

- add `-x` option to `infocmp` in `MKfallback.sh`

- limit value from `ESCDELAY` environment variable to 30 seconds, like other delay limits.

- limit values from `LINES` and `COLUMNS` environment variables to 512

- added check in `wresize` for out-of-range dimensions

- improved error-handling in c++ binding

- improved error-reporting in `write_entry.c`

- amended limit used in `alloc_pair`, by applying an adjustment for default colors only when the maximum number of color pairs is greater than the maximum number of colors

- added limit-checks in `alloc_entry.c` and `alloc_ttype.c` to avoid indexing errors when using `infocmp` to compare all capabilities when processing a malformed terminfo binary which has a valid header

- added a null pointer check in mouse-initialization, for the Windows driver

- added some null-pointer checks after `malloc`s in test-programs.

These are corrections to existing features:

- removed test in `wgetch` which applied `notimeout` to the initial read of a character

- added check for special case of `wcrtomb` converting a single byte code to a different single byte code, which glibc does for code 160 in the KOI8-R encoding

- corrected `_nc_to_char` for the case when `wctob` is not found by configure script

- revised loop in `wins_nwstr`, to ensure that non-spacing characters are combined with the base spacing character

- modified checks in `delwin` to avoid checking if the window is a pad until first checking if it is still on the active window-list

### Program improvements

#### Utilities

Several improvements were made to the utility programs.

infocmp

  - improved `infocmp` `-E`/`-e` fallback feature

    - prefix names with “`ti_`” if they begin with a digit, e.g., 9term
    - escape backslashes and double-quotes in description fields

  - modified `infocmp` `-E`/`-e` fallback feature to reduce stricter compiler warnings for the extended capability data.

  - modified `infocmp` and `tabs` to use actual name in usage and header.

  - improved error-message from `infocmp` when a terminal entry cannot be opened

tic

  - increased limit on use-clauses from 32 to 40, warn but allow entries which exceed the old limit.

  - added check for infinite loop in `tic`'s use-resolution.

  - added a buffer-limit check in `postprocess_termcap`

tput

  - Warn about capabilities which expect parameters where none are given. Also, repair the feature where multiple capabilities can be handled on a single line.

#### Examples

Along with the library and utilities, improvements were made to the ncurses-examples:

- add help-popup for `test_instr.c`, `test_inwstr.c`

- add options to `test/worm.c` for benchmarking.

- improve `-t` option of `test/gdc.c`, allowing hours only, or hours and minutes only.

- correct dimensions in `test/popup_msg.c`, fixing an overrun.

- modify `test/demo_keyok.c` to accept `^Q` for quit, for consistency.

- add option “`-c`” to test programs to illustrate a non-blank character in the window background property.

- reserve `-c`/`-l` options in `test/*.c` for command/logging like vttest.

There is one new demo/test program:

ncurses/report_ctype.c

  Shows a chart of the first 256 character codes, which are not as consistent across platforms for ctype versus wctype as some suppose.

### Terminal database

There are several new terminal descriptions:

- `ghostty`

- `illumos`, `sun-16color`, `sun-256color`, and `sun-direct`

- `ms-terminal-direct`

- `pangoterm`

- `rlogin-color`

- `sclp`

- `vt520-w` and `vt525-w`

along with building blocks

- `linux+lockeys`, `xterm+r5+lockeys`, `xterm+r5+fkeys`

- `vt100+pf1-pf4`

- `vt220+ufkeys`, `vt220+sfkeys`

- `ecma+standout`, `ecma+underline`

- `wyse+cvis`

There are many changes to existing terminal descriptions. Some were updates to several descriptions, using the `infocmp` “`-u`” option in a script to determine which building-block entries could be used to replace multiple capability settings (and trim redundant information).

Other changes include:

- use xterm+keypad in pccon+base

- use bracketed+paste in nsterm, rlogin-color, screen, terminology

- use extended-keys in djgpp 2.05

- update/correct some of the rv/xr strings, checked with

  tack

  - add rv code for alacritty
  - add xr code for putty
  - add rv/xr codes for domterm, mintty, mlterm, contour, ghostty, iterm2, kitty, konsole, vscode, vte, wezterm

- improve use-clauses: ansi+cup, ansi+idl1, ansi+rca, ansi+rca2, ansi+sgrso, ansi+sgrul

- sclp:

  - add kf1 to kf5
  - use ansi+rca
  - use vt220+pcedit

- vt525

  - add color
  - add op

- wezterm:

  - use xterm+alt+title
  - omit its broken left/right margin feature
- update contour

- update ms-terminal

  - add XM/xm to ms-terminal, to enable mouse with experimental Windows driver

- update st to 0.8.5

- update teraterm to 5.0

- update foot to 1.18.1

- update iTerm2 to 3.5.0

### Documentation

As usual, this release

- improves documentation by describing new features,

- attempts to improve the description of features which users have found confusing

- fills in overlooked descriptions of features which were described in the NEWS file but treated sketchily in manual pages.

In addition to providing background information to explain these features and show how they evolved, there are corrections, clarifications, etc.:

- Corrections:

  - corrected note about box() in curs_border.3x

  - added note on scrolling and lower-right corner to waddch and wadd_wch manual pages.

- Other improvements:

  - This release has many changes to improve the formatting and style of the man pages.

  - Table layout in the man pages has been revised.

  - The ncurses HOWTO and its sample programs has been updated.

There are no new manual pages (all of the manual page updates are to existing pages).

### Interesting bug-fixes

### Configuration changes

#### Major changes

Improvements made to configure checks include

- improve configure check for “install”.

- add check for build-time utilities, in case cross-compiling is setup with an invalid `$BUILD_CC`

- add configure check for `<sys/fsuid.h>`, which may be needed for flatpacks

- add a consistency-check for termio(s)/tty headers, to help with cross-compiles

- modify configure check for `MAKEFLAGS`/`MFLAGS` to ignore existing value of these environment variables

- improve configurability of `alloca` as used in Windows ports.

- modify configure script checks for `stdbool.h` to fix build with older gcc version.

- add <new> to the possible headers declaring the C++ `std::bad_alloc`.

- modify check for `stdbool.h` to be more conservative in case the headers are used with a compiler other than that which was used to configure

- remove dependency on `stdbool.h` from configure script check for type of bool when C++ binding is omitted.

#### Configuration options

There are a few new configure options:

`--enable-install-prefix`

  Modify behavior of `$DESTDIR` to merge or replace the value set by `--prefix`.

`--enable-named-pipes`

  The Windows driver uses named pipes for communicating with a pseudo console, allowing it to use escape sequences rather than Console API. This works well with mintty. On the downside, this feature may not work well with the Windows Terminal due to a longstanding bug in `conhost.exe` (#9461).

These configure options are modified:

`--enable-exp-win32`

  This option is obsolete, replaced by `--enable-named-pipes`.

`--enable-term-driver`

  This is enabled by default on platforms where the Windows driver can be compiled, e.g., Cygwin, MinGW32 and MSYS2.

#### Package configuration scripts

The configure script and makefiles optionally generate a script which reports the compiler and linker options needed to build a program with ncurses, as well as a data file which is used via pkg-config for the same purpose. Several improvements were made for these scripts:

- improved filtering of `-L` options in `misc/gen-pkgconfig.in` and in `misc/ncurses-config.in`

- modified `ncurses*-config` to add `-I` option in `--cflag` where needed for `--disable-overwrite` to match ".pc" files.

- suppressed `-g` and `-fXXX` flags from `CFLAGS` in `misc/ncurses-config.in`

- modified configure script to allow for `pkg-config` using DOS/Windows pathname syntax

- modified `misc/ncurses-config.in`, improved match with `pkg-config output`.

- adjusted naming of test packages for MinGW `*-config` scripts to match the `pkg-config` names

- added `--cflags-only-I` and `--cflags-only-other` options to `misc/ncurses-config.in`

### Portability

Many of the portability changes are implemented via the configure script:

- disallow configure options which apply only to multiuser systems, to improve ports to single-user systems such as Haiku

- add warning to configure script to address conflict between the `--enable-lp64` option and the options for overriding the types used for `chtype` and `mmask_t`.

- modify configure script cases for $host_os, to accommodate 64-bit big-endian POWER Linux with glibc

- modify configure script and misc/Makefile to accept glob expressions that include Windows/DOS drive-letters

- change `Ada95/configure` to use `--with-screen` option rather than `--enable-widec`, to provide more choices of underlying curses library.

- modify configure script to work around broken gnatgcc script found in gcc-13 builds.

Other portability fixes include:

- improve pattern used for configure `--with-xterm-kbs` option.

- modify recursive make rules to avoid interference with GNU make's "-j" option

- when installing the terminfo database, check if symbolic links are supported before attemping to link lib/terminfo from share/terminfo

- improve logic in misc/run_tic.in for constructing symbolic link when `$DESTDIR` is set.

- build-fix for ncurses-examples with newer PDCurses, which no longer has stubs for unimplemented features.

- change `etip.h.in` to include either/both of `<new>` and `<exception>`, needed for another old BSD.

- correct conditional-compile for a case when the C compiler does not have a bool type.

- improve `MKlib_gen.sh` handling of “bool” type, for building link_test.

- modify `ncurses/tinfo/MKfallback.sh` to work with MacOS `sed`, which lacks BSD-style `\<` and `\>`.

- modify `MKlib_gen.c` to allow for Solaris's definition of `NULL` as `0L`.

- widen pattern in pc/*-config scripts to disallow more linker options.

- avoid redefining bool in `curses.h` if the platform already supports that type.

- move include `<curses.h>` from `etip.h.in` to `cursesw.h`, to work around breakage in Apple's port of ncurses.

## Features of ncurses

The ncurses package is fully upward-compatible with SVr4 (System V Release 4) curses:

- All of the SVr4 calls have been implemented (and are documented).

- ncurses supports the features of SVr4 curses including keyboard mapping, color, form drawing with ACS characters, and automatic recognition of keypad and function keys.

- ncurses provides work-alike replacements of SVr4 supplemental libraries based on curses, but which were not specified by X/Open Curses:

  - the panel library, permitting windows to stack and overlap

  - the menu library, supporting a uniform but flexible interface for menu programming

  - the form library, supporting data collection through on-screen forms

- ncurses's terminal database is fully compatible with that used by SVr4 curses.

  - ncurses supports user-defined capabilities that it can see, but which are hidden from SVr4 curses applications using the same terminal database.

  - It can be optionally configured to match the format used in related systems such as AIX and Tru64.

  - Alternatively, ncurses can be configured to use hashed databases rather than the directory of files used by SVr4 curses.

- The ncurses utilities have options to allow you to filter terminfo entries for use with less capable curses/terminfo versions such as the HP-UX and AIX ports.

The ncurses package also has many useful extensions over SVr4:

- The API is 8-bit clean and base-level conformant with the X/Open Curses specification, XSI curses (that is, it implements all BASE level features, and almost all EXTENDED features). It includes many function calls not supported under SVr4 curses (but portability of all calls is documented so you can use the SVr4 subset only).

- Unlike SVr3 curses, ncurses can write to the rightmost-bottommost corner of the screen if your terminal has an insert-character capability.

- Ada95 and C++ bindings.

- Support for mouse event reporting with X Window xterm and FreeBSD and OS/2 console windows.

- Extended mouse support via Alessandro Rubini's gpm package.

- The function `wresize` allows you to resize windows, preserving their data.

- The function `use_default_colors` allows you to use the terminal's default colors for the default color pair, achieving the effect of transparent colors.

- The functions `keyok` and `define_key` allow you to better control the use of function keys, e.g., disabling the ncurses KEY_MOUSE, or by defining more than one control sequence to map to a given key code.

- Support for direct-color terminals, such as modern xterm.

- Support for 256-color terminals, such as modern xterm.

- Support for 16-color terminals, such as aixterm and modern xterm.

- Better cursor-movement optimization. The package now features a cursor-local-movement computation more efficient than either BSD's or System V's.

- Super hardware scrolling support. The screen-update code incorporates a novel, simple, and cheap algorithm that enables it to make optimal use of hardware scrolling, line-insertion, and line-deletion for screen-line movements. This algorithm is more powerful than the 4.4BSD curses `quickch` routine.

- Real support for terminals with the magic-cookie glitch. The screen-update code will refrain from drawing a highlight if the magic- cookie unattributed spaces required just before the beginning and after the end would step on a non-space character. It will automatically shift highlight boundaries when doing so would make it possible to draw the highlight without changing the visual appearance of the screen.

- It is possible to generate the library with a list of pre-loaded fallback entries linked to it so that it can serve those terminal types even when no terminfo tree or termcap file is accessible (this may be useful for support of screen-oriented programs that must run in single-user mode).

- The tic/captoinfo utility provided with ncurses has the ability to translate many termcaps from the XENIX, IBM and AT&T extension sets.

- A BSD-like tset utility is provided.

- The ncurses library and utilities will automatically read terminfo entries from $HOME/.terminfo if it exists, and compile to that directory if it exists and the user has no write access to the system directory. This feature makes it easier for users to have personal terminfo entries without giving up access to the system terminfo directory.

- You may specify a path of directories to search for compiled descriptions with the environment variable TERMINFO_DIRS (this generalizes the feature provided by TERMINFO under stock System V.)

- In terminfo source files, use capabilities may refer not just to other entries in the same source file (as in System V) but also to compiled entries in either the system terminfo directory or the user's $HOME/.terminfo directory.

- The table-of-entries utility toe makes it easy for users to see exactly what terminal types are available on the system.

- X/Open Curses permits most functions it specifies to be made available as macros as well. ncurses does this

  - to improve performance, e.g., for operations composed of simpler functions such as cursor movement following by adding text to the screen,
  - to simplify the implementation by reusing functions which use common parameters, e.g., the standard screen `stdscr`, and
  - to provide functions that return values via their parameters

  Except for the last case, ncurses provides a non-macro implementation of the function. If the macro definition is disabled with `#undef`, or by defining `NCURSES_NOMACROS` the function may be linked (and its calls will be checked against the prototype).

- Extensive documentation is provided (see the Additional Reading section of the ncurses FAQ for online documentation).

## Applications using ncurses

The ncurses distribution includes a selection of test programs (including a few games). These are available separately as ncurses-examples

The ncurses library has been tested with a wide variety of applications including:

> aptitude

>   FrontEnd to Apt, the debian package manager

>   https://wiki.debian.org/Aptitude

> cdk

>   Curses Development Kit

>   https://invisible-island.net/cdk/

> ded

>   directory-editor

>   https://invisible-island.net/ded/

> dialog

>   the underlying application used in Slackware's setup, and the basis for similar install/configure applications on many systems.

>   https://invisible-island.net/dialog/

> lynx

>   the text WWW browser

>   https://lynx.invisible-island.net/

> mutt

>   mail utility

>   http://www.mutt.org/

> ncftp

>   file-transfer utility

>   https://www.ncftp.com/

> nvi

>   New vi uses ncurses.

>   https://sites.google.com/a/bostic.com/keithbostic/the-berkeley-vi-editor-home-page

> ranger

>   A console file manager with VI key bindings in Python.

>   https://ranger.github.io/

> tin

>   newsreader, supporting color, MIME

>   http://www.tin.org/

> vifm

>   File manager with vi like keybindings

>   https://vifm.info/

as well as some that use ncurses for the terminfo support alone:

> minicom

>   terminal emulator for serial modem connections

>   https://salsa.debian.org/minicom-team/minicom

> mosh

>   a replacement for `ssh`.

>   https://mosh.org/

> tack

>   terminfo action checker

>   https://invisible-island.net/ncurses/tack.html

> tmux

>   terminal multiplexor

>   https://github.com/tmux/tmux/wiki

> vile

>   vi-like-emacs may be built to use the terminfo, termcap or curses interfaces.

>   https://invisible-island.net/vile/

and finally, those which use only the termcap interface:

> emacs

>   text editor

>   https://www.gnu.org/software/emacs/

> less

>   The most commonly used pager (a program that displays text files).

>   http://www.greenwoodsoftware.com/less/

> screen

>   terminal multiplexor

>   https://www.gnu.org/software/screen/

> vim

>   text editor

>   https://www.vim.org/

## Development activities

Zeyd Ben-Halim started ncurses from a previous package pcurses, written by Pavel Curtis. Eric S. Raymond continued development. Jürgen Pfeifer wrote most of the form and menu libraries.

Ongoing development work is done by Thomas E. Dickey. Thomas E. Dickey has acted as the maintainer for the Free Software Foundation, which held a copyright on ncurses for releases 4.2 through 6.1. Following the release of ncurses 6.1, effective as of release 6.2, copyright for ncurses reverted to Thomas E. Dickey (see the ncurses FAQ for additional information).

Contact the current maintainers at

> bug-ncurses@gnu.org

To join the ncurses mailing list, please write email to

> bug-ncurses-request@gnu.org

containing the line:

> `subscribe` <name>@<host.domain>

This list is open to anyone interested in helping with the development and testing of this package.

Beta versions of ncurses are made available at

> https://invisible-island.net/archives/ncurses/current/ and
> https://invisible-mirror.net/archives/ncurses/current/ .

Patches to the current release are made available at

> https://invisible-island.net/archives/ncurses/6.5/ and
> https://invisible-mirror.net/archives/ncurses/6.5/ .

There is an archive of the mailing list here:

> https://lists.gnu.org/archive/html/bug-ncurses .

## Related resources

The release notes make scattered references to these pages, which may be interesting by themselves:

- ncurses licensing
- Symbol versioning in ncurses
- Comments on ncurses versus slang (S-Lang)
- Comments on OpenBSD
- tack – terminfo action checker
- tctest – termcap library checker
- Terminal Database

## Other resources

The distribution provides a newer version of the terminfo-format terminal description file once maintained by Eric Raymond . Unlike the older version, the termcap and terminfo data are provided in the same file, which also provides several user-definable extensions beyond the X/Open Curses specification.

You can find lots of information on terminal-related topics not covered in the terminfo file in Richard Shuford's archive (original). The collection of computer manuals at bitsavers.org has also been useful.