1 2 Announcing ncurses 5.0 3 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. 9 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 13 ncurses. 14 15 The ncurses code was developed under GNU/Linux. It should port easily 16 to any ANSI/POSIX-conforming UNIX. It has even been ported to OS/2 17 Warp! 18 19 The distribution includes the library and support utilities, including 20 a terminfo compiler tic(1), a decompiler infocmp(1), clear(1), 21 tput(1), tset(1), and a termcap conversion tool captoinfo(1). Full 22 manual pages are provided for the library and tools. 23 24 The ncurses distribution is available via anonymous FTP at the GNU 25 distribution site [1]ftp://ftp.gnu.org/pub/gnu. It is also available 26 at [2]ftp://ftp.clark.net/pub/dickey/ncurses. 27 28 Release Notes 29 30 We decided to release ncurses as a new whole number release (5.0) 31 because it incorporates several interface changes, including some that 32 would invalidate existing shared libraries. These are the highlights 33 from the change-log since ncurses 4.2 release. 34 35 Interface changes: 36 * The principal source of changes to the interface comes from the 37 release of X/Open Curses in 1997. Earlier versions of ncurses (4.0 38 and before) were based on a draft version of the specification. 39 The release version adds parameters to some functions to support 40 the evolving internationalization of curses. These summarize the 41 impact: 42 + modified several prototypes to correspond with 1997 version 43 of X/Open Curses (affects ABI since developers have used 44 attr_get). 45 + corrected prototypes for slk_* functions, using chtype rather 46 than attr_t. 47 + the slk_attr_{set,off,on} functions need an additional void* 48 parameter according to XSI. 49 + correct macros for wattr_set, wattr_get, separate wattrset 50 macro from these to preserve behavior that allows attributes 51 to be combined with color pair numbers. 52 + reviewed/updated curses.h, term.h against X/Open Curses Issue 53 4 Version 2. This includes making some parameters 54 NCURSES_CONST rather than const, e.g., in termcap.h. 55 + reviewed/corrected macros in curses.h as per XSI document. 56 + add set_a_attributes and set_pglen_inch to terminfo 57 structure, as per XSI and Solaris 2.5. 58 * The newest version of the X/Open Curses is implemented on Solaris 59 and other vendor's systems. It adds new features to the terminfo 60 descriptions: 61 + implement tparm %l format. 62 + implement tparm printf-style width and precision for %s, %d, 63 %x, %o as per XSI. 64 * We made additional changes to reduce impact by future interface 65 changes: 66 + change key_names[] array to static since it is not part of 67 the curses interface. 68 + move macro winch to a function, to hide details of struct 69 ldat 70 * modify configure script to embed ABI in shared libraries for HP-UX 71 10.x (detailed request by Tim Mooney). 72 * modify configuration of shared libraries on Digital Unix so that 73 versioning is embedded in the library, rather than implied by 74 links (patch by Tim Mooney). 75 76 New features: 77 * enable sigwinch handler by default. 78 * turn on hashmap scrolling code by default 79 * improved support for termcap applications 80 + modify tput to accept termcap names as an alternative to 81 terminfo names. 82 + provide support for termcap PC variable by copying it from 83 terminfo data and using it as the padding character in tputs. 84 + provide support for termcap ospeed variable by copying it 85 from the internal cur_term member, and using ospeed as the 86 baudrate reference for the delay_output and tputs functions. 87 + change name-comparisons in lib_termcap to compare no more 88 than 2 characters. 89 + add configure option --enable-tcap-names, which essentially 90 allows users to define new capabilities as in termcap. 91 * add mouse support to ncurses menus. 92 * add mouse and dll support for OS/2 EMX 93 * modify terminfo parsing to accept octal and hexadecimal constants 94 * add configure option --enable-no-padding, to allow environment 95 variable $NCURSES_NO_PADDING to eliminate non-mandatory padding, 96 thereby making terminal emulators (e.g., for vt100) a little more 97 efficient. 98 * modify lib_color.c to eliminate dependency on orig_colors and 99 orig_pair, since SVr4 curses does not require these either, but 100 uses them when they are available. 101 * add -f option to infocmp and tic, which formats the terminfo 102 if/then/else/endif so that they are readable (with newlines and 103 tabs). 104 * modify tic to compile into %'char' form in preference to 105 %{number}, since that is a little more efficient. 106 107 Major bug fixes: 108 * modify lib_tstp.c to block SIGTTOU when handling SIGTSTP, fixes a 109 problem where ncurses applications which were run via a shell 110 script would hang when given a ^Z. Also, check if the terminal's 111 process group is consistent, i.e., a shell has not taken ownership 112 of it, before deciding to save the current terminal settings in 113 the SIGTSTP handler. 114 * suppress sc/rc capabilities from terminal description if they 115 appear in smcup/rmcup. This affects only scrolling optimization, 116 to fix a problem reported by several people with xterm's alternate 117 screen, though the problem is more general. 118 * modify relative_move and tputs to avoid an interaction with the 119 BSD-style padding. The relative_move function could produce a 120 string to replace on the screen which began with a numeric 121 character, which was then interpreted by tputs as padding. 122 * modify setupterm so that cancelled strings are treated the same as 123 absent strings, cancelled and absent booleans false (does not 124 affect tic, infocmp). 125 * modify lib_vidattr.c to allow for terminal types (e.g., 126 xterm-color) which may reset all attributes in the 'op' 127 capability, so that colors are set before turning on bold and 128 other attributes, but still after turning attributes off. 129 * use 'access()' to check if ncurses library should be permitted to 130 open or modify files with fopen/open/link/unlink/remove calls, in 131 case the calling application is running in setuid mode. 132 * correction to doupdate, for case where terminal does not support 133 insert/delete character. The logic did not check that there was a 134 difference in alignment of changes to old/new screens before 135 repainting the whole non-blank portion of the line. Modified to 136 fall through into logic that reduces by the portion which does not 137 differ. 138 139 Features of Ncurses 140 141 The ncurses package is fully compatible with SVr4 (System V Release 4) 142 curses: 143 144 * All 257 of the SVr4 calls have been implemented (and are 145 documented). 146 * Full support for SVr4 curses features including keyboard mapping, 147 color, forms-drawing with ACS characters, and automatic 148 recognition of keypad and function keys. 149 * An emulation of the SVr4 panels library, supporting a stack of 150 windows with backing store, is included. 151 * An emulation of the SVr4 menus library, supporting a uniform but 152 flexible interface for menu programming, is included. 153 * An emulation of the SVr4 form library, supporting data collection 154 through on-screen forms, is included. 155 * Binary terminfo entries generated by the ncurses tic(1) 156 implementation are bit-for-bit-compatible with the entry format 157 SVr4 curses uses. 158 * The utilities have options to allow you to filter terminfo entries 159 for use with less capable curses/terminfo versions such as the 160 HP/UX and AIX ports. 161 162 The ncurses package also has many useful extensions over SVr4: 163 164 * The API is 8-bit clean and base-level conformant with the X/OPEN 165 curses specification, XSI curses (that is, it implements all BASE 166 level features, but not all EXTENDED features). Most 167 EXTENDED-level features not directly concerned with wide-character 168 support are implemented, including many function calls not 169 supported under SVr4 curses (but portability of all calls is 170 documented so you can use the SVr4 subset only). 171 * Unlike SVr4 curses, ncurses can write to the rightmost-bottommost 172 corner of the screen if your terminal has an insert-character 173 capability. 174 * Ada95 and C++ bindings. 175 * Support for mouse event reporting with X Window xterm and OS/2 176 console windows. 177 * Extended mouse support via Alessandro Rubini's gpm package. 178 * The function wresize() allows you to resize windows, preserving 179 their data. 180 * The function use_default_colors() allows you to use the terminal's 181 default colors for the default color pair, achieving the effect of 182 transparent colors. 183 * The functions keyok() and define_key() allow you to better control 184 the use of function keys, e.g., disabling the ncurses KEY_MOUSE, 185 or by defining more than one control sequence to map to a given 186 key code. 187 * Support for 16-color terminals, such as aixterm and XFree86 xterm. 188 * Better cursor-movement optimization. The package now features a 189 cursor-local-movement computation more efficient than either BSD's 190 or System V's. 191 * Super hardware scrolling support. The screen-update code 192 incorporates a novel, simple, and cheap algorithm that enables it 193 to make optimal use of hardware scrolling, line-insertion, and 194 line-deletion for screen-line movements. This algorithm is more 195 powerful than the 4.4BSD curses quickch() routine. 196 * Real support for terminals with the magic-cookie glitch. The 197 screen-update code will refrain from drawing a highlight if the 198 magic- cookie unattributed spaces required just before the 199 beginning and after the end would step on a non-space character. 200 It will automatically shift highlight boundaries when doing so 201 would make it possible to draw the highlight without changing the 202 visual appearance of the screen. 203 * It is possible to generate the library with a list of pre-loaded 204 fallback entries linked to it so that it can serve those terminal 205 types even when no terminfo tree or termcap file is accessible 206 (this may be useful for support of screen-oriented programs that 207 must run in single-user mode). 208 * The tic(1)/captoinfo utility provided with ncurses has the ability 209 to translate many termcaps from the XENIX, IBM and AT&T extension 210 sets. 211 * A BSD-like tset(1) utility is provided. 212 * The ncurses library and utilities will automatically read terminfo 213 entries from $HOME/.terminfo if it exists, and compile to that 214 directory if it exists and the user has no write access to the 215 system directory. This feature makes it easier for users to have 216 personal terminfo entries without giving up access to the system 217 terminfo directory. 218 * You may specify a path of directories to search for compiled 219 descriptions with the environment variable TERMINFO_DIRS (this 220 generalizes the feature provided by TERMINFO under stock System 221 V.) 222 * In terminfo source files, use capabilities may refer not just to 223 other entries in the same source file (as in System V) but also to 224 compiled entries in either the system terminfo directory or the 225 user's $HOME/.terminfo directory. 226 * A script (capconvert) is provided to help BSD users transition 227 from termcap to terminfo. It gathers the information in a TERMCAP 228 environment variable and/or a ~/.termcap local entries file and 229 converts it to an equivalent local terminfo tree under 230 $HOME/.terminfo. 231 * Automatic fallback to the /etc/termcap file can be compiled in 232 when it is not possible to build a terminfo tree. This feature is 233 neither fast nor cheap, you don't want to use it unless you have 234 to, but it's there. 235 * The table-of-entries utility toe makes it easy for users to see 236 exactly what terminal types are available on the system. 237 * The library meets the XSI requirement that every macro entry point 238 have a corresponding function which may be linked (and will be 239 prototype-checked) if the macro definition is disabled with 240 #undef. 241 * An HTML "Introduction to Programming with NCURSES" document 242 provides a narrative introduction to the curses programming 243 interface. 244 245 State of the Package 246 247 Numerous bugs present in earlier versions have been fixed; the library 248 is far more reliable than it used to be. Bounds checking in many 249 `dangerous' entry points has been improved. The code is now type-safe 250 according to gcc -Wall. The library has been checked for malloc leaks 251 and arena corruption by the Purify memory-allocation tester. 252 253 The ncurses code has been tested with a wide variety of applications 254 including (versions starting with those noted): 255 256 ded 257 directory-editor [3]ftp://ftp.clark.net/pub/dickey/ded. 258 259 dialog 260 the underlying application used in Slackware's setup, and the 261 basis for similar applications on GNU/Linux. 262 263 lynx-2.7 264 the character-screen WWW browser 265 266 Midnight Commander 4.1 267 file manager 268 269 mutt 0.88 270 mail utility 271 272 ncftp 2.0 273 file-transfer utility 274 275 nvi 276 New vi versions 1.50 are able to use ncurses versions 1.9.7 and 277 later. 278 279 taper 280 tape archive utility 281 282 vh-1.6 283 Volks-Hypertext browser for the Jargon File 284 285 as well as some that use ncurses for the terminfo support alone: 286 287 minicom-1.75 288 terminal emulator 289 290 tin-unoff 291 tin 1.4 newsreader, supporting color, MIME 292 [4]ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff. 293 294 vile 295 vi-like-emacs [5]ftp://ftp.clark.net/pub/dickey/vile. 296 297 The ncurses distribution includes a selection of test programs 298 (including a few games). 299 300Who's Who and What's What 301 302 The original developers of ncurses are [6]Zeyd Ben-Halim and [7]Eric 303 S. Raymond. Ongoing work is being done by [8]Thomas Dickey and 304 [9]J�rgen Pfeifer. [10]Florian La Roche acts as the maintainer for the 305 Free Software Foundation, which holds the copyright on ncurses. 306 Contact the current maintainers at [11]bug-ncurses@gnu.org. 307 308 To join the ncurses mailing list, please write email to 309 bug-ncurses-request@gnu.org containing the line: 310 subscribe <name>@<host.domain> 311 312 This list is open to anyone interested in helping with the development 313 and testing of this package. 314 315 Beta versions of ncurses and patches to the current release are made 316 available at [12]ftp://ftp.clark.net/pub/dickey/ncurses. 317 318Future Plans 319 320 * Extended-level XPG4 conformance, with internationalization 321 support. 322 * Ports to more systems, including DOS and Windows. 323 324 We need people to help with these projects. If you are interested in 325 working on them, please join the ncurses list. 326 327Other Related Resources 328 329 The distribution includes and uses a version of the terminfo-format 330 terminal description file maintained by Eric Raymond. 331 [13]http://earthspace.net/~esr/terminfo. 332 333 You can find lots of information on terminal-related topics not 334 covered in the terminfo file at [14]Richard Shuford's archive. 335 336References 337 338 1. ftp://ftp.gnu.org/pub/gnu 339 2. ftp://ftp.clark.net/pub/dickey/ncurses 340 3. ftp://ftp.clark.net/pub/dickey/ded 341 4. ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff 342 5. ftp://ftp.clark.net/pub/dickey/vile 343 6. mailto:zmbenhal@netcom.com 344 7. http://www.ccil.org/~esr/home.html 345 8. mailto:dickey@clark.net 346 9. mailto:juergen.pfeifer@gmx.net 347 10. mailto:florian@gnu.org 348 11. mailto:bug-ncurses@gnu.org 349 12. ftp://ftp.clark.net/pub/dickey/ncurses 350 13. http://earthspace.net/~esr/terminfo 351 14. http://www.cs.utk.edu/~shuford/terminal_index.html 352