Subject: bin/306: tset -s doesn't generate full $TERMCAP
To: None <gnats-admin>
From: Luke Mewburn <lm@karybdis.cs.rmit.OZ.AU>
List: netbsd-bugs
Date: 06/25/1994 22:50:05
>Number:         306
>Category:       bin
>Synopsis:       tset -s doesn't generate full $TERMCAP
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   lm
>Arrival-Date:   Sat Jun 25 22:50:03 1994
>Originator:     Luke Mewburn
>Organization:
>Release:        0.9C (also 4.4BSD-lite)
>Environment:
System: NetBSD karybdis 0.9C NetBSD 0.9C (KARYBDIS) #1: Wed Jun 22 10:59:28 EST 1994 root@karybdis:/Src/src/sys/arch/i386/compile/KARYBDIS i386

>Description:
	The $TERMCAP variable generated with eval `tset -s` is
missing some fields, specifically the ``longname'' field if it has
spaces in it. This causes "tput longname" to print something like
"sun" instead of "Sun Workstation Console" if you've generated the
$TERMCAP from "tset -s". (If tput reads /usr/share/misc/termcap
directly because you haven't set a termcap, longname does work)
	It appears that tset/wrterm.c is removing all terminal names
(separated by |'s) with whitespace in them. So, when you generate
a $TERMCAP with -s or -S, you miss out on the longname.

>How-To-Repeat:
% set term=vt100
% echo "$TERMCAP"
TERMCAP: Undefined variable.
% tput longname
dec vt100
% eval `tset -s`
% echo "$TERMCAP"
vt100|dec-vt100|vt100-am|vt100am:bl=^G:...
% tput longname
vt100am

>Fix:
	Remove the whitespace terminal name removal code from
tset/wrterm.c, so that the full termcap is written. Or change
it so that whitespace is \ protected (like the code further on
in that function does.)
>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------