ncurses
From Wikipedia, the free encyclopedia
Developed by | GNU Project |
---|---|
Latest release | 5.7 / 2008-11-02 |
Operating system | POSIX |
Type | Widget toolkit |
License | MIT license |
Website | www.gnu.org/software/ncurses/ncurses.html |
ncurses is a programming library providing an API, allowing the programmer to write text user interfaces in a terminal-independent manner. It's a toolkit for developing "GUI-like" apps which run under a terminal emulator. It also optimizes screen changes, in order to reduce the latency experienced when using remote shells.
The project leader is Thomas Dickey.
Contents |
[edit] History
The "N" in ncurses is an abbreviation of the word "new." This is because ncurses is a free software emulation (clone) of System V Release 4.0 (SVr4) curses, an enhancement over the discontinued classic 4.4 BSD curses. The XSI Curses standard issued by X/Open is explicitly and closely modeled on System V. Development started in 1991 or 1992 using pcurses and was first announced in 1993 [1] as noted on the ncurses homepage. An earlier article [2] refers to 1991 (second-hand information) but contains several flaws, e.g., asserting that pcurses was little known (it was distributed in the first volume of the comp.sources.unix newsgroup as noted in the terminfo article) and obscuring the connection between BSD and UNIX curses via Mark Horton. The README file in ncurses 1.8.1 states "v0.1 July 31, 1992" and "v1.8.1 Nov 5, 1993", which agrees with the current NEWS file. The ncurses NEWS file gives detailed development information. [3]
Most ncurses calls can be easily ported to the old curses. System V curses implementations can support BSD curses programs with just a recompilation.[4] However, a few areas are problematic, such as handling terminal resizing (since no counterpart exists in the old curses).
[edit] Terminal database
Ncurses can use either terminfo (with extensible data), or termcap. Other implementations of curses generally use terminfo; a minority use termcap. Few (mytinfo was an older exception[5]) use both.
[edit] License
Ncurses is a part of the GNU Project. It is one of the few GNU files not distributed under the GNU GPL or LGPL; it is distributed under a permissive free software licence, similar to the MIT License. This is due to the agreement made with the Free Software Foundation at the time the developers assigned their copyright. However, because it is Free Software Foundation software, they may choose to GPL it in the future.[6] However, when the agreement was made to pass on the rights to the FSF, there was a clause that stated "The Foundation promises that all distribution of the Package, or of any work "based on the Package", that takes place under the control of the Foundation or its agents or assignees, shall be on terms that explicitly and perpetually permit anyone possessing a copy of the work to which the terms apply, and possessing accurate notice of these terms, to redistribute copies of the work to anyone on the same terms." which may guarantee that ncurses will not be licenced under GPL.[7]
[edit] Programs using ncurses
There are hundreds of programs which use ncurses.[8][9] Some, such as GNU Screen and w3m, use only the termcap interface, performing screen management within the application. Others, such as GNU Midnight Commander and YaST use the curses programming interface.
[edit] See also
- SMG$ The Screen Management library available under OpenVMS
- conio
- Curses Development Kit
- Dialog (software)
[edit] References
- ^ Thomas E. Dickey (December 1996). "NCURSES - New Curses". http://invisible-island.net/ncurses/.
- ^ Eric S. Raymond (September 1995). "ncurses: Portable Screen-Handling for Linux". Linux Journal. http://www.linuxjournal.com/article/1124.
- ^ Thomas E. Dickey. "ncurses NEWS (changelog)". http://invisible-island.net/ncurses/NEWS.gz.
- ^ A Hacker's Guide to Ncurses Internals
- ^ Ross Ridge (December 27 1992). "mytinfo posting to comp.sources.unix newsgroup". Internet Systems Consortium, Inc. http://www.isc.org/index.pl?/sources/utils/terminal/mytinfo.php.
- ^ NCURSES - Frequently Asked Questions (FAQ)
- ^ [1]
- ^ "Search results: +ncurses". freshmeat.net. http://freshmeat.net/search/?q=ncurses§ion=projects&Go.x=0&Go.y=0.
- ^ "Projects tagged ‘ncurses’". ohloh. http://www.ohloh.net/tags/ncurses.
[edit] External links
- ncurses homepage
- Introduction "Writing Programs with NCURSES" by Eric S. Raymond and Zeyd M. Ben-Halim
- ncurses Programming HOWTO ( and PDF version)
- ncurses Beginner's Tutorial
- A Hacker's Guide to NCURSES
- Frequently asked questions and their corresponding answers by Thomas Dickey
[edit] Toolkits
- NDK++ Development Kit for C++
[edit] Language bindings
- Ada95 Binding
- Binding for ANSI Common Lisp
- Binding for Haskell
- Binding for Java
- Binding for JavaScript
- Binding for Perl
- Terminal Screen Control Functions for PHP
- Binding for Python
- Ruby module