xref: /freebsd/contrib/ncurses/README (revision aae38d10b4eebf81c0942947e8b83a9bb8651d88)
14a1a9510SRong-En Fan-------------------------------------------------------------------------------
2*aae38d10SBaptiste Daroussin-- Copyright (c) 1998-2012,2018 Free Software Foundation, Inc.               --
34a1a9510SRong-En Fan--                                                                           --
44a1a9510SRong-En Fan-- Permission is hereby granted, free of charge, to any person obtaining a   --
54a1a9510SRong-En Fan-- copy of this software and associated documentation files (the             --
64a1a9510SRong-En Fan-- "Software"), to deal in the Software without restriction, including       --
74a1a9510SRong-En Fan-- without limitation the rights to use, copy, modify, merge, publish,       --
84a1a9510SRong-En Fan-- distribute, distribute with modifications, sublicense, and/or sell copies --
94a1a9510SRong-En Fan-- of the Software, and to permit persons to whom the Software is furnished  --
104a1a9510SRong-En Fan-- to do so, subject to the following conditions:                            --
114a1a9510SRong-En Fan--                                                                           --
124a1a9510SRong-En Fan-- The above copyright notice and this permission notice shall be included   --
134a1a9510SRong-En Fan-- in all copies or substantial portions of the Software.                    --
144a1a9510SRong-En Fan--                                                                           --
154a1a9510SRong-En Fan-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
164a1a9510SRong-En Fan-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
174a1a9510SRong-En Fan-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
184a1a9510SRong-En Fan-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
194a1a9510SRong-En Fan-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
204a1a9510SRong-En Fan-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
214a1a9510SRong-En Fan-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
224a1a9510SRong-En Fan--                                                                           --
234a1a9510SRong-En Fan-- Except as contained in this notice, the name(s) of the above copyright    --
244a1a9510SRong-En Fan-- holders shall not be used in advertising or otherwise to promote the      --
254a1a9510SRong-En Fan-- sale, use or other dealings in this Software without prior written        --
264a1a9510SRong-En Fan-- authorization.                                                            --
274a1a9510SRong-En Fan-------------------------------------------------------------------------------
28*aae38d10SBaptiste Daroussin-- $Id: README,v 1.27 2018/01/01 15:09:04 tom Exp $
290e3d5408SPeter Wemm-------------------------------------------------------------------------------
300e3d5408SPeter Wemm		README file for the ncurses package
310e3d5408SPeter Wemm
320e3d5408SPeter WemmSee the file ANNOUNCE for a summary of ncurses features and ports.
330e3d5408SPeter WemmSee the file INSTALL for instructions on how to build and install ncurses.
340e3d5408SPeter WemmSee the file NEWS for a release history and bug-fix notes.
350e3d5408SPeter WemmSee the file TO-DO for things that still need doing, including known bugs.
360e3d5408SPeter Wemm
370e3d5408SPeter WemmBrowse the file misc/ncurses-intro.html for narrative descriptions of how
380e3d5408SPeter Wemmto use ncurses and the panel, menu, and form libraries.
390e3d5408SPeter Wemm
4018259542SPeter WemmBrowse the file doc/html/hackguide.html for a tour of the package internals.
410e3d5408SPeter Wemm
420e3d5408SPeter WemmROADMAP AND PACKAGE OVERVIEW:
430e3d5408SPeter Wemm
440e3d5408SPeter WemmYou should be reading this file in a directory called:  ncurses-d.d, where d.d
450e3d5408SPeter Wemmis the current version number (see the dist.mk file in this directory for
460e3d5408SPeter Wemmthat).  There should be a number of subdirectories, including `c++', `form',
470e3d5408SPeter Wemm`man', `menu', `misc', `ncurses', `panel', `progs', `test', 'tack' and `Ada95'.
481759abf3SPeter Wemm(The 'tack' program may be distributed separately).
490e3d5408SPeter Wemm
500e3d5408SPeter WemmA full build/install of this package typically installs several libraries, a
510e3d5408SPeter Wemmhandful of utilities, and a database hierarchy.  Here is an inventory of the
520e3d5408SPeter Wemmpieces:
530e3d5408SPeter Wemm
540e3d5408SPeter WemmThe libraries are:
550e3d5408SPeter Wemm
560e3d5408SPeter Wemm	libncurses.a       (normal)
570e3d5408SPeter Wemm	libncurses.so      (shared)
580e3d5408SPeter Wemm	libncurses_g.a     (debug and trace code enabled)
590e3d5408SPeter Wemm	libncurses_p.a     (profiling enabled)
600e3d5408SPeter Wemm
610e3d5408SPeter Wemm	libpanel.a         (normal)
620e3d5408SPeter Wemm	libpanel.so        (shared)
630e3d5408SPeter Wemm	libpanel_g.a       (debug and trace code enabled)
640e3d5408SPeter Wemm
650e3d5408SPeter Wemm	libmenu.a          (normal)
660e3d5408SPeter Wemm	libmenu.so         (shared)
670e3d5408SPeter Wemm	libmenu_g.a        (debug enabled)
680e3d5408SPeter Wemm
690e3d5408SPeter Wemm	libform.a          (normal)
700e3d5408SPeter Wemm	libform.so         (shared)
710e3d5408SPeter Wemm	libform_g.a        (debug enabled)
720e3d5408SPeter Wemm
734a1a9510SRong-En FanIf you configure using the --enable-widec option, a "w" is appended to the
744a1a9510SRong-En Fanlibrary names (e.g., libncursesw.a), and the resulting libraries support
754a1a9510SRong-En Fanwide-characters, e.g., via a UTF-8 locale.  The corresponding header files
764a1a9510SRong-En Fanare compatible with the non-wide-character configuration; wide-character
774a1a9510SRong-En Fanfeatures are provided by ifdef's in the header files.  The wide-character
784a1a9510SRong-En Fanlibrary interfaces are not binary-compatible with the non-wide-character
794a1a9510SRong-En Fanversion.
804a1a9510SRong-En Fan
8173f0a83dSXin LIIf you configure using the --enable-reentrant option, a "t" is appended to the
8273f0a83dSXin LIlibrary names (e.g., libncursest.a) and the resulting libraries have a
8373f0a83dSXin LIdifferent binary interface which makes the ncurses interface more "opaque".
8473f0a83dSXin LI
850e3d5408SPeter WemmThe ncurses libraries implement the curses API.  The panel, menu and forms
860e3d5408SPeter Wemmlibraries implement clones of the SVr4 panel, menu and forms APIs.  The source
870e3d5408SPeter Wemmcode for these lives in the `ncurses', `panel', `menu', and `form' directories
880e3d5408SPeter Wemmrespectively.
890e3d5408SPeter Wemm
900e3d5408SPeter WemmIn the `c++' directory, you'll find code that defines an interface to the
910e3d5408SPeter Wemmcurses, forms, menus and panels library packaged as C++ classes, and a demo program in C++
920e3d5408SPeter Wemmto test it.  These class definition modules are not installed by the 'make
930e3d5408SPeter Wemminstall.libs' rule as libncurses++.
940e3d5408SPeter Wemm
950e3d5408SPeter WemmIn the `Ada95' directory, you'll find code and documentation for an
960e3d5408SPeter WemmAda95 binding of the curses API, to be used with the GNAT compiler.
970e3d5408SPeter WemmThis binding is built by a normal top-level `make' if configure detects
984a1a9510SRong-En Fanan usable version of GNAT (3.11 or above). It is not installed automatically.
990e3d5408SPeter WemmSee the Ada95 directory for more build and installation instructions and
1000e3d5408SPeter Wemmfor documentation of the binding.
1010e3d5408SPeter Wemm
1020e3d5408SPeter WemmTo do its job, the ncurses code needs your terminal type to be set in the
1030e3d5408SPeter Wemmenvironment variable TERM (normally set by your OS; under UNIX, getty(1)
1040e3d5408SPeter Wemmtypically does this, but you can override it in your .profile); and, it needs a
1050e3d5408SPeter Wemmdatabase of terminal descriptions in which to look up your terminal type's
1060e3d5408SPeter Wemmcapabilities.
1070e3d5408SPeter Wemm
1080e3d5408SPeter WemmIn older (V7/BSD) versions of curses, the database was a flat text file,
1090e3d5408SPeter Wemm/etc/termcap; in newer (USG/USL) versions, the database is a hierarchy of
1100e3d5408SPeter Wemmfast-loading binary description blocks under /usr/lib/terminfo.  These binary
1110e3d5408SPeter Wemmblocks are compiled from an improved editable text representation called
1120e3d5408SPeter Wemm`terminfo' format (documented in man/terminfo.5).  The ncurses library can use
1130e3d5408SPeter Wemmeither /etc/termcap or the compiled binary terminfo blocks, but prefers the
1140e3d5408SPeter Wemmsecond form.
1150e3d5408SPeter Wemm
1160e3d5408SPeter WemmIn the `misc' directory, there is a text file terminfo.src, in editable
1170e3d5408SPeter Wemmterminfo format, which can be used to generate the terminfo binaries (that's
1180e3d5408SPeter Wemmwhat make install.data does).  If the package was built with the
1190e3d5408SPeter Wemm--enable-termcap option enabled, and the ncurses library cannot find a terminfo
1200e3d5408SPeter Wemmdescription for your terminal, it will fall back to the termcap file supplied
1210e3d5408SPeter Wemmwith your system (which the ncurses package installation leaves strictly
1220e3d5408SPeter Wemmalone).
1230e3d5408SPeter Wemm
1240e3d5408SPeter WemmThe utilities are as follows:
1250e3d5408SPeter Wemm
1260e3d5408SPeter Wemm	tic             -- terminfo source to binary compiler
1270e3d5408SPeter Wemm	infocmp         -- terminfo binary to source decompiler/comparator
1280e3d5408SPeter Wemm	clear           -- emits clear-screen for current terminal
12973f0a83dSXin LI	tabs            -- set tabs on a terminal
1300e3d5408SPeter Wemm	tput            -- shell-script access to terminal capabilities.
1310e3d5408SPeter Wemm	toe             -- table of entries utility
1320e3d5408SPeter Wemm	tset            -- terminal-initialization utility
1330e3d5408SPeter Wemm
1340e3d5408SPeter WemmThe first two (tic and infocmp) are used for manipulating terminfo
1350e3d5408SPeter Wemmdescriptions; the next two (clear and tput) are for use in shell scripts.  The
1360e3d5408SPeter Wemmlast (tset) is provided for 4.4BSD compatibility.  The source code for all of
1370e3d5408SPeter Wemmthese lives in the `progs' directory.
1380e3d5408SPeter Wemm
13918259542SPeter WemmDetailed documentation for all libraries and utilities can be found in the
14018259542SPeter Wemm`man' and `doc' directories.  An HTML introduction to ncurses, panels, and
14118259542SPeter Wemmmenus programming lives in the `doc/html' directory.  Manpages in HTML format
14218259542SPeter Wemmare under `doc/html/man'.
1430e3d5408SPeter Wemm
1440e3d5408SPeter WemmThe `test' directory contains programs that can be used to verify or
1450e3d5408SPeter Wemmdemonstrate the functions of the ncurses libraries.  See test/README for
1460e3d5408SPeter Wemmdescriptions of these programs.  Notably, the `ncurses' utility is designed to
1470e3d5408SPeter Wemmhelp you systematically exercise the library functions.
1480e3d5408SPeter Wemm
1490e3d5408SPeter WemmAUTHORS:
1500e3d5408SPeter Wemm
1510e3d5408SPeter WemmPavel Curtis:
1520e3d5408SPeter Wemm	wrote the original ncurses
1530e3d5408SPeter Wemm
1540e3d5408SPeter WemmZeyd M. Ben-Halim:
1550e3d5408SPeter Wemm	port of original to Linux and many enhancements.
1560e3d5408SPeter Wemm
1571759abf3SPeter WemmThomas Dickey (maintainer for 1.9.9g through 4.1, resuming with FSF's 5.0):
1580e3d5408SPeter Wemm	configuration scripts, porting, mods to adhere to XSI Curses in the
1590e3d5408SPeter Wemm	areas of background color, terminal modes.  Also memory leak testing,
1600e3d5408SPeter Wemm	the wresize, default colors and key definition extensions and numerous
16173f0a83dSXin LI	bug fixes -- more than half of those enumerated in NEWS beginning with
16273f0a83dSXin LI	the internal release 1.8.9, see
16373f0a83dSXin LI
164*aae38d10SBaptiste Daroussin		https://invisible-island.net/personal/changelogs.html
1650e3d5408SPeter Wemm
1660e3d5408SPeter WemmFlorian La Roche (official maintainer for FSF's ncurses 4.2)
1670e3d5408SPeter Wemm	Beginning with release 4.2, ncurses is distributed under an MIT-style
1680e3d5408SPeter Wemm	license.
1690e3d5408SPeter Wemm
1700e3d5408SPeter WemmEric S. Raymond:
1710e3d5408SPeter Wemm	the man pages, infocmp(1), tput(1), clear(1), captoinfo(1), tset(1),
1720e3d5408SPeter Wemm	toe(1), most of tic(1), trace levels, the HTML intro, wgetnstr() and
1730e3d5408SPeter Wemm	many other entry points, the cursor-movement optimization, the
1740e3d5408SPeter Wemm	scroll-pack optimizer for vertical motions, the mouse interface and
1750e3d5408SPeter Wemm	xterm mouse support, and the ncurses test program.
1760e3d5408SPeter Wemm
1770e3d5408SPeter WemmJuergen Pfeifer
1780e3d5408SPeter Wemm	The menu and form libraries, C++ bindings for ncurses, menus, forms and
1790e3d5408SPeter Wemm	panels, as well as the Ada95 binding.  Ongoing support for panel.
1800e3d5408SPeter Wemm
1810e3d5408SPeter WemmCONTRIBUTORS:
1820e3d5408SPeter Wemm
1830e3d5408SPeter WemmAlexander V. Lukyanov
1840e3d5408SPeter Wemm	for numerous fixes and improvements to the optimization logic.
1850e3d5408SPeter Wemm
1860e3d5408SPeter WemmDavid MacKenzie
1870e3d5408SPeter Wemm	for first-class bug-chasing and methodical testing.
1880e3d5408SPeter Wemm
1890e3d5408SPeter WemmRoss Ridge
1900e3d5408SPeter Wemm	for the code that hacks termcap parameterized strings into terminfo.
1910e3d5408SPeter Wemm
1920e3d5408SPeter WemmWarren Tucker and Gerhard Fuernkranz,
1930e3d5408SPeter Wemm	for writing and sending the panel library.
1940e3d5408SPeter Wemm
1950e3d5408SPeter WemmHellmuth Michaelis,
1960e3d5408SPeter Wemm	for many patches and testing the optimization code.
1970e3d5408SPeter Wemm
1980e3d5408SPeter WemmEric Newton, Ulrich Drepper, and Anatoly Ivasyuk:
1990e3d5408SPeter Wemm	the C++ code.
2000e3d5408SPeter Wemm
2010e3d5408SPeter WemmJonathan Ross,
2020e3d5408SPeter Wemm	for lessons in using sed.
2030e3d5408SPeter Wemm
2040e3d5408SPeter WemmKeith Bostic (maintainer of 4.4BSD curses)
2050e3d5408SPeter Wemm	for help, criticism, comments, bug-finding, and being willing to
2060e3d5408SPeter Wemm	deep-six BSD curses for this one when it grew up.
2070e3d5408SPeter Wemm
2080e3d5408SPeter WemmRichard Stallman,
2090e3d5408SPeter Wemm	for his commitment to making ncurses free software.
2100e3d5408SPeter Wemm
2110e3d5408SPeter WemmCountless other people have contributed by reporting bugs, sending fixes,
2120e3d5408SPeter Wemmsuggesting improvements, and generally whining about ncurses :-)
2130e3d5408SPeter Wemm
2140e3d5408SPeter WemmBUGS:
2150e3d5408SPeter Wemm	See the INSTALL file for bug and developer-list addresses.
21618259542SPeter Wemm	The Hacker's Guide in the doc directory includes some guidelines
2170e3d5408SPeter Wemm	on how to report bugs in ways that will get them fixed most quickly.
218