CVSROOT:        /cvs
Module name:    src
Changes by:     n...@cvs.openbsd.org    2009/10/18 07:51:44

Modified files:
        lib/libcurses/tinfo: read_bsd_terminfo.c 

Log message:
terminfo supports the use= capability (tc= in termcap), to allow one
description to reference another. If this is used, any capabilities in the
parent terminal description should override those pulled in by use=.

When cap_mkdb is building terminfo.db, it concatenates any use= references
together so each description is self-contained. However, the ncurses terminfo
implementation doesn't expect this - it assumes it will have to resolve use=
itself, and picks the last entry in the description created by cap_mkdb rather
than the first.

read_bsd_terminfo.c already makes some transformations to make ncurses happy
with the format in the database. So, extend this to trim out duplicate entries,
leaving only the first.

(Interestingly, ncurses already has code to correctly handle merged tc=
capabilities in termcap.db (used if terminfo.db is missing).)

"go ahead" deraadt@

Reply via email to