Re: tc= in remote(5) example

2021-02-18 Thread Theo de Raadt
Jan Stary  wrote:

> /etc/examples/remote contains the following stanzas:
> 
>   unixhost:\
>   :br#9600:
> 
>   cua00|For i386,macppc:\
>   :dv=/dev/cua00:tc=unixhost:
> 
>   cuaa|For sparc:\
>   :dv=/dev/cuaa:tc=unixhost:
> 
> 
> The remote(5) manpage describes br, dc, dv
> but not tc, which seems to be used here as an include.
> Is it described elsewhere or is that an omission?

The second sentence of the manual page is:

It is an ASCII file structured somewhat like the termcap(5) file.

That is slightly erroneous.  It is not "somewhat like", but "precisely like".

Around 4.4BSD this format was generalized for other purposes also, and
renamed "capability database", with cap_mkdb(1) and cgetent(3)
functions.

Thus, the cu(1) code uses the cgetent(3) family of library functions,
and thus gains the "tc" capability, which is similar to cpp "include".

Other "capability database" format details not documented in remote(5)
percolate up (for example, the behaviour of '\' is not entirely
intuitive), and these narrow details are not documented in remote(5)
either... how far should this go?

As to where "tc" is documented:

In termcap(5), "tc" is explained thus:

 tc   str  Entry of similar terminal; must be last.

I'll admit that is poor and vague.

It is explained carefully in the cgetent(3) manual page, in the
subsection "Capability database semantics", but that page isn't Xr'd,
and the subsection is so far down the page I am not sure a reader would
scan far enough down to learn anything.

I don't know what precisely should be done.



Re: tc= in remote(5) example

2021-02-18 Thread trondd
On Thu, February 18, 2021 11:38 am, Jan Stary wrote:
> /etc/examples/remote contains the following stanzas:
>
>   unixhost:\
>   :br#9600:
>
>   cua00|For i386,macppc:\
>   :dv=/dev/cua00:tc=unixhost:
>
>   cuaa|For sparc:\
>   :dv=/dev/cuaa:tc=unixhost:
>
>
> The remote(5) manpage describes br, dc, dv
> but not tc, which seems to be used here as an include.
> Is it described elsewhere or is that an omission?
>
>   Jan
>

References are at the top of the example file.  The most complete
description of tc is probably in cgetcap(3).



tc= in remote(5) example

2021-02-18 Thread Jan Stary
/etc/examples/remote contains the following stanzas:

unixhost:\
:br#9600:

cua00|For i386,macppc:\
:dv=/dev/cua00:tc=unixhost:

cuaa|For sparc:\
:dv=/dev/cuaa:tc=unixhost:


The remote(5) manpage describes br, dc, dv
but not tc, which seems to be used here as an include.
Is it described elsewhere or is that an omission?

Jan