Subject: Re: port-amd64/34282: console color is broken on amd64 when using pkgsrc/misc/screen on amd64
To: George Georgalis <george@galis.org>
From: Thomas Dickey <dickey@radix.net>
List: netbsd-bugs
Date: 10/05/2006 12:20:00
--SUOF0GtieIMvvwua
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, Oct 05, 2006 at 11:30:02AM -0400, George Georgalis wrote:
> While I see the logic that the client xterm/termcap is very
> important, I cannot make any sense as to why my amd64 host
> is having problems while the i386 does not. If anyone could
> elucidate that, I am very curious.
I think I mentioned that - here's a more verbose attempt at explaining it.
a) termcap entries are limited to 1023 bytes.
Programs that use termcap assume this, and provide a buffer
of 1024 bytes to hold the data.
b) some entries (such as screen's) are mechanically derived from
terminfo entries which can be much longer (4096 bytes).
c) NetBSD termcap library checks for termcap entries longer than
1023 bytes. If it is asked to retrieve one that is longer,
it returns a modified version of the entry: limited to 1023
bytes and using an address-pointer in a special capability
entry which tells the library where to find the rest of the
data. =20
d) i386 has 32-bit addresses, and amd64 has 64-bit addresses.
The special capability entry's address-pointer will use more
bytes.
=20
e) Perhaps there is a logic error, and the pointer value
as read into the application is truncated. If the pointer
to the additional information is unusable, the application
cannot get the data. Color information (from a terminfo
entry as noted above) is usually on the end of the resulting
termcap entry.
f) Generally the tgetstr() termcap function returns "OOPS" for
missing data.
--=20
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
--SUOF0GtieIMvvwua
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (SunOS)
Comment: For info see http://www.gnupg.org
iD8DBQFFJTCttIqByHxlDocRAiY8AJ9A73l8v/3ZWksrKm96c7/mMrJU6wCfVShY
+un/ywP1Ruu2jXFwtntmBq4=
=Ykc0
-----END PGP SIGNATURE-----
--SUOF0GtieIMvvwua--