[comp.unix.wizards] termcap question

tim@decvax.UUCP (06/02/87)

Why does the 43BSD documentation state that only certain strings in the
/etc/termcap file are able to use padding?  Padding is used to specify the 
amount of delay associated with the given string.  Similarly why does the
documentation claim that only certain strings are able to use P* to specify
variable delay amounts?

After rumaging through the source code it seems to me that any string
should have these capabilities.  Don't they all just call the same
routine tputs() which will first look for padding specifications and
then the string?  tputs() does not conditionally look for padding
only for certian strings.

Thanks all.

guy@gorodish.UUCP (06/03/87)

> After rumaging through the source code it seems to me that any string
> should have these capabilities.  Don't they all just call the same
> routine tputs() which will first look for padding specifications and
> then the string?  tputs() does not conditionally look for padding
> only for certian strings.

Who are "they" in "don't they all just call..."?  The answer to the question
is probably "no", if "they" refers to "those programs that use
'termcap'."  Some programs use "tputs", some don't.  I suspect the
list of strings that can have padding is close to the list of strings
that are put using "tputs" in most programs.  A program *can*, and
arguably should, use "tputs" to put all the strings, but there are
programs that do not.
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com

dhb@rayssd.UUCP (06/04/87)

In article <84@decvax.UUCP> tim@decvax.UUCP (Tim Burke) writes:
>Why does the 43BSD documentation state that only certain strings in the
>/etc/termcap file are able to use padding?  Padding is used to specify the 
>amount of delay associated with the given string.  Similarly why does the
>documentation claim that only certain strings are able to use P* to specify
>variable delay amounts?

I cant be 100% sure about this (the manuals are on my desk at work and this
system is only 4.2 BSD) but I would assume that what they are referring to
is the fact that some of the strings that are defined are actually the
strings that are sent back from the terminal for such things as function keys
and arrow keys.  These strings cannot have any "padding" since they must
define exactly the string that will be sent by the terminal.  Any string
that is sent by the computer to the terminal can have padding defined.  Some
of the strings dont make sense for the "P*" form of padding since this is
defined as "padding amount per affected line" (or something like that).
Strings that always affect less than a line of the display dont make sense
with this form, although they should work ok.
-- 
	David H. Brierley
	Raytheon Submarine Signal Division
	1847 West Main Road
	Portsmouth, RI 02871

Phone:		(401)-847-8000 x4073
Internet:	dhb@rayssd.ray.com
Uucp:		{cbosgd, gatech, linus, mirror, necntc, uiucdcs} !rayssd!dhb

gwyn@brl-smoke.UUCP (06/04/87)

In article <84@decvax.UUCP> tim@decvax.UUCP (Tim Burke) writes:
>Why does the 43BSD documentation state that only certain strings in the
>/etc/termcap file are able to use padding?

Basically, because it's traditionally been that way in the termcap(5)
manual entry.  As you observed, tputs() can handle padding for any
possible string capability.  Think of the capabilities flagged in
termcap(5) as accepting padding as simply a guide to the ones for
which padding makes most sense and is commonly needed.

I suppose this should be clarified in the next edition.

	- D A Gwyn, 4.3BSD termcap(5) editor