1-- $Id: INSTALL,v 1.47 2000/11/05 01:57:24 tom Exp $ 2--------------------------------------------------------------------- 3 How to install Ncurses/Terminfo on your system 4--------------------------------------------------------------------- 5 6 ************************************************************ 7 * READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. * 8 ************************************************************ 9 10You should be reading the file INSTALL in a directory called ncurses-d.d, where 11d.d is the current version number. There should be several subdirectories, 12including `c++', `form', `man', `menu', 'misc', `ncurses', `panel', `progs', 13and `test'. See the README file for a roadmap to the package. 14 15If you are a Linux or FreeBSD or NetBSD distribution integrator or packager, 16please read and act on the section titled IF YOU ARE A SYSTEM INTEGRATOR 17below. 18 19If you are converting from BSD curses and do not have root access, be sure 20to read the BSD CONVERSION NOTES section below. 21 22If you are using a version of XFree86 xterm older than 3.1.2F, see the section 23on RECENT XTERM VERSIONS below. 24 25If you are trying to build GNU Emacs using ncurses for terminal support, 26read the USING NCURSES WITH EMACS section below. 27 28If you are trying to build applications using gpm with ncurses, 29read the USING NCURSES WITH GPM section below. 30 31If you are running over the Andrew File System see the note below on 32USING NCURSES WITH AFS. 33 34If you are cross-compiling, see the note below on BUILDING NCURSES WITH A 35CROSS-COMPILER. 36 37If you want to build the Ada95 binding, go to the Ada95 directory and 38follow the instructions there. The Ada95 binding is not covered below. 39 40If you are using anything but (a) Linux, or (b) one of the 4.4BSD-based 41i386 Unixes, go read the Portability section in the TO-DO file before you 42do anything else. 43 44 45REQUIREMENTS: 46------------ 47 48You will need the following in order to build and install ncurses under UNIX: 49 50 * ANSI C compiler (gcc is recommended) 51 * sh (bash will do) 52 * awk (mawk or gawk will do) 53 * sed 54 * BSD or System V style install (a script is enclosed) 55 56Ncurses has been also built in the OS/2 EMX environment. 57 58 59INSTALLATION PROCEDURE: 60---------------------- 61 621. First, decide whether you want ncurses to replace your existing library (in 63 which case you'll need super-user privileges) or be installed in parallel 64 with it. 65 66 The --prefix option to configure changes the root directory for installing 67 ncurses. The default is in subdirectories of /usr/local. Use 68 --prefix=/usr to replace your default curses distribution. This is the 69 default for Linux and BSD/OS users. 70 71 The package gets installed beneath the --prefix directory as follows: 72 73 In $(prefix)/bin: tic, infocmp, captoinfo, tset, 74 reset, clear, tput, toe 75 In $(prefix)/lib: libncurses*.* libcurses.a 76 In $(prefix)/share/terminfo: compiled terminal descriptions 77 In $(prefix)/include: C header files 78 Under $(prefix)/man: the manual pages 79 80 Note however that the configure script attempts to locate previous 81 installation of ncurses, and will set the default prefix according to where 82 it finds the ncurses headers. 83 842. Type `./configure' in the top-level directory of the distribution to 85 configure ncurses for your operating system and create the Makefiles. 86 Besides --prefix, various configuration options are available to customize 87 the installation; use `./configure --help' to list the available options. 88 89 If your operating system is not supported, read the PORTABILITY section in 90 the file ncurses/README for information on how to create a configuration 91 file for your system. 92 93 The `configure' script generates makefile rules for one or more object 94 models and their associated libraries: 95 96 libncurses.a (normal) 97 98 libcurses.a (normal, a link to libncurses.a) 99 This gets left out if you configure with --disable-overwrite. 100 101 libncurses.so (shared) 102 103 libncurses_g.a (debug) 104 105 libncurses_p.a (profile) 106 107 libncurses.la (libtool) 108 109 If you do not specify any models, the normal and debug libraries will be 110 configured. Typing `configure' with no arguments is equivalent to: 111 112 ./configure --with-normal --with-debug --enable-overwrite 113 114 Typing 115 116 ./configure --with-shared 117 118 makes the shared libraries the default, resulting in 119 120 ./configure --with-shared --with-normal --with-debug --enable-overwrite 121 122 If you want only shared libraries, type 123 124 ./configure --with-shared --without-normal --without-debug 125 126 Rules for generating shared libraries are highly dependent upon the choice 127 of host system and compiler. We've been testing shared libraries on Linux 128 and SunOS with gcc, but more work needs to be done to make shared libraries 129 work on other systems. 130 131 If you have libtool installed, you can type 132 133 ./configure --with-libtool 134 135 to generate the appropriate static and/or shared libraries for your 136 platform using libtool. 137 138 You can make curses and terminfo fall back to an existing file of termcap 139 definitions by configuring with --enable-termcap. If you do this, the 140 library will search /etc/termcap before the terminfo database, and will 141 also interpret the contents of the TERM environment variable. See the 142 section BSD CONVERSION NOTES below. 143 1443. Type `make'. Ignore any warnings, no error messages should be produced. 145 This should compile the ncurses library, the terminfo compiler tic(1), 146 captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1) 147 programs (see the manual pages for explanation of what they do), some test 148 programs, and the panels, menus, and forms libraries. 149 1504. Run ncurses and several other test programs in the test directory to 151 verify that ncurses functions correctly before doing an install that 152 may overwrite system files. Read the file test/README for details on 153 the test programs. 154 155 NOTE: You must have installed the terminfo database, or set the 156 environment variable $TERMINFO to point to a SVr4-compatible terminfo 157 database before running the test programs. Not all vendors' terminfo 158 databases are SVr4-compatible, but most seem to be. Exceptions include 159 DEC's Digital Unix (formerly known as OSF/1). 160 161 The ncurses program is designed specifically to test the ncurses library. 162 You can use it to verify that the screen highlights work correctly, that 163 cursor addressing and window scrolling works OK, etc. 164 1655. Once you've tested, you can type `make install' to install libraries, 166 the programs, the terminfo database and the manual pages. Alternately, you 167 can type `make install' in each directory you want to install. In the 168 top-level directory, you can do a partial install using these commands: 169 170 'make install.progs' installs tic, infocmp, etc... 171 'make install.includes' installs the headers. 172 'make install.libs' installs the libraries (and the headers). 173 'make install.data' installs the terminfo data. (Note: `tic' must 174 be installed before the terminfo data can be 175 compiled). 176 'make install.man' installs the manual pages. 177 178 ############################################################################ 179 # CAVEAT EMPTOR: `install.data' run as root will NUKE any existing # 180 # terminfo database. If you have any custom or unusual entries SAVE them # 181 # before you install ncurses. I have a file called terminfo.custom for # 182 # this purpose. Don't forget to run tic on the file once you're done. # 183 ############################################################################ 184 185 The terminfo(5) manual page must be preprocessed with tbl(1) before 186 being formatted by nroff(1). Modern man(1) implementations tend to do 187 this by default, but you may want to look at your version's manual page 188 to be sure. You may also install the manual pages after preprocessing 189 with tbl(1) by specifying the configure option --with-manpage-tbl. 190 191 If the system already has a curses library that you need to keep using 192 for some bizarre binary-compatibility reason, you'll need to distinguish 193 between it and ncurses. If ncurses is installed outside the standard 194 directories (/usr/include and /usr/lib) then all your users will need 195 to use the -I option to compile programs and -L to link them. 196 197 If you have BSD curses installed in your system and you accidentally 198 compile using its curses.h you'll end up with a large number of 199 undefined symbols at link time. _waddbytes is one of them. 200 201 IF YOU DO NOT HAVE ROOT: Change directory to the `progs' subdirectory 202 and run the `capconvert' script. This script will deduce various things 203 about your environment and use them to build you a private terminfo tree, 204 so you can use ncurses applications. 205 206 If more than one user at your site does this, the space for the duplicate 207 trees is wasted. Try to get your site administrators to install a system- 208 wide terminfo tree instead. 209 210 See the BSD CONVERSION NOTES section below for a few more details. 211 2126. The c++ directory has C++ classes that are built on top of ncurses and 213 panels. You must have c++ (and its libraries) installed before you can 214 compile and run the demo. 215 216 Use --without-cxx-binding to tell configure to not build the C++ bindings 217 and demo. 218 219 If you do not have C++, you must use the --without-cxx option to tell 220 the configure script to not attempt to determine the type of 'bool' 221 which may be supported by C++. IF YOU USE THIS OPTION, BE ADVISED THAT 222 YOU MAY NOT BE ABLE TO COMPILE (OR RUN) NCURSES APPLICATIONS WITH C++. 223 2247. If you're running an older Linux, you must either (a) tell Linux that the 225 console terminal type is `linux' or (b) make a link to or copy of the 226 linux entry in the appropriate place under your terminfo directory, named 227 `console'. All 1.3 and many 1.2 distributions (including Yggdrasil and 228 Red Hat) already have the console type set to `linux'. 229 230 The way to change the wired-in console type depends on the configuration 231 of your system. This may involve editing /etc/inittab, /etc/ttytype, 232 /etc/profile and other such files. 233 234 Warning: this is not for the fainthearted, if you mess up your console 235 getty entries you can make your system unusable! However, if you are 236 a distribution maker, this is the right thing to do (see the note for 237 integrators near the end of this file). 238 239 The easier way is to link or copy l/linux to c/console under your terminfo 240 directory. Note: this will go away next time you do `make install.data' 241 and you'll have to redo it. There is no need to have entries for all 242 possible screen sizes, ncurses will figure out the size automatically. 243 244 245SUMMARY OF CONFIGURE OPTIONS: 246---------------------------- 247 248 The configure script provides a short list of its options when you type 249 250 ./configure --help 251 252 The --help and several options are common to all configure scripts that are 253 generated with autoconf. Those are all listed before the line 254 255 --enable and --with options recognized: 256 257 The other options are specific to this package. We list them in alphabetic 258 order. 259 260 --disable-assumed-color 261 With ncurses 5.1, we introduced a new function, assume_default_colors() 262 which allows applications to specify what the default foreground and 263 background color are assumed to be. Most color applications use 264 full-screen color; but a few do not color the background. While the 265 assumed values can be overridden by invoking assume_default_colors(), 266 you may find it useful to set the assumed values to the pre-5.1 267 convention, using this configure option. 268 269 --disable-big-core 270 Assume machine has little memory. The configure script attempts to 271 determine if your machine has enough memory (about 6Mb) to compile the 272 terminfo database without writing portions to disk. Some allocators 273 return deceptive results, so you may have to override the configure 274 script. Or you may be building tic for a smaller machine. 275 276 --disable-database 277 Use only built-in data. The ncurses libraries normally read terminfo 278 and termcap data from disk. You can configure ncurses to have a 279 built-in database, aka "fallback" entries. Embedded applications may 280 have no need for an external database. 281 282 --disable-ext-funcs 283 Disable function-extensions. Configure ncurses without the functions 284 that are not specified by XSI. See ncurses/modules for the exact 285 list of library modules that would be suppressed. 286 287 --disable-hashmap 288 Compile without hashmap scrolling-optimization code. This algorithm is 289 the default. 290 291 --disable-leaks 292 For testing, compile-in code that frees memory that normally would not 293 be freed, to simplify analysis of memory-leaks. 294 295 --disable-macros 296 For testing, use functions rather than macros. The program will run 297 more slowly, but it is simpler to debug. This makes a header file 298 "nomacros.h". See also the --enable-expanded option. 299 300 --disable-overwrite 301 If you are installing ncurses on a system which contains another 302 development version of curses, or which could be confused by the loader 303 for another version, we recommend that you leave out the link to 304 -lcurses. The ncurses library is always available as -lncurses. 305 Disabling overwrite also causes the ncurses header files to be 306 installed into a subdirectory, e.g., /usr/local/include/ncurses, 307 rather than the include directory. This makes it simpler to avoid 308 compile-time conflicts with other versions of curses.h 309 310 --disable-root-environ 311 Compile with environment restriction, so certain environment variables 312 are not available when running as root, or via a setuid/setgid 313 application. These are (for example $TERMINFO) those that allow the 314 search path for the terminfo or termcap entry to be customized. 315 316 --disable-scroll-hints 317 Compile without scroll-hints code. This option is ignored when 318 hashmap scrolling is configured, which is the default. 319 320 --enable-add-ons=DIR... 321 This is used to check if this package is a glibc add-on. This is used 322 only by the glibc makefiles. 323 324 --enable-assertions 325 For testing, compile-in assertion code. This is used only for a few 326 places where ncurses cannot easily recover by returning an error code. 327 328 --enable-broken_linker 329 A few platforms have what we consider a broken linker: it cannot link 330 objects from an archive solely by referring to data objects in those 331 files, but requires a function reference. This configure option 332 changes several data references to functions to work around this 333 problem. 334 335 NOTE: With ncurses 5.1, this may not be necessary, since we are 336 told that some linkers interpret uninitialized global data as a 337 different type of reference which behaves as described above. We have 338 explicitly initialized all of the global data to work around the 339 problem. 340 341 --enable-bsdpad 342 Recognize BSD-style prefix padding. Some ancient BSD programs (such as 343 nethack) call tputs("50") to implement delays. 344 345 --enable-colorfgbg 346 Compile with experimental $COLORFGBG code. That environment variable 347 is set by some terminal emulators as a hint to applications, by 348 advertising the default foreground and background colors. During 349 initialization, ncurses sets color pair 0 to match this. 350 351 --enable-const 352 The curses interface as documented in XSI is rather old, in fact 353 including features that precede ANSI C. The prototypes generally do 354 not make effective use of "const". When using stricter compilers (or 355 gcc with appropriate warnings), you may see warnings about the mismatch 356 between const and non-const data. We provide a configure option which 357 changes the interfaces to use const - quieting these warnings and 358 reflecting the actual use of the parameters more closely. The ncurses 359 library uses the symbol NCURSES_CONST for these instances of const, 360 and if you have asked for compiler warnings, will add gcc's const-qual 361 warning. There will still be warnings due to subtle inconsistencies 362 in the interface, but at a lower level. 363 364 NOTE: configuring ncurses with this option may detract from the 365 portability of your applications by encouraging you to use const in 366 places where the XSI curses interface would not allow them. Similar 367 issues arise when porting to SVr4 curses, which uses const in even 368 fewer places. 369 370 --enable-echo 371 Use the option --disable-echo to make the build-log less verbose by 372 suppressing the display of the compile and link commands. This makes 373 it easier to see the compiler warnings. (You can always use "make -n" 374 to see the options that are used). 375 376 --enable-expanded 377 For testing, generate functions for certain macros to make them visible 378 as such to the debugger. See also the --disable-macros option. 379 380 --enable-getcap 381 Use the 4.4BSD getcap code if available, or a bundled version of it to 382 fetch termcap entries. Entries read in this way cannot use (make 383 cross-references to) the terminfo tree, but it is faster than reading 384 /etc/termcap. 385 386 --enable-getcap-cache 387 Cache translated termcaps under the directory $HOME/.terminfo 388 389 NOTE: this sounds good - it makes ncurses run faster the second time. 390 But look where the data comes from - an /etc/termcap containing lots of 391 entries that are not up to date. If you configure with this option and 392 forget to install the terminfo database before running an ncurses 393 application, you will end up with a hidden terminfo database that 394 generally does not support color and will miss some function keys. 395 396 --enable-hard-tabs 397 Compile-in cursor-optimization code that uses hard-tabs. We would make 398 this a standard feature except for the concern that the terminfo entry 399 may not be accurate, or that your stty settings have disabled the use 400 of tabs. 401 402 --enable-no-padding 403 Compile-in support for the $NCURSES_NO_PADDING environment variable, 404 which allows you to suppress the effect of non-mandatory padding in 405 terminfo entries. This is the default, unless you have disabled the 406 extended functions. 407 408 --enable-rpath 409 Use rpath option when generating shared libraries, and with some 410 restrictions when linking the corresponding programs. This applies 411 mainly to systems using the GNU linker (read the manpage). 412 413 --enable-safe-sprintf 414 Compile with experimental safe-sprintf code. You may consider using 415 this if you are building ncurses for a system that has neither 416 vsnprintf() or vsprintf(). It is slow, however. 417 418 --enable-sigwinch 419 Compile support for ncurses' SIGWINCH handler. If your application has 420 its own SIGWINCH handler, ncurses will not use its own. The ncurses 421 handler causes wgetch() to return KEY_RESIZE when the screen-size 422 changes. This option is the default, unless you have disabled the 423 extended functions. 424 425 --enable-symlinks 426 If your system supports symbolic links, make tic use symbolic links 427 rather than hard links to save diskspace when writing aliases in the 428 terminfo database. 429 430 --enable-tcap-names 431 Compile-in support for user-definable terminal capabilities. Use the 432 -x option of tic and infocmp to treat unrecognized terminal 433 capabilities as user-defined strings. This option is the default, 434 unless you have disabled the extended functions. 435 436 --enable-termcap 437 Compile in support for reading terminal descriptions from termcap if no 438 match is found in the terminfo database. See also the --enable-getcap 439 and --enable-getcap-cache options. 440 441 --enable-warnings 442 Turn on GCC compiler warnings. There should be only a few. 443 444 --enable-widec 445 Compile with experimental wide-character code. This makes a different 446 version of the libraries (e.g., libncursesw.so), which stores 447 characters in 16-bits. We provide a simple UTF-8 driver and test 448 program to use this feature with terminals that can display UTF-8. 449 450 NOTE: applications compiled with this configuration are not compatible 451 with those built for 8-bit characters. You cannot simply make a 452 symbolic link to equate libncurses.so with libncursesw.so 453 454 --enable-xmc-glitch 455 Compile-in support experimental xmc (magic cookie) code. 456 457 --with-ada-compiler=CMD 458 Specify the Ada95 compiler command (default "gnatmake") 459 460 --with-ada-include=DIR 461 Tell where to install the Ada includes (default: 462 PREFIX/lib/ada/adainclude) 463 464 --with-ada-objects=DIR 465 Tell where to install the Ada objects (default: PREFIX/lib/ada/adalib) 466 467 --with-database=XXX 468 Specify the terminfo source file to install. Usually you will wish 469 to install ncurses' default (misc/terminfo.src). Certain systems 470 have special requirements, e.g, OS/2 EMX has a customized terminfo 471 source file. 472 473 --with-dbmalloc 474 For testing, compile and link with Conor Cahill's dbmalloc library. 475 476 --with-debug 477 Generate debug-libraries (default). These are named by adding "_g" 478 to the root, e.g., libncurses_g.a 479 480 --with-default-terminfo-dir=XXX 481 Specify the default terminfo database directory. This is normally 482 DATADIR/terminfo, e.g., /usr/share/terminfo. 483 484 --with-develop 485 Enable experimental/development options. This does not count those 486 that change the interface, such as --enable-widec. 487 488 --with-dmalloc 489 For testing, compile and link with Gray Watson's dmalloc library. 490 491 --with-fallbacks=XXX 492 Specify a list of fallback terminal descriptions which will be 493 compiled into the ncurses library. See CONFIGURING FALLBACK ENTRIES. 494 495 --with-gpm 496 use Alessandro Rubini's GPM library to provide mouse support on the 497 Linux console. 498 499 --with-install-prefix=XXX 500 Allows you to specify an alternate location for installing ncurses 501 after building it. The value you specify is prepended to the "real" 502 install location. This simplifies making binary packages. 503 504 NOTE: a few systems build shared libraries with fixed pathnames; this 505 option probably will not work for those configurations. 506 507 --with-libtool 508 Generate libraries with libtool. If this option is selected, then 509 it overrides all other library model specifications. 510 511 --with-manpage-format=XXX 512 Tell the configure script how you would like to install man-pages. The 513 option value must be one of these: gzip, compress, BSDI, normal, 514 formatted. If you do not give this option, the configure script 515 attempts to determine which is the case. 516 517 --with-manpage-renames=XXX 518 Tell the configure script that you wish to rename the manpages while 519 installing. Currently the only distribution which does this is 520 the Linux Debian. The option value specifies the name of a file 521 that lists the renamed files, e.g., $srcdir/man/man_db.renames 522 523 --with-manpage-symlinks 524 Tell the configure script that you wish to make symbolic links in the 525 man-directory for aliases to the man-pages. This is the default, but 526 can be disabled for systems that provide this automatically. Doing 527 this on systems that do not support symbolic links will result in 528 copying the man-page for each alias. 529 530 --with-manpage-tbl 531 Tell the configure script that you with to preprocess the manpages 532 by running them through tbl to generate tables understandable by 533 nroff. 534 535 --with-ospeed=TYPE 536 Override type of ospeed variable, which is part of the termcap 537 compatibility interface. In termcap, this is a 'short', which works 538 for a wide range of baudrates because ospeed is not the actual speed 539 but the encoded value, e.g., B9600 would be a small number such as 13. 540 However the encoding scheme originally allowed for values "only" up to 541 38400bd. A newer set of definitions past 38400bd is not encoded as 542 compactly, and is not guaranteed to fit into a short (see the function 543 cfgetospeed(), which returns a speed_t for this reason). In practice, 544 applications that required knowledge of the ospeed variable, i.e., 545 those using termcap, do not use the higher speeds. Your application 546 (or system, in general) may or may not. 547 548 --with-normal 549 Generate normal (i.e., static) libraries (default). 550 551 --with-profile 552 Generate profile-libraries These are named by adding "_p" to the root, 553 e.g., libncurses_p.a 554 555 --with-rcs-ids 556 Compile-in RCS identifiers. Most of the C files have an identifier. 557 558 --with-shared 559 Generate shared-libraries. The names given depend on the system for 560 which you are building, typically using a ".so" suffix, along with 561 symbolic links that refer to the release version. 562 563 NOTE: Unless you override the configure script by setting the $CFLAGS 564 environment variable, these will not be built with the -g debugging 565 option. 566 567 --with-shlib-version=XXX 568 Specify whether to use the release or ABI version for shared libraries. 569 This is normally chosen automatically based on the type of system 570 which you are building on. We use it for testing the configure script. 571 572 --with-system-type=XXX 573 For testing, override the derived host system-type which is used to 574 decide things such as the linker commands used to build shared 575 libraries. This is normally chosen automatically based on the type of 576 system which you are building on. We use it for testing the configure 577 script. 578 579 --with-terminfo-dirs=XXX 580 Specify a search-list of terminfo directories which will be compiled 581 into the ncurses library (default: DATADIR/terminfo) 582 583 --with-termlib 584 When building the ncurses library, organize this as two parts: the 585 curses library (libncurses) and the low-level terminfo library 586 (libtinfo). This is done to accommodate applications that use only 587 the latter. The terminfo library is about half the size of the total. 588 589 --without-ada 590 Suppress the configure script's check for Ada95, do not build the 591 Ada95 binding and related demo. 592 593 --without-curses-h 594 Don't install the ncurses header with the name "curses.h". Rather, 595 install as "ncurses.h" and modify the installed headers and manpages 596 accordingly. 597 598 --without-cxx 599 XSI curses declares "bool" as part of the interface. C++ also declares 600 "bool". Neither specifies the size and type of booleans, but both 601 insist on the same name. We chose to accommodate this by making the 602 configure script check for the size and type (e.g., unsigned or signed) 603 that your C++ compiler uses for booleans. If you do not wish to use 604 ncurses with C++, use this option to tell the configure script to not 605 adjust ncurses bool to match C++. 606 607 --without-cxx-binding 608 Suppress the configure script's check for C++, do not build the 609 C++ binding and related demo. 610 611 --without-progs 612 Tell the configure script to suppress the build of ncurses' application 613 programs (e.g., tic). The test applications will still be built if you 614 type "make", though not if you simply do "make install". 615 616 617COMPATIBILITY WITH OLDER VERSIONS OF NCURSES: 618-------------------------------------------- 619 620 Because ncurses implements the X/Open Curses Specification, its interface 621 is fairly stable. That does not mean the interface does not change. 622 Changes are made to the documented interfaces when we find differences 623 between ncurses and X/Open or implementations which they certify (such as 624 Solaris). We add extensions to those interfaces to solve problems not 625 addressed by the original curses design, but those must not conflict with 626 the X/Open documentation. 627 628 Here are some of the major interface changes, and related problems which 629 you may encounter when building a system with different versions of 630 ncurses: 631 632 5.2 (October 21, 2000) 633 Interface changes: 634 635 + revert termcap ospeed variable to 'short' (see discussion of the 636 --with-ospeed configure option). 637 638 5.1 (July 8, 2000) 639 Interface changes: 640 641 + made the extended terminal capabilities 642 (configure --enable-tcap-names) a standard feature. This should 643 be transparent to applications that do not require it. 644 645 + removed the trace() function and related trace support from the 646 production library. 647 648 + modified curses.h.in, undef'ing some symbols to avoid conflict 649 with C++ STL. 650 651 Added extensions: assume_default_colors(). 652 653 5.0 (October 23, 1999) 654 Interface changes: 655 656 + implemented the wcolor_set() and slk_color() functions. 657 658 + move macro winch to a function, to hide details of struct ldat 659 660 + corrected prototypes for slk_* functions, using chtype rather than 661 attr_t. 662 663 + the slk_attr_{set,off,on} functions need an additional void* 664 parameter according to XSI. 665 666 + modified several prototypes to correspond with 1997 version of X/Open 667 Curses: [w]attr_get(), [w]attr_set(), border_set() have different 668 parameters. Some functions were renamed or misspelled: 669 erase_wchar(), in_wchntr(), mvin_wchntr(). Some developers have used 670 attr_get(). 671 672 Added extensions: keybound(), curses_version(). 673 674 Terminfo database changes: 675 676 + change translation for termcap 'rs' to terminfo 'rs2', which is 677 the documented equivalent, rather than 'rs1'. 678 679 The problems are subtler in recent releases. 680 681 a) This release provides users with the ability to define their own 682 terminal capability extensions, like termcap. To accomplish this, 683 we redesigned the TERMTYPE struct (in term.h). Very few 684 applications use this struct. They must be recompiled to work with 685 the 5.0 library. 686 687 a) If you use the extended terminfo names (i.e., you used configure 688 --enable-tcap-names), the resulting terminfo database can have some 689 entries which are not readable by older versions of ncurses. This 690 is a bug in the older versions: 691 692 + the terminfo database stores booleans, numbers and strings in 693 arrays. The capabilities that are listed in the arrays are 694 specified by X/Open. ncurses recognizes a number of obsolete and 695 extended names which are stored past the end of the specified 696 entries. 697 698 + a change to read_entry.c in 951001 made the library do an lseek() 699 call incorrectly skipping data which is already read from the 700 string array. This happens when the number of strings in the 701 terminfo data file is greater than STRCOUNT, the number of 702 specified and obsolete or extended strings. 703 704 + as part of alignment with the X/Open final specification, in the 705 990109 patch we added two new terminfo capabilities: 706 set_a_attributes and set_pglen_inch). This makes the indices for 707 the obsolete and extended capabilities shift up by 2. 708 709 + the last two capabilities in the obsolete/extended list are memu 710 and meml, which are found in most terminfo descriptions for xterm. 711 712 When trying to read this terminfo entry, the spurious lseek() 713 causes the library to attempt to read the final portion of the 714 terminfo data (the text of the string capabilities) 4 characters 715 past its starting point, and reads 4 characters too few. The 716 library rejects the data, and applications are unable to 717 initialize that terminal type. 718 719 FIX: remove memu and meml from the xterm description. They are 720 obsolete, not used by ncurses. (It appears that the feature was 721 added to xterm to make it more like hpterm). 722 723 This is not a problem if you do not use the -x option of tic to 724 create a terminfo database with extended names. Note that the 725 user-defined terminal capabilities are not affected by this bug, 726 since they are stored in a table after the older terminfo data ends, 727 and are invisible to the older libraries. 728 729 c) Some developers did not wish to use the C++ binding, and used the 730 configure --without-cxx option. This causes problems if someone 731 uses the ncurses library from C++ because that configure test 732 determines the type for C++'s bool and makes ncurses match it, since 733 both C++ and curses are specified to declare bool. Calling ncurses 734 functions with the incorrect type for bool will cause execution 735 errors. In 5.0 we added a configure option "--without-cxx-binding" 736 which controls whether the binding itself is built and installed. 737 738 4.2 (March 2, 1998) 739 Interface changes: 740 741 + correct prototype for termattrs() as per XPG4 version 2. 742 743 + add placeholder prototypes for color_set(), erasewchar(), 744 term_attrs(), wcolor_set() as per XPG4 version 2. 745 746 + add macros getcur[xy] getbeg[xy] getpar[xy], which are defined in 747 SVr4 headers. 748 749 New extensions: keyok() and define_key(). 750 751 Terminfo database changes: 752 753 + corrected definition in curses.h for ACS_LANTERN, which was 'I' 754 rather than 'i'. 755 756 4.1 (May 15, 1997) 757 758 We added these extensions: use_default_colors(). Also added 759 configure option --enable-const, to support the use of const where 760 X/Open should have, but did not, specify. 761 762 The terminfo database content changed the representation of color for 763 most entries that use ANSI colors. SVr4 curses treats the setaf/setab 764 and setf/setb capabilities differently, interchanging the red/blue 765 colors in the latter. 766 767 4.0 (December 24, 1996) 768 769 We bumped to version 4.0 because the newly released dynamic loader 770 (ld.so.1.8.5) on Linux did not load shared libraries whose ABI and REL 771 versions were inconsistent. At that point, ncurses ABI was 3.4 and the 772 REL was 1.9.9g, so we made them consistent. 773 774 1.9.9g (December 1, 1996) 775 776 This fixed most of the problems with 1.9.9e, and made these interface 777 changes: 778 779 + remove tparam(), which had been provided for compatibility with 780 some termcap. tparm() is standard, and does not conflict with 781 application's fallback for missing tparam(). 782 783 + turn off hardware echo in initscr(). This changes the sense of the 784 echo() function, which was initialized to echoing rather than 785 nonechoing (the latter is specified). There were several other 786 corrections to the terminal I/O settings which cause applications to 787 behave differently. 788 789 + implemented several functions (such as attr_on()) which were 790 available only as macros. 791 792 + corrected several typos in curses.h.in (i.e., the mvXXXX macros). 793 794 + corrected prototypes for delay_output(), 795 has_color, immedok() and idcok(). 796 797 + corrected misspelled getbkgd(). Some applications used the 798 misspelled name. 799 800 + added _yoffset to WINDOW. The size of WINDOW does not impact 801 applications, since they use only pointers to WINDOW structs. 802 803 These changes were made to the terminfo database: 804 805 + removed boolean 'getm' which was available as an extended name. 806 807 We added these extensions: wresize(), resizeterm(), has_key() and 808 mcprint(). 809 810 1.9.9e (March 24, 1996) 811 812 not recommended (a last-minute/untested change left the forms and 813 menus libraries unusable since they do not repaint the screen). 814 Foreground/background colors are combined incorrectly, working properly 815 only on a black background. When this was released, the X/Open 816 specification was available only in draft form. 817 818 Some applications (such as lxdialog) were "fixed" to work with the 819 incorrect color scheme. 820 821 822IF YOU ARE A SYSTEM INTEGRATOR: 823------------------------------ 824 825 Beginning with 1.9.9, the ncurses distribution includes both a tset 826 utility and /usr/share/tabset directory. If you are installing ncurses, 827 it is no longer either necessary or desirable to install tset-jv. 828 829 Configuration and Installation: 830 831 Configure with --prefix=/usr to make the install productions put 832 libraries and headers in the correct locations (overwriting any 833 previous curses libraries and headers). This will put the terminfo 834 hierarchy under /usr/share/terminfo; you may want to override this with 835 --datadir=/usr/share/misc; terminfo and tabset are installed under the 836 data directory. 837 838 Please configure the ncurses library in a pure-terminfo mode; that 839 is, with the --disable-termcap option. This will make the ncurses 840 library smaller and faster. The ncurses library includes a termcap 841 emulation that queries the terminfo database, so even applications 842 that use raw termcap to query terminal characteristics will win 843 (providing you recompile and relink them!). 844 845 If you must configure with termcap fallback enabled, you may also 846 wish to use the --enable-getcap option. This option speeds up 847 termcap-based startups, at the expense of not allowing personal 848 termcap entries to reference the terminfo tree. See the code in 849 ncurses/tinfo/read_termcap.c for details. 850 851 Note that if you have $TERMCAP set, ncurses will use that value 852 to locate termcap data. In particular, running from xterm will 853 set $TERMCAP to the contents of the xterm's termcap entry. 854 If ncurses sees that, it will not examine /etc/termcap. 855 856 Keyboard Mapping: 857 858 The terminfo file assumes that Shift-Tab generates \E[Z (the ECMA-48 859 reverse-tabulation sequence) rather than ^I. Here are the loadkeys -d 860 mappings that will set this up: 861 862 keycode 15 = Tab Tab 863 alt keycode 15 = Meta_Tab 864 shift keycode 15 = F26 865 string F26 ="\033[Z" 866 867 Naming the Console Terminal 868 869 In various Linuxes (and possibly elsewhere) there has been a practice 870 of designating the system console driver type as `console'. Please 871 do not do this any more! It complicates peoples' lives, because it 872 can mean that several different terminfo entries from different 873 operating systems all logically want to be called `console'. 874 875 Please pick a name unique to your console driver and set that up 876 in the /etc/inittab table or local equivalent. Send the entry to the 877 terminfo maintainer (listed in the misc/terminfo file) to be included 878 in the terminfo file, if it's not already there. See the 879 term(7) manual page included with this distribution for more on 880 conventions for choosing type names. 881 882 Here are some recommended primary console names: 883 884 linux -- Linux console driver 885 freebsd -- FreeBSD 886 netbsd -- NetBSD 887 bsdos -- BSD/OS 888 889 If you are responsible for integrating ncurses for one of these 890 distribution, please either use the recommended name or get back 891 to us explaining why you don't want to, so we can work out nomenclature 892 that will make users' lives easier rather than harder. 893 894 895RECENT XTERM VERSIONS: 896--------------------- 897 898 The terminfo database file included with this distribution assumes you 899 are running an XFree86 xterm based on X11R6 (i.e., xterm-r6). The 900 earlier X11R5 entry (xterm-r5) is provided as well. 901 902 If you are running XFree86 version 3.2 (actually 3.1.2F and up), you 903 should consider using the xterm-xf86-v32 (or later, the most recent 904 version is always named "xterm-xfree86") entry, which adds ANSI color 905 and the VT220 capabilities which have been added in XFree86. If you 906 are running a mixed network, however, where this terminal description 907 may be used on an older xterm, you may have problems, since 908 applications that assume these capabilities will produce incorrect 909 output on the older xterm (e.g., highlighting is not cleared). 910 911 912CONFIGURING FALLBACK ENTRIES: 913---------------------------- 914 915 In order to support operation of ncurses programs before the terminfo 916 tree is accessible (that is, in single-user mode or at OS installation 917 time) the ncurses library can be compiled to include an array of 918 pre-fetched fallback entries. 919 920 These entries are checked by setupterm() only when the conventional 921 fetches from the terminfo tree and the termcap fallback (if configured) 922 have been tried and failed. Thus, the presence of a fallback will not 923 shadow modifications to the on-disk entry for the same type, when that 924 entry is accessible. 925 926 By default, there are no entries on the fallback list. After you 927 have built the ncurses suite for the first time, you can change 928 the list (the process needs infocmp(1)). To do so, use the script 929 MKfallback.sh. A configure script option --with-fallbacks does this 930 (it accepts a comma-separated list of the names you wish, and does 931 not require a rebuild). 932 933 If you wanted (say) to have linux, vt100, and xterm fallbacks, you 934 would use the commands 935 936 cd ncurses; 937 MKfallback.sh linux vt100 xterm >fallback.c 938 939 Then just rebuild and reinstall the library as you would normally. 940 You can restore the default empty fallback list with 941 942 MKfallback.sh >fallback.c 943 944 The overhead for an empty fallback list is one trivial stub function. 945 Any non-empty fallback list is const-ed and therefore lives in sharable 946 text space. You can look at the comment trailing each initializer in 947 the generated ncurses/fallback.c file to see the core cost of the 948 fallbacks. A good rule of thumb for modern vt100-like entries is that 949 each one will cost about 2.5K of text space. 950 951 952BSD CONVERSION NOTES: 953-------------------- 954 955 If you need to support really ancient BSD programs, you probably 956 want to configure with the --enable-bsdpad option. What this does 957 is enable code in tputs() that recognizes a numeric prefix on a 958 capability as a request for that much trailing padding in milliseconds. 959 There are old BSD programs that do things like tputs("50"). 960 961 (If you are distributing ncurses as a support-library component of 962 an application you probably want to put the remainder of this section 963 in the package README file.) 964 965 The following note applies only if you have configured ncurses with 966 --enable-termcap. 967 968------------------------------- CUT HERE -------------------------------- 969 970If you are installing this application privately (either because you 971have no root access or want to experiment with it before doing a root 972installation), there are a couple of details you need to be aware of. 973They have to do with the ncurses library, which uses terminfo rather 974than termcap for describing terminal characteristics. 975 976Though the ncurses library is terminfo-based, it will interpret your 977TERMCAP variable (if present), any local termcap files you reference 978through it, and the system termcap file. However, in order to avoid 979slowing down your application startup, it will only do this once per 980terminal type! 981 982The first time you load a given terminal type from your termcap 983database, the library initialization code will automatically write it 984in terminfo format to a subdirectory under $HOME/.terminfo. After 985that, the initialization code will find it there and do a (much 986faster) terminfo fetch. 987 988Usually, all this means is that your home directory will silently grow 989an invisible .terminfo subdirectory which will get filled in with 990terminfo descriptions of terminal types as you invoke them. If anyone 991ever installs a global terminfo tree on your system, this will quietly 992stop happening and your $HOME/.terminfo will become redundant. 993 994The objective of all this logic is to make converting from BSD termcap 995as painless as possible without slowing down your application (termcap 996compilation is expensive). 997 998If you don't have a TERMCAP variable or custom personal termcap file, 999you can skip the rest of this dissertation. 1000 1001If you *do* have a TERMCAP variable and/or a custom personal termcap file 1002that defines a terminal type, that definition will stop being visible 1003to this application after the first time you run it, because it will 1004instead see the terminfo entry that it wrote to $HOME/terminfo the 1005first time around. 1006 1007Subsequently, editing the TERMCAP variable or personal TERMCAP file 1008will have no effect unless you explicitly remove the terminfo entry 1009under $HOME/terminfo. If you do that, the entry will be recompiled 1010from your termcap resources the next time it is invoked. 1011 1012To avoid these complications, use infocmp(1) and tic(1) to edit the 1013terminfo directory directly. 1014 1015------------------------------- CUT HERE -------------------------------- 1016 1017USING NCURSES WITH AFS: 1018 AFS treats each directory as a separate logical filesystem, you 1019 can't hard-link across them. The --enable-symlinks option copes 1020 with this by making tic use symbolic links. 1021 1022USING NCURSES WITH EMACS: 1023 GNU Emacs has its own termcap support. By default, it uses a mixture 1024 of those functions and code linked from the host system's libraries. 1025 You need to foil this and shut out the GNU termcap library entirely. 1026 1027 In order to do this, hack the Linux config file (s/linux.h) to contain 1028 a #define TERMINFO and set the symbol LIBS_TERMCAP to "-lncurses". 1029 1030 We have submitted such a change for the 19.30 release, so it may 1031 already be applied in your sources -- check for the #define TERMINFO. 1032 1033USING NCURSES WITH GPM: 1034 Ncurses 4.1 and up can be configured to use GPM (General Purpose Mouse) 1035 which is used on Linux console. Be aware that GPM is commonly 1036 installed as a shared library which contains a wrapper for the curses 1037 wgetch() function (libcurses.o). Some integrators have simplified 1038 linking applications by combining all or part of libcurses.so (the BSD 1039 curses) into the libgpm.so file, producing symbol conflicts with 1040 ncurses (specifically the wgetch function). You may be able to work 1041 around this problem by linking as follows: 1042 1043 cc -o foo foo.o -lncurses -lgpm -lncurses 1044 1045 but the linker may not cooperate, producing mysterious errors. 1046 A patched version of gpm is available: 1047 1048 dickey.his.com:/ncurses/gpm-1.10-970125.tar.gz 1049 1050 This patch is incorporated in gpm 1.12; however some integrators 1051 are slow to update this library. Current distributions of gpm can 1052 be configured properly using the --without-curses option. 1053 1054BUILDING NCURSES WITH A CROSS-COMPILER 1055 Ncurses can be built with a cross-compiler. Some parts must be built 1056 with the host's compiler since they are used for building programs 1057 (e.g., ncurses/make_hash and ncurses/make_keys) that generate tables 1058 that are compiled into the ncurses library. You should set the 1059 BUILD_CC environment variable to your host's compiler, and run the 1060 configure script configuring for the cross-compiler. 1061 1062 Note that all of the generated source-files which are part of ncurses 1063 will be made if you use 1064 1065 make sources 1066 1067 This would be useful in porting to an environment which has little 1068 support for the tools used to generate the sources, e.g., sed, awk and 1069 Bourne-shell. 1070 1071BUGS: 1072 Send any feedback to the ncurses mailing list at 1073 bug-ncurses@gnu.org. To subscribe send mail to 1074 bug-ncurses-request@gnu.org with body that reads: 1075 subscribe ncurses <your-email-address-here> 1076 1077 The Hacker's Guide in the doc directory includes some guidelines 1078 on how to report bugs in ways that will get them fixed most quickly. 1079