NetBSD Problem Report #306

From gnats  Sat Jun 25 22:49:16 1994
Received: from goanna.cs.rmit.oz.au (root@goanna.cs.rmit.OZ.AU [131.170.24.40]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id WAA03882 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sat, 25 Jun 1994 22:49:15 -0700
Message-Id: <199406260326.NAA19892@karybdis.cs.rmit.OZ.AU>
Date: Sun, 26 Jun 1994 13:26:40 +1000
From: Luke Mewburn <lm@karybdis.cs.rmit.OZ.AU>
Reply-To: lm@karybdis.cs.rmit.OZ.AU
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: tset -s doesn't generate full $TERMCAP
X-Send-Pr-Version: 3.2

>Number:         306
>Category:       bin
>Synopsis:       tset -s doesn't generate full $TERMCAP
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   lm
>Arrival-Date:   Sat Jun 25 22:50:03 +0000 1994
>Closed-Date:    Fri Nov 15 05:52:52 +0000 1996
>Last-Modified:  Fri Nov 15 05:56:23 +0000 1996
>Originator:     Luke Mewburn
>Release:        0.9C (also 4.4BSD-lite)
>Organization:
>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.)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: lukem 
State-Changed-When: Thu Nov 14 21:52:52 PST 1996 
State-Changed-Why:  
PR unsolvable, due to differences in the way that shells interpret 
quotes in backticks (the solution tried was to wrap the output of 
wrtermcap() in quotes, and permit whitespace in the terminal description 
fields. this broke when invoked as set foo=(`tset -S`) - the single 
quotes  in the output of test -S don't get parsed correctly. PR submitter (me :) is happy 
with this answer. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.