4 The ncurses (new curses) library is a free software emulation of
5 curses in System V Release 4.0, and more. It uses terminfo format,
6 supports pads and color and multiple highlights and forms characters
7 and function-key mapping, and has all the other SYSV-curses
8 enhancements over BSD curses.
10 In mid-June 1995, the maintainer of 4.4BSD curses declared that he
11 considered 4.4BSD curses obsolete, and is encouraging the keepers of
12 Unix releases such as BSD/OS, freeBSD and netBSD to switch over to
15 The ncurses code was developed under GNU/Linux. It has been in use for
16 some time with OpenBSD as the system curses library, and on FreeBSD
17 and NetBSD as an external package. It should port easily to any
18 ANSI/POSIX-conforming UNIX. It has even been ported to OS/2 Warp!
20 The distribution includes the library and support utilities, including
21 a terminfo compiler tic(1), a decompiler infocmp(1), clear(1),
22 tput(1), tset(1), and a termcap conversion tool captoinfo(1). Full
23 manual pages are provided for the library and tools.
25 The ncurses distribution is available via anonymous FTP at the GNU
26 distribution site [1]ftp://ftp.gnu.org/pub/gnu/ncurses.
27 It is also available at [2]ftp://invisible-island.net/ncurses.
31 This release is designed to be upward compatible from ncurses 5.0 and
32 5.2; very few applications will require recompilation, depending on
33 the platform. These are the highlights from the change-log since
37 * change type for bool used in headers to NCURSES_BOOL, which
38 usually is the same as the compiler's definition for bool.
39 * add all but two functions for X/Open curses wide-character
40 support. These are only available if the library is configured
41 using the --enable-widec option. Missing functions are
44 * add environment variable $NCURSES_ASSUMED_COLORS to modify the
45 assume_default_colors() extension.
47 New features and improvements:
48 * Improved support for termcap applications:
49 + add logic to dump_entry.c to remove function-key definitions
50 that do not fit into the 1023-byte limit for generated
51 termcaps. This makes hds200 fit.
52 + modify tgetent() to check if exit_attribute_mode resets the
53 alternate character set, and if so, attempt to adjust the
54 copy of the termcap "me" string which it will return to
55 eliminate that part. In particular, 'screen' would lose track
56 of line-drawing characters.
57 + add check/fix to comp_parse.c to suppress warning about
58 missing acsc string. This happens in configurations where raw
59 termcap information is processed; tic already does this and
61 + add tic -A option to suppress capabilities which are
62 commented out when translating to termcap.
63 + modify logic in lib_baudrate.c for ospeed, for FreeBSD to
64 make it work properly for termcap applications (patch by
66 * add a call to _nc_keypad() in keypad() to accommodate applications
67 such as nvi, which use curses for output but not for input (fixes
68 Debian #131263, cf: 20011215).
69 * correct logic for COLORFGBG environment variable: if rxvt is
70 compiled with xpm support, the variable has three fields, making
71 it slightly incompatible with itself. In either case, the
72 background color is the last field.
75 * rewrote limit-checks in wscrl() and associated
76 _nc_scroll_window(), to ensure that if the parameter of wscrl() is
77 larger than the size of the scrolling region, then the scrolling
78 region will be cleared.
79 * modify tset to restore original I/O modes if an error is
80 encountered. Also modify to use buffered stderr consistently
81 rather than mixing with write().
82 * move calls to def_shell_mode() and def_prog_mode() before loop
83 with callbacks in lib_set_term.c, since the c++ demo otherwise
84 initialized the tty modes before saving them.
85 * modified wresize() to ensure that a failed realloc will not
86 corrupt the window structure, and to make subwindows fit within
88 * altered resizeterm() to avoid having it fail when a child window
89 cannot be resized because it would be larger than its parent.
90 * correct/improve logic to produce an exit status for errors in
91 tput, which did not exit with an error when told to put a string
92 not in the current terminfo entry.
93 * modify behavior of can_clear_with() so that if an application is
94 running in a non-bce terminals with default colors enabled, it
95 returns true, allowing the user to select/paste text without
96 picking up extraneous trailing blanks.
97 * add a check in relative_move() to guard against buffer overflow in
99 * add some limit/pointer checks to -S option of tputs.
100 * modify mvcur() to avoid emitting newline characters when nonl()
101 mode is set. Normally this is not a problem since the actual
102 terminal mode is set to suppress nl/crlf translations, however it
103 is useful to allow the caller to manipulate the terminal mode to
104 avoid staircasing effects after spawning a process which writes
105 messages (for lynx 2.8.4).
109 + modify check in --disable-overwrite option so that it is used
110 by default unless the --prefix/$prefix value is not /usr, in
111 attempt to work around packagers who do not read the INSTALL
113 + correct a typo in configure --enable-colorfgbg option, and
114 move it to the experimental section (cf: 20011208).
115 + modify configure script to allow building with termcap only,
116 or with fallbacks only. In this case, we do not build tic and
118 + modify run_tic.sh to check if the build is a cross-compile.
119 In that case, do not use the build's tic to install the
121 + modify c++/Makefile.in to accommodate archive programs that
122 are different for C++ than for C, and add cases for vendor's
123 C++ compilers on Solaris and IRIX.
124 + add several configure script options to aid with
125 cross-compiling: --with-build-cc, --with-build-cflags,
126 --with-build-ldflags, and --with-build-libs.
127 + add experimental --with-caps=XXX option to customize to
128 similar terminfo database formats such as AIX 4.x
129 + add configure option --with-ospeed to assist packagers in
130 transition to 5.3 change to ospeed type.
132 + implement a simple vsscanf() fallback function which uses the
133 %n conversion to help parse the input data.
134 + various fixes to build/work with different implementations of
136 + add/use macro to suppress sign-extension of char type on
137 platforms where this is a problem in ctype macros, e.g.,
139 + finish changes needed to build dll's on cygwin.
140 + add #undef's before possible redefinition of ERR and OK in
143 + modify ifdef's in write_entry.c to allow use of symbolic
144 links on platforms with no hard links, e.g., BeOS.
145 + modify _nc_write_entry() to allow for the possibility that
146 linking aliases on a filesystem that ignores case would not
147 succeed because the source and destination differ only by
148 case, e.g., NCR260VT300WPP0 on cygwin.
149 + modify logic in tic, toe, tput and tset which checks for
150 basename of argv[0] to work properly on systems such as OS/2
151 which have case-independent filenames and/or program
152 suffixes, e.g., ".ext".
156 The ncurses package is fully compatible with SVr4 (System V Release 4)
158 * All 257 of the SVr4 calls have been implemented (and are
160 * Full support for SVr4 curses features including keyboard mapping,
161 color, forms-drawing with ACS characters, and automatic
162 recognition of keypad and function keys.
163 * An emulation of the SVr4 panels library, supporting a stack of
164 windows with backing store, is included.
165 * An emulation of the SVr4 menus library, supporting a uniform but
166 flexible interface for menu programming, is included.
167 * An emulation of the SVr4 form library, supporting data collection
168 through on-screen forms, is included.
169 * Binary terminfo entries generated by the ncurses tic(1)
170 implementation are bit-for-bit-compatible with the entry format
172 * The utilities have options to allow you to filter terminfo entries
173 for use with less capable curses/terminfo versions such as the
176 The ncurses package also has many useful extensions over SVr4:
177 * The API is 8-bit clean and base-level conformant with the X/OPEN
178 curses specification, XSI curses (that is, it implements all BASE
179 level features, but not all EXTENDED features). Most
180 EXTENDED-level features not directly concerned with wide-character
181 support are implemented, including many function calls not
182 supported under SVr4 curses (but portability of all calls is
183 documented so you can use the SVr4 subset only).
184 * Unlike SVr3 curses, ncurses can write to the rightmost-bottommost
185 corner of the screen if your terminal has an insert-character
187 * Ada95 and C++ bindings.
188 * Support for mouse event reporting with X Window xterm and OS/2
190 * Extended mouse support via Alessandro Rubini's gpm package.
191 * The function wresize() allows you to resize windows, preserving
193 * The function use_default_colors() allows you to use the terminal's
194 default colors for the default color pair, achieving the effect of
196 * The functions keyok() and define_key() allow you to better control
197 the use of function keys, e.g., disabling the ncurses KEY_MOUSE,
198 or by defining more than one control sequence to map to a given
200 * Support for 16-color terminals, such as aixterm and XFree86 xterm.
201 * Better cursor-movement optimization. The package now features a
202 cursor-local-movement computation more efficient than either BSD's
204 * Super hardware scrolling support. The screen-update code
205 incorporates a novel, simple, and cheap algorithm that enables it
206 to make optimal use of hardware scrolling, line-insertion, and
207 line-deletion for screen-line movements. This algorithm is more
208 powerful than the 4.4BSD curses quickch() routine.
209 * Real support for terminals with the magic-cookie glitch. The
210 screen-update code will refrain from drawing a highlight if the
211 magic- cookie unattributed spaces required just before the
212 beginning and after the end would step on a non-space character.
213 It will automatically shift highlight boundaries when doing so
214 would make it possible to draw the highlight without changing the
215 visual appearance of the screen.
216 * It is possible to generate the library with a list of pre-loaded
217 fallback entries linked to it so that it can serve those terminal
218 types even when no terminfo tree or termcap file is accessible
219 (this may be useful for support of screen-oriented programs that
220 must run in single-user mode).
221 * The tic(1)/captoinfo utility provided with ncurses has the ability
222 to translate many termcaps from the XENIX, IBM and AT&T extension
224 * A BSD-like tset(1) utility is provided.
225 * The ncurses library and utilities will automatically read terminfo
226 entries from $HOME/.terminfo if it exists, and compile to that
227 directory if it exists and the user has no write access to the
228 system directory. This feature makes it easier for users to have
229 personal terminfo entries without giving up access to the system
231 * You may specify a path of directories to search for compiled
232 descriptions with the environment variable TERMINFO_DIRS (this
233 generalizes the feature provided by TERMINFO under stock System
235 * In terminfo source files, use capabilities may refer not just to
236 other entries in the same source file (as in System V) but also to
237 compiled entries in either the system terminfo directory or the
238 user's $HOME/.terminfo directory.
239 * A script (capconvert) is provided to help BSD users transition
240 from termcap to terminfo. It gathers the information in a TERMCAP
241 environment variable and/or a ~/.termcap local entries file and
242 converts it to an equivalent local terminfo tree under
244 * Automatic fallback to the /etc/termcap file can be compiled in
245 when it is not possible to build a terminfo tree. This feature is
246 neither fast nor cheap, you don't want to use it unless you have
248 * The table-of-entries utility toe makes it easy for users to see
249 exactly what terminal types are available on the system.
250 * The library meets the XSI requirement that every macro entry point
251 have a corresponding function which may be linked (and will be
252 prototype-checked) if the macro definition is disabled with
254 * An HTML "Introduction to Programming with NCURSES" document
255 provides a narrative introduction to the curses programming
260 Numerous bugs present in earlier versions have been fixed; the library
261 is far more reliable than it used to be. Bounds checking in many
262 `dangerous' entry points has been improved. The code is now type-safe
263 according to gcc -Wall. The library has been checked for malloc leaks
264 and arena corruption by the Purify memory-allocation tester.
266 The ncurses code has been tested with a wide variety of applications
267 including (versions starting with those noted):
270 Curses Development Kit
271 [3]http://invisible-island.net/cdk.
272 [4]http://www.vexus.ca/CDK.html
276 [5]http://invisible-island.net/ded.
279 the underlying application used in Slackware's setup, and the
280 basis for similar applications on GNU/Linux.
281 [6]http://invisible-island.net/dialog.
284 the character-screen WWW browser
285 [7]http://lynx.isc.org/release.
289 [8]www.gnome.org/mc/.
293 [9]http://www.mutt.org.
296 file-transfer utility
297 [10]http://www.ncftp.com.
300 New vi versions 1.50 are able to use ncurses versions 1.9.7 and
302 [11]http://www.bostic.com/vi/.
305 newsreader, supporting color, MIME
306 [12]http://www.tin.org.
310 [13]http://members.iinet.net.au/~yusuf/taper/.
313 Volks-Hypertext browser for the Jargon File
314 [14]http://www.bg.debian.org/Packages/unstable/text/vh.html.
316 as well as some that use ncurses for the terminfo support alone:
320 [15]http://www.pp.clinet.fi/~walker/minicom.html.
324 [16]http://invisible-island.net/vile.
326 The ncurses distribution includes a selection of test programs
327 (including a few games).
329 Who's Who and What's What
331 The original developers of ncurses are [17]Zeyd Ben-Halim and [18]Eric
332 S. Raymond. Ongoing work is being done by [19]Thomas Dickey and
333 [20]Jürgen Pfeifer. [21]Thomas Dickey acts as the maintainer for the
334 Free Software Foundation, which holds the copyright on ncurses.
335 Contact the current maintainers at [22]bug-ncurses@gnu.org.
337 To join the ncurses mailing list, please write email to
338 bug-ncurses-request@gnu.org containing the line:
339 subscribe <name>@<host.domain>
341 This list is open to anyone interested in helping with the development
342 and testing of this package.
344 Beta versions of ncurses and patches to the current release are made
345 available at [23]ftp://invisible-island.net/ncurses.
349 * Extended-level XPG4 conformance, with internationalization
351 * Ports to more systems, including DOS and Windows.
353 We need people to help with these projects. If you are interested in
354 working on them, please join the ncurses list.
356 Other Related Resources
358 The distribution includes and uses a version of the terminfo-format
359 terminal description file maintained by Eric Raymond.
360 [24]http://earthspace.net/~esr/terminfo.
362 You can find lots of information on terminal-related topics not
363 covered in the terminfo file at [25]Richard Shuford's archive.
367 1. ftp://ftp.gnu.org/pub/gnu/ncurses
368 2. ftp://invisible-island.net/ncurses
369 3. http://invisible-island.net/cdk/cdk.html
370 4. http://www.vexus.ca/CDK.html
371 5. http://invisible-island.net/ded/ded.html
372 6. http://invisible-island.net/dialog/dialog.html
373 7. http://lynx.isc.org/release/
374 8. file://localhost/usr/build/ncurses/ncurses-5.2-20021012/doc/html/www.gnome.org/mc/
375 9. http://www.mutt.org/
376 10. http://www.ncftp.com/
377 11. http://www.bostic.com/vi/
378 12. http://www.tin.org/
379 13. http://members.iinet.net.au/~yusuf/taper/
380 14. http://www.bg.debian.org/Packages/unstable/text/vh.html
381 15. http://www.pp.clinet.fi/~walker/minicom.html
382 16. http://invisible-island.net/vile/vile.html
383 17. mailto:zmbenhal@netcom.com
384 18. http://www.ccil.org/~esr/home.html
385 19. mailto:dickey@herndon4.his.com
386 20. http://www.familiepfeifer.de/Contact.aspx?Lang=en
387 21. mailto:dickey@herndon4.his.com
388 22. mailto:bug-ncurses@gnu.org
389 23. ftp://invisible-island.net/ncurses
390 24. http://earthspace.net/~esr/terminfo
391 25. http://www.cs.utk.edu/~shuford/terminal_index.html