Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Ncurses
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Text-based user interface API}} {{Lowercase title}} {{Infobox software | name = ncurses | screenshot = Linux-menuconfig.png | caption = ncurses-based [[menuconfig]] | developer = Thomas E. Dickey, Juergen Pfeifer, Eric S Raymond, Alexander V Lukyanov, Philippe Blain, Sven Verdoolaege, Nicolas Boulenguez et al.<ref name=":0"/><ref name="license"/> | released = {{Start date and age|1993}} | latest release version = 6.5<ref>{{cite web|url=https://lists.gnu.org/archive/html/info-gnu/2024-04/msg00004.html|title=ncurses 6.5|access-date=April 27, 2024}}</ref> | latest release date = {{Start date and age|2024|04|27|df=yes}} | programming language = [[C (programming language)|C]] | operating system = [[POSIX]] | genre = [[Widget toolkit]] | license = [[X11 License|X11]]<ref name="license">{{cite web |url=http://invisible-island.net/ncurses/ncurses-license.html |title=NCURSES β Licensing |access-date=July 9, 2013}}</ref> | website = {{Official URL}} }} '''ncurses''' (new [[curses (programming library)|curses]]) is a [[Library (computing)|programming library]] for creating [[textual user interface]]s (TUIs) that work across a wide variety of [[computer terminal|terminals]]; it is written in a way that attempts to optimize the commands that are sent to the terminal, so as to reduce the [[Latency (engineering)|latency]] experienced when updating the displayed content. ncurses is a [[free and open-source software]] emulation of [[curses (programming library)|curses]] from [[UNIX System V|System V Release 4.0]] (SVr4). There are bindings for ncurses in a variety of programming languages, including [[Ada (programming language)|Ada]],<ref>{{cite web |url=https://invisible-island.net/ncurses/Ada95.html |title=Ada95 Binding for ncurses}}</ref> [[Python (programming language)|Python]],<ref>{{cite web |url=https://docs.python.org/3/howto/curses.html |title=Curses Programming with Python - Python documentation}}</ref> [[Gambas]],<ref>{{cite web |url=http://gambaswiki.org/wiki/comp/gb.ncurses |title=gb.ncurses - Gambas Wiki}}</ref> [[Ruby (programming language)|Ruby]],<ref>{{cite web |url=https://rubygems.org/gems/ncurses-ruby/versions/1.2.4 |title=ncurses Ruby - RubyGems.org}}</ref> [[PHP]],<ref>{{cite web |url=https://www.php.net/manual/en/ref.ncurses.php |title=Ncurses functions - PHP Manual |access-date=2020-02-04 |archive-date=2021-03-28 |archive-url=https://web.archive.org/web/20210328125809/https://www.php.net/manual/en/ref.ncurses.php |url-status=dead}}</ref> [[JavaScript]],<ref>{{cite web |url=http://spiderape.sourceforge.net/plugins/ncurses/ |title=nc plugin: ncurses bindings for SpiderApe}}</ref> [[Perl]],<ref>{{cite web |url=https://metacpan.org/pod/Curses::UI |title=Curses::UI - A curses based OO user interface framework}}</ref> [[Object REXX]] (ooRexx)<ref>{{Cite book |url=https://sourceforge.net/projects/oorexx/files/oorexx-docs/5.0.0/orxncurses.pdf |title=ooRexx Documentation 5.0.0: nCurses Class Library Reference |publisher=Rexx Language Association |year=2022}}</ref> and [[Rust (programming language)|Rust]].<ref>{{cite web |url=https://crates.io/crates/ncurses |title=Rust bindings for ncurses}}</ref> ==History== As the new version, ncurses is a [[free and open-source software]] emulation of the System V Release 4.0 (SVr4) [[curses (programming library)|curses]], which was an enhancement over the discontinued 4.4 BSD curses.<ref name="ncurses Raymond"/> The XSI Curses standard issued by [[X/Open]] is explicitly and closely modeled on [[UNIX System V]]. ===curses=== {{Main|Curses (programming library)}} The first curses library was developed at the University of California at Berkeley, for a [[BSD]] operating system, around 1980 to support [[Rogue (video game)|Rogue]], a text-based adventure game. It originally used the [[termcap]] library, which was used in other programs, such as the [[Vi (text editor)|vi]] editor.<ref name="ncurses Raymond">{{cite magazine |last1=Raymond |first1=Eric S. |author1-link=Eric S. Raymond |date=September 1995 |url=http://www.linuxjournal.com/article/1124 |title=ncurses: Portable Screen-Handling for Linux |magazine=Linux Journal }}</ref> The success of the BSD curses library prompted [[Bell Labs]] to release an enhanced curses library in their System V Release 2 [[Unix]] systems. This library was more powerful and instead of using termcap, it used [[terminfo]]. However, due to [[AT&T Corporation|AT&T]]'s policy regarding the distribution of source code, the improved curses library was not widely adopted in the BSD community.<ref name="ncurses Raymond"/> ===pcurses=== Around 1982, [[Pavel Curtis]] started work on a [[freeware]] clone of the Bell Labs curses, named '''pcurses''', which was maintained by various people through 1986.<ref name="ncurses Dickey">{{Cite web |last=Dickey |first=Thomas E. |date=December 1996 |url=http://invisible-island.net/ncurses/ |title=NCURSES - New Curses }}</ref> ===ncurses=== The pcurses library was further improved when Zeyd Ben-Halim took over the development effort in late 1991.<ref name="ncurses Raymond"/><ref name="ncurses Dickey"/><ref>The [[README]] file in ncurses 1.8.1 states "v0.1 July 31, 1992" and "v1.8.1 November 5, 1993", which agrees with the [http://invisible-island.net/ncurses/NEWS.gz NEWS (changelog) file]</ref> The new library was released as ncurses in November 1993, with version 1.8.1 as the first major release. Subsequent work, through version 1.8.8 (M1995), was driven by [[Eric S. Raymond]], who added the form and menu libraries written by Juergen Pfeifer.<ref name=":0">{{cite web |url=http://invisible-island.net/ncurses/ncurses.faq.html#who_did_it |title=NCURSES - Frequently Asked Questions (FAQ): Who wrote NCURSES?}}</ref> Since 1996, it has been maintained by Thomas E. Dickey.<ref name="ncurses Dickey"/> Most ncurses calls can be easily ported to the old curses. System V curses implementations can support BSD curses programs with just a [[Compiler|recompilation]].<ref>{{cite web |url=http://invisible-island.net/ncurses/hackguide.html#abstract |title=A Hacker's Guide to Ncurses Internals}}</ref> However, a few areas are problematic, such as handling terminal resizing, since no counterpart exists in the old curses. ==Terminal database== ncurses can use either [[terminfo]] (with extensible data) or [[termcap]]. Other implementations of [[Curses (programming library)|curses]] generally use [[terminfo]]; a minority use [[termcap]]. Few (mytinfo was an older exception<ref>{{Cite web |last=Weinstein |first=Sydney S. |date=April 1993 |url=http://collaboration.cmc.ec.gc.ca/science/rpn/biblio/ddj/Website/articles/CUJ/1993/9304/weinstei/weinstei.htm |title=On the Networks |publisher=C/C++ Users Journal |access-date=2017-09-15 |url-status=dead |archive-url=https://web.archive.org/web/20140811123402/http://collaboration.cmc.ec.gc.ca/science/rpn/biblio/ddj/Website/articles/CUJ/1993/9304/weinstei/weinstei.htm |archive-date=2014-08-11 }}</ref>) use both. ==License== ncurses is a part of the [[GNU Project]], but is not distributed under the [[GNU General Public License]] (GPL) or [[GNU Lesser General Public License]] (LGPL). Instead, it is distributed under a [[permissive free software licence]], i.e., the [[MIT License]].<ref name="Is it GPL">{{cite web |url=http://invisible-island.net/ncurses/ncurses.faq.html#is_it_gpl |title=NCURSES - Frequently Asked Questions (FAQ): Is it GPL'd?}}</ref> This is due to the agreement made with the [[Free Software Foundation]] at the time the developers assigned their copyright. When the agreement was made to pass on the rights to the FSF, there was a clause that stated:<ref name="Is it GPL"/> <blockquote> 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. </blockquote> According to the maintainer Thomas E. Dickey, this precludes relicensing to the GPL in any version, since it would place restrictions on the programs that will be able to link to the libraries.<ref name="Is it GPL"/> ==Programs using ncurses== Hundreds of programs use ncurses.<ref>{{cite web |url=http://freshmeat.net/search/?q=ncurses§ion=projects&Go.x=0&Go.y=0 |title=Search results: +ncurses on freshmeat.net |access-date=2013-05-10 |url-status=dead |archive-url=https://web.archive.org/web/20120218074708/http://freshmeat.net/search/?q=ncurses§ion=projects&Go.x=0&Go.y=0 |archive-date=February 18, 2012}}</ref><ref>{{Cite web |url=http://www.ohloh.net/tags/ncurses |title=Projects tagged 'ncurses' |publisher=ohloh }}</ref> Some, such as [[GNU Screen]] and [[w3m]], use only the [[termcap]] interface and perform screen management themselves. Others, such as [[GNU Midnight Commander]] and Yet another Setup Tool ([[YaST]]), use the curses programming interface. ==See also== {{Portal|Free and open-source software}} * [[conio.h]] β A C header file used in [[DOS]] [[compiler]]s to create text user interfaces * [[Curses Development Kit]] * [[Dialog (software)]] * [[PDCurses]] * [[S-Lang]] programming library * [[SMG$]] β The screen-management library available under OpenVMS * [[GNU Readline]] ==References== {{Reflist}} ==External links== * {{Official website}} [[Category:Ncurses| ]] [[Category:C (programming language) libraries]] [[Category:Free software programmed in Ada]] [[Category:Free software programmed in C]] [[Category:GNU Project software]] [[Category:Software using the MIT license]] [[Category:Termcap]] [[Category:Terminfo]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:Cite magazine
(
edit
)
Template:Cite web
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Lowercase title
(
edit
)
Template:Main
(
edit
)
Template:Main other
(
edit
)
Template:Official website
(
edit
)
Template:Portal
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Template other
(
edit
)