1.9.4 is the oldest version that you should consider installing.
It comes with Slackware 3.0; earlier releases have a number
of problems, including incompatible terminal descriptions.
You must first install the terminfo data (i.e., "make install.data").
On many systems (those that have a SVr4 curses installed) you can run the test
programs using the vendor's terminfo database (e.g., Solaris, IRIX, HP-UX) by
setting the TERMINFO variable to point to that instead.
Not at all.
You can load a subset of the terminfo database.
I use a variant of this script to load the terminal descriptions
that I need on my machine:
#!/bin/sh
# uses the -e switch on tic to selectively load descriptions that are
# interesting for my testing.
if test -f terminfo.src ; then
TMP=/tmp/load$$
trap "rm -f $TMP" 0 1 2 5 15
tic -s -1 -I -e'
ansi, ansi-m, color_xterm, ecma+color,
klone+acs, klone+color, klone+sgr, klone+sgr-dumb,
linux, pcansi-m, rxvt, vt52,
vt100, vt102, vt220, xterm' terminfo.src >$TMP
tic -s $TMP
else
echo 'oops'
exit 1
fi
Check the terminal description, to see if it is installed properly
(e.g., in /usr/share/terminfo) by looking at the output of
infocmp.
It should contain the following capabilities:
orig_pair or orig_colors
and max_colors
and max_pairs
as well as
set_foreground and set_background
or set_a_foreground and set_a_background
or set_color_pair
The most common complaint is that "I can see colors using ls,
but not with ncurses applications". This is due to not having installed
the terminfo database.
Usually this happens because you have not installed the terminfo
database, or it is not in the proper location.
If you do not, and the application is unable to locate the terminfo
database, the ncurses library will attempt to recover by reading
/etc/termcap,
translating it into a private terminfo database
$HOME/.terminfo
This directory can be a nuisance, because the termcap file often
does not contain complete or consistent terminal descriptions.
Remove it and correct the problem (i.e., install the terminfo database).
You may have installed terminfo in the wrong, or an obsolete location:
- On Linux, FreeBSD and NetBSD the preferred location for terminfo
is /usr/share/terminfo, with a symbolic link from
/usr/lib/terminfo for compatibility with older applications.
Prior to 1.9.9g, the configure script defaulted to a /usr/local
prefix rather than /usr, necessitating an explicit
configure --prefix=/usr
- On other systems, the prefix defaults to /usr/local.
You may wish to change this.
Some users install ncurses replacing other versions of curses altogether.
I don't do this. If you do, read the INSTALL file.
- Also prior to 1.9.9g, the actual terminfo directory resided in
/usr/lib/terminfo.
It was moved to /usr/share/terminfo to conform to file-system
standards. The installation script attempts to determine if you have
a real directory at the old location, and will not delete that (because
some applications, such as mc and screen install special
terminal descriptions that you would not want to accidentally delete.
The best solution in this case is to move the old directory to the new
location and install the new terminfo data, merging into the old data.
This is the way SVr4 curses works.
From the XSI Curses specification
The start_color() function also restores the colours on the terminal to terminal-specific initial
values. The initial background colour is assumed to be black for all terminals.
If your terminal description does not contain
the orig_pair or orig_colors
capability, you will be unable to reset colors to the pre-curses state.
This happens, for example, with aixterm.
However, if your terminal does support resetting colors to a default
state, ncurses will use this when exiting Curses mode.
Terminal types that do this include the Linux console, rxvt and the
XFree86 xterm.
Ncurses 4.1 will provide an extension use_default_colors() which allows
an application running on a terminal which supports resetting colors to
mix the default foreground and background colors with the 8 defined
curses colors.
It is possible to make an application resize when running in a windowing
environment (e.g., in an xterm).
This is not a feature of standard SVr4 curses,
though some curses implementations (e.g., HP-UX) support this.
Within ncurses, there are two ways to accomplish this.
One relies on side-effects of the library functions, and is moderately
portable. The other is an extension to SVr4 curses.
- endwin/refresh when invoked will briefly exit curses
and reinitialize the display, picking up the new screen size.
Ncurses will reallocate the WINDOW data (e.g., curscr, stdscr) to reflect
the new limits.
- resizeterm can be invoked directly to make ncurses resize its
WINDOW data.
I use it in my directory editor
ded
to achieve flicker-free resizing via
a signal handler for SIGWINCH.
(The documentation for HP-UX curses implies that they use a similar
approach; I have been unable to make it work.)
First, check to see if your problem is addressed in this FAQ.
Read the INSTALL document, if you have not done so.
However, it may not be a known problem.
Read on.
Send mail to the ncurses-list
ncurses-list@netcom.com
if you're subscribed. Otherwise, you may email directly to the
maintainers, currently:
If you send email only to one of the other authors, I probably won't see it.
I get about half of my bug reports via the ncurses mailing list, some
by reading news groups, and the others via direct email.
More than half of the changes that get introduced without review in the
ncurses mailing list introduce a bug.
So I find it necessary to review proposed changes.
When sending patches:
- Explain the problem that you are fixing.
- Please use "diff -u" format, even if you are creating a new file.
Otherwise I may overlook it, if it is at the end of a long patch.
(It is reasonable to send binary files in uuencoded form, but there are
few of those).
- Don't send patches that include the 'configure' script
if the difference therein can be regenerated using autoconf.
- Do specify the version of ncurses that you are patching.
This is a little different from reporting bugs. If you have a machine
that I've not ported to, and have problems, I'll require the relevant
information:
config.cache
config.log
config.status
include/config.h
log from running 'configure', with options
log from running 'make', with options
A uuencoded/gzip'd/tar file is preferred, because the logfiles can be
awkward to email.
If you're having trouble building on a known "good" platform, please
make sure that you've got a current version of ncurses, and please
read the installation instructions.
Sorry. This is a hobby. There's a large backlog.
Some changes pass review quickly, others are difficult, because one
fix may break other functionality.
My criteria are less stringent if you provide a short program that
demonstrates the problem, or if you're modifying something that you maintain.
In any case, I will incorporate patches into my beta version
only if I have reviewed the patch, tested it (if the patch is not
obvious), and repaired any omissions (e.g., portability constraints).
Occasionally I have patches (including my own) which cannot pass
immediate review; these constitute most of my backlog.
The remainder of my backlog consists of issues which highlight
incompatibilities between ncurses and SVr4 curses;
these are listed in the TO-DO file.
I use the following guidelines:
- extensions (deviations from SVr4 curses) are allowed only if they
do not modify the documented/observed behavior of the API.
- I test behavior using Solaris 2.4 or 2.5 curses, and use the manual pages
for Solaris in conjunction with the X/Open Curses documentation.