5 The ncurses (new curses) library is a free software emulation of
6 curses in System V Release 4.0 (SVr4), and more. It uses terminfo
7 format, supports pads and color and multiple highlights and forms
8 characters and function-key mapping, and has all the other SVr4-curses
9 enhancements over BSD curses. SVr4 curses became the basis of X/Open
12 In mid-June 1995, the maintainer of 4.4BSD curses declared that he
13 considered 4.4BSD curses obsolete, and encouraged the keepers of unix
14 releases such as BSD/OS, FreeBSD and NetBSD to switch over to ncurses.
16 Since 1995, ncurses has been ported to many systems:
17 * It is used in almost every system based on the Linux kernel (aside
18 from some embedded applications).
19 * It is used as the system curses library on OpenBSD, FreeBSD and
21 * It is used in environments such as Cygwin and MinGW. The first of
22 these was EMX on OS/2 Warp.
23 * It is used (though usually not as the system curses) on all of the
24 vendor unix systems, e.g., AIX, HP-UX, IRIX64, SCO, Solaris,
26 * It should work readily on any ANSI/POSIX-conforming unix.
28 The distribution includes the library and support utilities, including
29 * captoinfo, a termcap conversion tool
30 * clear, utility for clearing the screen
31 * infocmp, the terminfo decompiler
32 * tabs, set tabs on a terminal
33 * tic, the terminfo compiler
34 * toe, list (table of) terminfo entries
35 * tput, utility for retrieving terminal capabilities in shell
37 * tset, to initialize the terminal
39 Full manual pages are provided for the library and tools.
41 The ncurses distribution is available at ncurses' homepage:
43 https://invisible-island.net/archives/ncurses/ or
44 https://invisible-mirror.net/archives/ncurses/ .
46 It is also available at the GNU distribution site
48 https://ftp.gnu.org/gnu/ncurses/ .
52 These notes are for ncurses 6.4, released December 31, 2022.
54 This release is designed to be source-compatible with ncurses 5.0
55 through 6.3; providing extensions to the application binary interface
56 (ABI). Although the source can still be configured to support the
57 ncurses 5 ABI, the reason for the release is to reflect improvements
58 to the ncurses 6 ABI and the supporting utility programs.
60 There are, of course, numerous other improvements, listed in this
63 The most important bug-fixes/improvements dealt with robustness
64 issues. The release notes also mention some other bug-fixes, but are
65 focused on new features and improvements to existing features since
72 There are no new features in this release.
76 These are improvements to existing features:
77 * modify delscreen to more effectively delete all windows on the
79 * modify wnoutrefresh to call pnoutrefresh if its parameter is a
80 pad, rather than treating it as an error, and modify new_panel to
81 permit its window-parameter to be a pad
82 * modify curses_trace() to show the trace-mask as symbols, e.g.,
83 TRACE_ORDINARY, DEBUG_LEVEL(3).
84 * improve checks for valid mouse events when an intermediate mouse
85 state is not part of the mousemask specified by the caller
86 * allow extended-color number in opts parameter of wattr_on.
87 * improve _tracecchar_t2 formatting of base+combining character.
88 * trim out some unwanted linker options from ncurses*config and .pc
89 files seen in Fedora 36+.
90 * improve shell-scripts with shellcheck
91 * improve use of "trap" in shell scripts, using a script.
92 * modify make-tar.sh scripts to make timestamps more predictable.
94 These are corrections to existing features:
95 * modify misc/gen-pkgconfig.in to allow for the case where the
96 library directory does not yet exist, since this is processed
97 before doing an install
98 * set trailing null on string passed from winsnstr to wins_nwstr.
99 * modify waddch_literal to allow for double-width base character
100 when merging a combining character
104 Several improvements were made to the utility programs:
108 + rewrite canonical_name function of infocmp to ensure buffer
110 + improve readability of long parameterized expressions with
111 the infocmp "-f" option by allowing split before a "%p"
113 + modify verbose-option of infocmp, tic, toe to enable
114 debug-tracing if that is configured.
117 limit tab-stop values to max-columns
120 add consistency check in tic for u6/u7/u8/u9 and NQ
124 corrected use of original tty-modes in init/reset subcommands
128 Along with the library and utilities, improvements were made to the
129 ncurses-examples. Most of this activity aimed at improving the
131 * add minimal -h (usage) and -V (version) getopt logic to all
132 ncurses-examples programs.
133 * fix an error in "@" command in test/ncurses.c F-menu
134 * add curses_trace to ifdef's for START_TRACE in test/test.priv.h
135 * improve pthread-configuration for test/worm.c
136 * add setlocale call to several test-programs.
137 * workaround in test/picsmap.c for use of floating point for rgb
138 values by ImageMagick 6.9.11, which appears to use the wrong upper
140 * use static libraries for AdaCurses test-package for Mageia, since
141 no gprbuild package is available.
142 * install Ada95 sample programs in libexecdir, adding a wrapper
143 script to invoke those.
144 * install ncurses-examples programs in libexecdir, adding a wrapper
145 script to invoke those.
147 There are other new demo/test programs and reusable examples:
150 demonstrate combining characters
153 demonstrate deleting a window
156 observe mouse events in the raw terminal or parsed ncurses
160 demonstrate the unget_wch and unget functions
164 There are several new terminal descriptions:
172 There are many changes to existing terminal descriptions. Some were
173 updates to several descriptions:
174 * make description-fields distinct
175 * fix errata in description fields
176 * add/use several building-blocks:
187 while others affected specific descriptions. These were retested, to
188 take into account changes by their developers:
192 while these are specific fixes based on reviewing documentation, user
193 reports, or warnings from tic:
196 amended note as per documentation for att610, att620, att730
199 revise to undo "linux2.6" change to smacs/rmacs/enacs
202 add dim, ecma+strikeout
208 correct dsl in dec+sl
211 correct setal in mintty/tmux entries, add to vte-2018
214 modify nsterm to use xterm+alt1049
217 modify putty to use xterm+alt1049
222 A few entries use extensions (user-defined terminal capabilities):
223 * use ansi+enq and decid+cpr in cases where the terminal probably
224 supported the u6-u9 extension
225 * remove u6-u9 from teken-2018
226 * use NQ to flag entries where the terminal does not support query
228 * add/use bracketed+paste to help identify terminals supporting this
230 * modify samples for xterm mouse 1002/1003 modes to use 1006 mode,
231 and also provide for focus in/out responses
232 * xterm patch #371 supports DEC-compatible status-line. add dec+sl
233 to xterm-new, per xterm #371, add xterm-p371, add xterm-p370, for
234 use in older terminals, and set "xterm-new" to "xterm-p370" (to
239 As usual, this release
240 * improves documentation by describing new features,
241 * attempts to improve the description of features which users have
243 * fills in overlooked descriptions of features which were described
244 in the NEWS file but treated sketchily in manual pages.
246 In addition to providing background information to explain these
247 features and show how they evolved, there are corrections,
248 clarifications, etc.:
250 + remove a stray '/' from description of %g in terminfo(5).
251 + correct/improve font-formatting in curs_getch.3x, as well as
253 * New/improved history and portability sections:
254 + add portability notes for delscreen and delwin in manual.
255 + improve curs_slk.3x discussion of extensions and portability
256 * Other improvements:
257 + improve curs_bkgd.3x, explaining that bkgdset can affect
259 + add note on portable memory-leak checking in curs_memleaks.3x
260 + expanded description in resizeterm.3x
261 + add section on releasing memory to curs_termcap.3x and
262 curs_terminfo.3x manpages.
263 + add clarification of the scope of dynamic variables in
265 + improve formatting of ncurses-intro.html and hackguide.html
266 + improve curs_clear.3x links to other pages
267 + update ncurses-howto, making documentation fixes along with
268 corrections to example programs.
269 + use newer version 1.36 of gnathtml for generating Ada html
271 + update external links in Ada95.html
273 There are no new manual pages (all of the manual page updates are to
276 Interesting bug-fixes
278 While there were many bugs fixed during development of ncurses 6.4,
279 only a few (the reason for this release) were both important and
280 interesting. Most of the bug-fixes were for local issues which did not
281 affect compatibility across releases. Since those are detailed in the
282 NEWS file no elaboration is needed here.
284 The interesting bugs were those dealing with memory leaks and buffer
285 overflows. Although the utilities are designed for text files (which
286 they do properly), some choose to test them with non-text files.
287 * Text files contain no embedded nulls. Also, they end with a
288 newline. Feeding tic non-text files exposed a few cases where the
289 program did not check for those issues. As a result, further
290 processing of the input found limit-checks whose assumptions were
292 * Fixing the limit-checks (first) found a problem with tic managing
293 the list of strings in a terminal description. In merging two
294 terminal descriptions (i.e., the "use=" feature), tic was not
295 allocating a complete copy. A quick repair for that introduced a
297 * The checks for non-text files are improved (i.e., embedded nulls
298 in the input file will cause tic to reject it rather than
299 attempting to process it).
300 * The string allocations in tic are likewise improved.
302 Configuration changes
306 There are no major changes. No new options were added. Several
307 improvements were made to configure checks.
309 Configuration options
311 There are a few new/modified configure options:
314 add ABI 7 defaults to configure script.
317 add warning in configure script if file specified for
318 "--with-caps" does not exist.
320 --with-manpage-format
321 bzip2 and xz compression are now supported
324 add check/warning in configure script if option
325 "--with-xterm-kbs" is missing or inconsistent
329 Many of the portability changes are implemented via the configure
331 * amend configure option's auto-search to account for systems where
332 none of the directories known to pkg-config exist
333 * corrected regex needed for older pkg-config used in Solaris 10
334 * improve handling of --with-pkg-config-libdir option, allowing for
335 the case where either $PKG_CONFIG_LIBDIR or the option value has a
336 colon-separated list of directories
337 * if the --with-pkg-config-libdir option is not given, use
338 ${libdir}/pkgconfig as a default
339 * improve search-path check for pkg-config, e.g., for Debian testing
340 which installs pkg-config with architecture-prefixes.
341 * build-fix for cross-compiling to MingW, conditionally add -lssp
342 * improve configure check for getttynam
343 * fixes to build with dietlibc:
344 + add configure check for fpathconf
345 + add configure check for math sine/cosine, needed in
346 test/tclock, and eliminate pow() from test/hanoi
347 + use wcsnlen as an alternative to wmemchr if it is not found
348 * modify configure macro CF_BUILD_CC to check if the build-compiler
349 works, rather than that it is different from the cross-compiler,
350 e.g., to accommodate a compiler which can be used for either
351 purpose with different flags
352 * modify configure/scripts to work around interference by GNU grep
355 Here are some of the other portability fixes:
356 * change man_db.renames to template, to handle ncurses*-config
357 script with the --extra-suffix configure option.
358 * update CF_XOPEN_SOURCE macro, adding variants "gnueabi" and
359 "gnueabihf" to get _DEFAULT_SOURCE special case, as well as adding
360 GNU libc suffixes for "abi64", "abin32", "x32" to distinguish it
361 from other libc flavors.
362 * work around musl's nonstandard use of feature test macros by
363 adding a definition for NCURSES_WIDECHAR to the generated ".pc"
365 * use "command -v" rather than "type" in Ada95/gen/Makefile.in to
366 fix a portability issue.
367 _________________________________________________________________
371 The ncurses package is fully upward-compatible with SVr4 (System V
373 * All of the SVr4 calls have been implemented (and are documented).
374 * ncurses supports all of the for SVr4 curses features including
375 keyboard mapping, color, forms-drawing with ACS characters, and
376 automatic recognition of keypad and function keys.
377 * ncurses provides these SVr4 add-on libraries (not part of X/Open
379 + the panels library, supporting a stack of windows with
381 + the menus library, supporting a uniform but flexible
382 interface for menu programming.
383 + the form library, supporting data collection through
385 * ncurses's terminal database is fully compatible with that used by
387 + ncurses supports user-defined capabilities which it can see,
388 but which are hidden from SVr4 curses applications using the
389 same terminal database.
390 + It can be optionally configured to match the format used in
391 related systems such as AIX and Tru64.
392 + Alternatively, ncurses can be configured to use hashed
393 databases rather than the directory of files used by SVr4
395 * The ncurses utilities have options to allow you to filter terminfo
396 entries for use with less capable curses/terminfo versions such as
397 the HP-UX and AIX ports.
399 The ncurses package also has many useful extensions over SVr4:
400 * The API is 8-bit clean and base-level conformant with the X/OPEN
401 curses specification, XSI curses (that is, it implements all BASE
402 level features, and most EXTENDED features). It includes many
403 function calls not supported under SVr4 curses (but portability of
404 all calls is documented so you can use the SVr4 subset only).
405 * Unlike SVr3 curses, ncurses can write to the rightmost-bottommost
406 corner of the screen if your terminal has an insert-character
408 * Ada95 and C++ bindings.
409 * Support for mouse event reporting with X Window xterm and FreeBSD
410 and OS/2 console windows.
411 * Extended mouse support via Alessandro Rubini's gpm package.
412 * The function wresize allows you to resize windows, preserving
414 * The function use_default_colors allows you to use the terminal's
415 default colors for the default color pair, achieving the effect of
417 * The functions keyok and define_key allow you to better control the
418 use of function keys, e.g., disabling the ncurses KEY_MOUSE, or by
419 defining more than one control sequence to map to a given key
421 * Support for direct-color terminals, such as modern xterm.
422 * Support for 256-color terminals, such as modern xterm.
423 * Support for 16-color terminals, such as aixterm and modern xterm.
424 * Better cursor-movement optimization. The package now features a
425 cursor-local-movement computation more efficient than either BSD's
427 * Super hardware scrolling support. The screen-update code
428 incorporates a novel, simple, and cheap algorithm that enables it
429 to make optimal use of hardware scrolling, line-insertion, and
430 line-deletion for screen-line movements. This algorithm is more
431 powerful than the 4.4BSD curses quickch routine.
432 * Real support for terminals with the magic-cookie glitch. The
433 screen-update code will refrain from drawing a highlight if the
434 magic- cookie unattributed spaces required just before the
435 beginning and after the end would step on a non-space character.
436 It will automatically shift highlight boundaries when doing so
437 would make it possible to draw the highlight without changing the
438 visual appearance of the screen.
439 * It is possible to generate the library with a list of pre-loaded
440 fallback entries linked to it so that it can serve those terminal
441 types even when no terminfo tree or termcap file is accessible
442 (this may be useful for support of screen-oriented programs that
443 must run in single-user mode).
444 * The tic/captoinfo utility provided with ncurses has the ability to
445 translate many termcaps from the XENIX, IBM and AT&T extension
447 * A BSD-like tset utility is provided.
448 * The ncurses library and utilities will automatically read terminfo
449 entries from $HOME/.terminfo if it exists, and compile to that
450 directory if it exists and the user has no write access to the
451 system directory. This feature makes it easier for users to have
452 personal terminfo entries without giving up access to the system
454 * You may specify a path of directories to search for compiled
455 descriptions with the environment variable TERMINFO_DIRS (this
456 generalizes the feature provided by TERMINFO under stock System
458 * In terminfo source files, use capabilities may refer not just to
459 other entries in the same source file (as in System V) but also to
460 compiled entries in either the system terminfo directory or the
461 user's $HOME/.terminfo directory.
462 * The table-of-entries utility toe makes it easy for users to see
463 exactly what terminal types are available on the system.
464 * The library meets the XSI requirement that every macro entry point
465 has a corresponding function which may be linked (and will be
466 prototype-checked) if the macro definition is disabled with
468 * Extensive documentation is provided (see the Additional Reading
469 section of the ncurses FAQ for online documentation).
471 Applications using ncurses
473 The ncurses distribution includes a selection of test programs
474 (including a few games). These are available separately as
477 The ncurses library has been tested with a wide variety of
478 applications including:
481 FrontEnd to Apt, the debian package manager
483 https://wiki.debian.org/Aptitude
486 Curses Development Kit
488 https://invisible-island.net/cdk/
493 https://invisible-island.net/ded/
496 the underlying application used in Slackware's setup, and the
497 basis for similar install/configure applications on many
500 https://invisible-island.net/dialog/
505 https://lynx.invisible-island.net/
513 file-transfer utility
515 https://www.ncftp.com/
520 https://sites.google.com/a/bostic.com/keithbostic/vi
523 A console file manager with VI key bindings in Python.
525 https://ranger.github.io/
528 newsreader, supporting color, MIME
533 File manager with vi like keybindings
537 as well as some that use ncurses for the terminfo support alone:
540 terminal emulator for serial modem connections
542 https://alioth.debian.org/projects/minicom/
545 a replacement for ssh.
550 terminfo action checker
552 https://invisible-island.net/ncurses/tack.html
557 https://github.com/tmux/tmux/wiki
560 vi-like-emacs may be built to use the terminfo, termcap or
563 https://invisible-island.net/vile/
565 and finally, those which use only the termcap interface:
570 https://www.gnu.org/software/emacs/
573 The most commonly used pager (a program that displays text
576 http://www.greenwoodsoftware.com/less/
581 https://www.gnu.org/software/screen/
588 Development activities
590 Zeyd Ben-Halim started ncurses from a previous package pcurses,
591 written by Pavel Curtis. Eric S. Raymond continued development.
592 Juergen Pfeifer wrote most of the form and menu libraries.
594 Ongoing development work is done by Thomas E. Dickey. Thomas E. Dickey
595 has acted as the maintainer for the Free Software Foundation, which
596 held a copyright on ncurses for releases 4.2 through 6.1. Following
597 the release of ncurses 6.1, effective as of release 6.2, copyright for
598 ncurses reverted to Thomas E. Dickey (see the ncurses FAQ for
599 additional information).
601 Contact the current maintainers at
605 To join the ncurses mailing list, please write email to
607 bug-ncurses-request@gnu.org
611 subscribe <name>@<host.domain>
613 This list is open to anyone interested in helping with the development
614 and testing of this package.
616 Beta versions of ncurses are made available at
618 https://invisible-island.net/archives/ncurses/current/ and
619 https://invisible-mirror.net/archives/ncurses/current/ .
621 Patches to the current release are made available at
623 https://invisible-island.net/archives/ncurses/6.3/ and
624 https://invisible-mirror.net/archives/ncurses/6.3/ .
626 There is an archive of the mailing list here:
628 http://lists.gnu.org/archive/html/bug-ncurses (also https)
632 The release notes make scattered references to these pages, which may
633 be interesting by themselves:
635 * Symbol versioning in ncurses
636 * Comments on ncurses versus slang (S-Lang)
637 * Comments on OpenBSD
638 * tack - terminfo action checker
639 * tctest - termcap library checker
644 The distribution provides a newer version of the terminfo-format
645 terminal description file once maintained by Eric Raymond . Unlike the
646 older version, the termcap and terminfo data are provided in the same
647 file, which also provides several user-definable extensions beyond the
648 X/Open specification.
650 You can find lots of information on terminal-related topics not
651 covered in the terminfo file at Richard Shuford's archive . The
652 collection of computer manuals at bitsavers.org has also been useful.
656 + Library improvements
659 + Program improvements
664 + Interesting bug-fixes
665 + Configuration changes
667 o Configuration options
669 * Features of ncurses
670 * Applications using ncurses
671 * Development activities