3 The ncurses (new curses) library is a free software emulation of
4 curses in System V Release 4.0, and more. It uses terminfo format,
5 supports pads and color and multiple highlights and forms characters
6 and function-key mapping, and has all the other SYSV-curses
7 enhancements over BSD curses.
9 In mid-June 1995, the maintainer of 4.4BSD curses declared that he
10 considered 4.4BSD curses obsolete, and encouraged the keepers of Unix
11 releases such as BSD/OS, FreeBSD and NetBSD to switch over to ncurses.
13 The ncurses code was developed under GNU/Linux. It has been in use for
14 some time with OpenBSD as the system curses library, and on FreeBSD
15 and NetBSD as an external package. It should port easily to any
16 ANSI/POSIX-conforming UNIX. It has even been ported to OS/2 Warp!
18 The distribution includes the library and support utilities, including
19 a terminfo compiler tic(1), a decompiler infocmp(1), clear(1),
20 tput(1), tset(1), and a termcap conversion tool captoinfo(1). Full
21 manual pages are provided for the library and tools.
23 The ncurses distribution is available via anonymous FTP at the GNU
24 distribution site [1]ftp://ftp.gnu.org/gnu/ncurses/ .
25 It is also available at [2]ftp://invisible-island.net/ncurses/ .
29 This release is designed to be upward compatible from ncurses 5.0
30 through 5.6; very few applications will require recompilation,
31 depending on the platform. These are the highlights from the
32 change-log since ncurses 5.6 release.
35 * generate linkable stubs for some macros:
38 New features and improvements:
40 + new flavor of the ncurses library provides rudimentary
41 support for POSIX threads. Several functions are reentrant,
42 but most require either a window-level or screen-level mutex.
43 (This is API-compatible, but not ABI-compatible with the
45 + add NCURSES_OPAQUE symbol to curses.h, will use to make
46 structs opaque in selected configurations.
47 + add NCURSES_EXT_FUNCS and NCURSES_EXT_COLORS symbols to
48 curses.h to make it simpler to tell if the extended functions
49 and/or colors are declared.
50 + add wresize() to C++ binding
51 + eliminate fixed-buffer vsprintf() calls in C++ binding.
52 + add several functions to C++ binding which wrap C functions
53 that pass a WINDOW* parameter.
54 + adapt mouse-handling code from menu library in form-library
55 + improve tracing for form library, showing created forms,
57 + make $NCURSES_NO_PADDING feature work for termcap interface .
58 + add check to trace-file open, if the given name is a
59 directory, add ".log" to the name and try again.
60 + several new manpages: curs_legacy.3x, curs_memleaks.3x,
61 curs_opaque.3x and curs_threads.3x
63 + modified three test-programs to demonstrate the threading
64 support in this version: ditto, rain, worm.
65 + several new test-programs: demo_panels, dots_mvcur,
66 inch_wide, inchs, key_name, key_names, savescreen,
67 savescreen.sh test_arrays, test_get_wstr, test_getstr,
68 test_instr, test_inwstr and test_opaque.
69 + add adacurses-config to the Ada95 install.
70 + modify tic -f option to format spaces as \s to prevent them
71 from being lost when that is read back in unformatted
73 + The tack program is now distributed separately from ncurses.
76 o Eterm-256color, Eterm-88color and rxvt-88color
82 o teraterm4.59 is now the primary primary teraterm entry,
83 renamed original to teraterm2.3
85 o Newbury Data entries
86 + updated/improved entries:
87 o gnome to version 2.22.3
89 o konsole to version 1.6.6
90 o mlterm, mlterm+pcfkeys
91 o xterm, and building-blocks for function-keys to [3]xterm
95 * add logic to tic for cancelling strings in user-defined
96 capabilities (this is needed for current konsole terminfo entry).
97 * modify mk-1st.awk so the generated makefile rules for linking or
98 installing shared libraries do not first remove the library, in
99 case it is in use, e.g., libncurses.so by /bin/sh.
100 * correct check for notimeout() in wgetch().
101 * fix a sign-extension bug in infocmp's repair_acsc() function.
102 * change winnstr() to stop at the end of the line.
103 * make Ada95 demo_panels() example work.
104 * fix for adding a non-spacing character at the beginning of a line.
105 * fill in extended-color pair to make colors work for
106 wide-characters using extended-colors.
107 * improve refresh of window on top of multi-column characters,
108 taking into account split characters on left/right window
110 * modify win_wchnstr() to ensure that only a base cell is returned
111 for each multi-column character.
112 * improve waddch() and winsch() handling of EILSEQ from mbrtowc() by
113 using unctrl() to display illegal bytes rather than trying to
114 append further bytes to make up a valid sequence.
115 * restore curs_set() state after endwin()/refresh()
116 * modify keyname() to use "^X" form only if meta() has been called,
117 or if keyname() is called without initializing curses, e.g., via
118 initscr() or newterm().
119 * modify unctrl() to check codes in 128-255 range versus isprint().
120 If they are not printable, and locale was set, use a "M-" or "~"
122 * improve resizeterm() by moving ripped-off lines, and repainting
124 * modify form library to accept control characters such as newline
125 in set_field_buffer(), which is compatible with Solaris.
126 * use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc.,
127 to make those work properly with the --enable-ext-mouse
129 * correct some functions in Ada95 binding which were using return
130 value from C where none was returned.
131 * reviewed/fixed issues reported by Coverity and Klocwork tools.
137 --disable-big-strings
138 control whether static string tables are generated
139 as single large strings (to improve startup
140 performance), or as array of individual strings.
143 control whether shared libraries are relinked
144 (during install) when rpath is enabled.
146 --disable-tic-depends
147 make explicit whether tic library depends on
148 ncurses/ncursesw library.
151 override the configure script's check if the
152 filesystem supports mixed-case filenames. This
153 allows one to control how the terminal database
154 maps to the filesystem. For filesystems that do not
155 support mixed-case, the library uses generate
156 2-character (hexadecimal) codes for the lower-level
157 of the filesystem terminfo database
160 builds a different flavor of the ncurses library
161 (ncursest) which improves reentrant use of the
162 library by reducing global and static variables
163 (see the "--with-pthread" option for the threaded
166 --enable-weak-symbols
167 use weak-symbols for linking to the POSIX thread
168 library, and use the same soname for the ncurses
169 shared library as the normal library (caveat: the
170 ABI is for the threaded library, which makes global
171 data accessed via functions).
174 build with the POSIX thread library (tested with
175 AIX, Linux, FreeBSD, OpenBSD, HPUX, IRIX64,
179 build/install the tic-support functions in a
185 requires the wide-character configuration.
188 ignore option value "unsigned" is always added to
189 the type in curses.h; do the same for
193 build-fix for redefinition of strndup.
196 accepts a parameter which is the install-prefix of
197 a given Berkeley Database.
200 the $LIBS environment variable overrides the search
204 assumed when "--disable-database" is used.
206 * other configure/build issues:
207 + build-fixes for LynxOS
208 + modify shared-library rules to allow FreeBSD 3.x to use
210 + build-fix for FreeBSD "contemporary" TTY interface.
211 + build-fixes for AIX with libtool.
212 + build-fixes for Darwin and libtool.
213 + modify BeOS-specific ifdef's to build on Haiku.
214 + corrected gcc options for building shared libraries on
216 + change shared-library configuration for OpenBSD, make rpath
218 + build-fixes for using libutf8, e.g., on OpenBSD 3.7
219 + add "-e" option in ncurses/Makefile.in when generating
220 source-files to force earlier exit if the build environment
222 + add support for shared libraries for QNX.
223 + change delimiter in MKlib_gen.sh from '%' to '@', to avoid
224 substitution by IBM xlc to '#' as part of its extensions to
227 + rewrite wrapper for wcrtomb(), making it work on Solaris.
228 This is used in the form library to determine the length of
229 the buffer needed by field_buffer.
230 + add/use configure script macro CF_SIG_ATOMIC_T, use the
231 corresponding type for data manipulated by signal handlers.
232 + set locale in misc/ncurses-config.in since it uses a range
233 + disable GPM mouse support when $TERM does not happen to
234 contain "linux", since Gpm_Open() no longer limits its
235 assertion to terminals that it might handle, e.g., within
237 + reset mouse file-descriptor when unloading GPM library.
239 + update test programs to build/work with various UNIX curses
244 The ncurses package is fully compatible with SVr4 (System V Release 4)
246 * All 257 of the SVr4 calls have been implemented (and are
248 * Full support for SVr4 curses features including keyboard mapping,
249 color, forms-drawing with ACS characters, and automatic
250 recognition of keypad and function keys.
251 * An emulation of the SVr4 panels library, supporting a stack of
252 windows with backing store, is included.
253 * An emulation of the SVr4 menus library, supporting a uniform but
254 flexible interface for menu programming, is included.
255 * An emulation of the SVr4 form library, supporting data collection
256 through on-screen forms, is included.
257 * Binary terminfo entries generated by the ncurses tic(1)
258 implementation are bit-for-bit-compatible with the entry format
260 * The utilities have options to allow you to filter terminfo entries
261 for use with less capable curses/terminfo versions such as the
264 The ncurses package also has many useful extensions over SVr4:
265 * The API is 8-bit clean and base-level conformant with the X/OPEN
266 curses specification, XSI curses (that is, it implements all BASE
267 level features, and most EXTENDED features). It includes many
268 function calls not supported under SVr4 curses (but portability of
269 all calls is documented so you can use the SVr4 subset only).
270 * Unlike SVr3 curses, ncurses can write to the rightmost-bottommost
271 corner of the screen if your terminal has an insert-character
273 * Ada95 and C++ bindings.
274 * Support for mouse event reporting with X Window xterm and FreeBSD
275 and OS/2 console windows.
276 * Extended mouse support via Alessandro Rubini's gpm package.
277 * The function wresize() allows you to resize windows, preserving
279 * The function use_default_colors() allows you to use the terminal's
280 default colors for the default color pair, achieving the effect of
282 * The functions keyok() and define_key() allow you to better control
283 the use of function keys, e.g., disabling the ncurses KEY_MOUSE,
284 or by defining more than one control sequence to map to a given
286 * Support for 256-color terminals, such as modern xterm, when
287 configured using the --enable-ext-colors option.
288 * Support for 16-color terminals, such as aixterm and modern xterm.
289 * Better cursor-movement optimization. The package now features a
290 cursor-local-movement computation more efficient than either BSD's
292 * Super hardware scrolling support. The screen-update code
293 incorporates a novel, simple, and cheap algorithm that enables it
294 to make optimal use of hardware scrolling, line-insertion, and
295 line-deletion for screen-line movements. This algorithm is more
296 powerful than the 4.4BSD curses quickch() routine.
297 * Real support for terminals with the magic-cookie glitch. The
298 screen-update code will refrain from drawing a highlight if the
299 magic- cookie unattributed spaces required just before the
300 beginning and after the end would step on a non-space character.
301 It will automatically shift highlight boundaries when doing so
302 would make it possible to draw the highlight without changing the
303 visual appearance of the screen.
304 * It is possible to generate the library with a list of pre-loaded
305 fallback entries linked to it so that it can serve those terminal
306 types even when no terminfo tree or termcap file is accessible
307 (this may be useful for support of screen-oriented programs that
308 must run in single-user mode).
309 * The tic(1)/captoinfo utility provided with ncurses has the ability
310 to translate many termcaps from the XENIX, IBM and AT&T extension
312 * A BSD-like tset(1) utility is provided.
313 * The ncurses library and utilities will automatically read terminfo
314 entries from $HOME/.terminfo if it exists, and compile to that
315 directory if it exists and the user has no write access to the
316 system directory. This feature makes it easier for users to have
317 personal terminfo entries without giving up access to the system
319 * You may specify a path of directories to search for compiled
320 descriptions with the environment variable TERMINFO_DIRS (this
321 generalizes the feature provided by TERMINFO under stock System
323 * In terminfo source files, use capabilities may refer not just to
324 other entries in the same source file (as in System V) but also to
325 compiled entries in either the system terminfo directory or the
326 user's $HOME/.terminfo directory.
327 * A script (capconvert) is provided to help BSD users transition
328 from termcap to terminfo. It gathers the information in a TERMCAP
329 environment variable and/or a ~/.termcap local entries file and
330 converts it to an equivalent local terminfo tree under
332 * Automatic fallback to the /etc/termcap file can be compiled in
333 when it is not possible to build a terminfo tree. This feature is
334 neither fast nor cheap, you don't want to use it unless you have
336 * The table-of-entries utility toe makes it easy for users to see
337 exactly what terminal types are available on the system.
338 * The library meets the XSI requirement that every macro entry point
339 have a corresponding function which may be linked (and will be
340 prototype-checked) if the macro definition is disabled with
342 * An HTML "Introduction to Programming with NCURSES" document
343 provides a narrative introduction to the curses programming
348 Numerous bugs present in earlier versions have been fixed; the library
349 is far more reliable than it used to be. Bounds checking in many
350 `dangerous' entry points has been improved. The code is now type-safe
351 according to gcc -Wall. The library has been checked for malloc leaks
352 and arena corruption by the Purify memory-allocation tester.
354 The ncurses code has been tested with a wide variety of applications
355 including (versions starting with those noted):
358 Curses Development Kit
359 [4]http://invisible-island.net/cdk/
360 [5]http://www.vexus.ca/products/CDK/
364 [6]http://invisible-island.net/ded/
367 the underlying application used in Slackware's setup, and the
368 basis for similar applications on GNU/Linux.
369 [7]http://invisible-island.net/dialog/
372 the character-screen WWW browser
373 [8]http://lynx.isc.org/release/
377 [9]http://www.ibiblio.org/mc/
381 [10]http://www.mutt.org/
384 file-transfer utility
385 [11]http://www.ncftp.com/
388 New vi versions 1.50 are able to use ncurses versions 1.9.7 and
390 [12]http://www.bostic.com/vi/
393 Lynx-like info browser.
394 [13]https://alioth.debian.org/projects/pinfo/
397 newsreader, supporting color, MIME [14]http://www.tin.org/
399 as well as some that use ncurses for the terminfo support alone:
403 [15]http://alioth.debian.org/projects/minicom/
407 [16]http://invisible-island.net/vile/
409 The ncurses distribution includes a selection of test programs
410 (including a few games).
412 Who's Who and What's What
414 Zeyd Ben-Halim started it from a previous package pcurses, written by
415 Pavel Curtis. Eric S. Raymond continued development. Jürgen Pfeifer
416 wrote most of the form and menu libraries. Ongoing work is being done
417 by [17]Thomas Dickey. Thomas Dickey acts as the maintainer for the
418 Free Software Foundation, which holds the copyright on ncurses.
419 Contact the current maintainers at [18]bug-ncurses@gnu.org.
421 To join the ncurses mailing list, please write email to
422 bug-ncurses-request@gnu.org containing the line:
423 subscribe <name>@<host.domain>
425 This list is open to anyone interested in helping with the development
426 and testing of this package.
428 Beta versions of ncurses and patches to the current release are made
429 available at [19]ftp://invisible-island.net/ncurses/ .
433 * Extended-level XPG4 conformance, with internationalization
435 * Ports to more systems, including DOS and Windows.
437 We need people to help with these projects. If you are interested in
438 working on them, please join the ncurses list.
440 Other Related Resources
442 The distribution provides a newer version of the terminfo-format
443 terminal description file once maintained by [20]Eric Raymond . Unlike
444 the older version, the termcap and terminfo data are provided in the
445 same file, and provides several user-definable extensions beyond the
446 X/Open specification.
448 You can find lots of information on terminal-related topics not
449 covered in the terminfo file at [21]Richard Shuford's archive .
453 1. ftp://ftp.gnu.org/gnu/ncurses/
454 2. ftp://invisible-island.net/ncurses/
455 3. http://invisible-island.net/xterm/xterm.log.html#xterm_230
456 4. http://invisible-island.net/cdk/
457 5. http://www.vexus.ca/products/CDK/
458 6. http://invisible-island.net/ded/
459 7. http://invisible-island.net/dialog/
460 8. http://lynx.isc.org/release/
461 9. http://www.ibiblio.org/mc/
462 10. http://www.mutt.org/
463 11. http://www.ncftp.com/
464 12. http://www.bostic.com/vi/
465 13. https://alioth.debian.org/projects/pinfo/
466 14. http://www.tin.org/
467 15. http://alioth.debian.org/projects/minicom/
468 16. http://invisible-island.net/vile/
469 17. mailto:dickey@invisible-island.net
470 18. mailto:bug-ncurses@gnu.org
471 19. ftp://invisible-island.net/ncurses/
472 20. http://www.catb.org/~esr/terminfo/
473 21. http://www.cs.utk.edu/~shuford/terminal_index.html