11.01.2021»»понедельник

Dev C%2b%2b Ncurses

11.01.2021

On other systems, consult your compiler's documentation, or the ncurses documentation for more information. Also note that in most of these ncurses examples, we assume a terminal with 80 columns and 25 rows. If your terminal has different dimensions, you may need to adapt the examples to suit. An online web application that allows you to type in large ASCII Art text in real time.

  1. Ncurses Example
  2. Lib Ncurses
  3. Ncurses Download
  4. C Ncurses Library
  5. Ncurses C Tutorial

http://invisible-island.net/
Copyright © 1996-2019,2020 by Thomas E. Dickey

  • Synopsis
  • History
  • Subsets and otherwise
  • Download
  • Other Resources

Synopsis

See the ncurses release announcement or the FAQ

History

Foundations..

Ncurses has an involved history:

  • The package was originated as pcurses, written by Pavel Curtis around 1982, maintained by various people through 1986.
  • It was later polished (e.g., ANSI prototypes, reformatted, some bug fixes, but still essentially the same package). and re-issued as ncurses 1.8.1 in late 1993 by Zeyd Ben-Halim.
  • Subsequent work (through 1.8.8) was driven by Eric Raymond, who eradicated previous signs of authorship with the current copyright notice between 1.8.7 and 1.8.8, early 1995.
  • Later, this extended to incorporating the forms and menus libraries written by Juergen Pfeifer, and a panel library written by Warren Tucker. Adding these libraries almost doubled the size of the package.
  • There are even a few chunks from BSD curses (in tset and part of the logic which reads termcap data for tgetent).

Ncurses is the work of dozens of people. Some are listed in the credits.

My Involvement

My involvement with ncurses dates back to the 1.8.1 release. I was looking for an avenue to make a SystemV-based curses support resizable windows (e.g., in an xterm). This is easily achievable with BSD-curses, but not with the distributed versions of SystemV curses. Ncurses 1.8.1 was too immature (dumped core, was not portable, etc).

I revisited it in mid-1994, after an initial pass of making ded auto-configured. Ncurses 1.8.5 was advertised as 100% SVr4 compatible. I designed a minimal interface for resizeterm, proposing it to Zeyd, who promised it would be in 1.8.6 (it wasn't). Coming back to 1.8.7, I found that the color support was broken (specifically for add, which I had colorized using PDCurses with MS-DOS). Since the package is useless to me unless it implements faithfully the SVr4 interface, I approached Eric in early 1995 with my growing list of problems. For more information, see the discussion of the ncurses license.

Since then, I've corrected the implementation of color, terminal modes, implemented resizing, as well as the configuration scripts, and resolved numerous reliability and portability issues.

There is further work to do: the screen optimization has not been rigorously tested, there are interesting problems to work out with internationalization, etc.

Change-logs

Here are links to the changelog for ncurses:

Subsets of the Distribution

Starting with release 5.8, the source includes scripts which automate the process of building tarballs of useful subsets. These are

The tack program is commonly distributed with ncurses, though it is not part of ncurses.

Download

Download ncurses

Download tack

Terminal Database

The current terminfo/termcap sources are available via http. They require tic/infocmp from ncurses 6.2 or later, since they use a feature which was broken in previous releases.

Here are links to a browsable version of the terminfo database:

  • The terminfo database
  • The terminfo database (colored/large)

Ncurses Example

and here are the database files (see Is ncurses terminfo compatible with my system? in the FAQ):

You may also find the discussion of tctest useful.

XTerm has its own terminfo file and termcap files, which are not part of ncurses (see What $TERM should I use?). I adapt parts of xterm's terminfo file for ncurses, and use infocmp (in a script) to check for mismatches. Some packagers simply append xterm's file to the ncurses terminal database, which creates more problems than it solves.

MinGW Port

Free download project management books. Beginning with ncurses 5.8, ncurses has been ported to Win32 console using MinGW. I have built it both on Windows7 as well as via cross-compiling from FreeBSD, Fedora and Debian. From the latter, I make occasional builds which you may find useful:

Other Resources

Stable releases are mentioned on gnu.org.

Development versions are announced on the bug-ncurses@gnu.org mailing list. Here are pointers to repositories built from the development patches (as well as selected releases):

Lib Ncurses

  • development since ncurses 1.9.9e (see discussion).
  • development starting with ncurses 5.6 (see mailing list)

Packages

Ncurses Download

  • OSWatershed.org (archived 2014)
  • devel/ncurses and devel/ncursesw NetBSD pkgsrc
  • UNIX Packages (around page 9 of the Package Matrix)

C Ncurses Library

Comments

Ncurses C Tutorial

  • Programmer's Guide to NCurses
    I helped with this, as the technical editor.