Subject: Re: terminal does not reverse, highlight text
To: leon zadorin <leonleon77@gmail.com>
From: Michael Lorenz <macallan@netbsd.org>
List: port-macppc
Date: 02/10/2007 01:11:38
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Feb 9, 2007, at 21:09, leon zadorin wrote:

>> cvs update dev/pci/radeonfb.c at some point tomorrow ;)
>
> in the meantime, i had a cursive look into the aforementioned file and
> somethin similar to the following patch works for me
> (the only thing is, i am not sure how it will deal with underline
> attributes if such exist?):
>
> 2286a2287
>> 	int const reverse_display = attr >> 8 & WSATTR_REVERSE;
> 2297,2298c2298,2299
> < 	bg = ri->ri_devcmap[(attr >> 16) & 0xf];
> < 	fg = ri->ri_devcmap[(attr >> 24) & 0xf];
> ---
>> 	bg = ri->ri_devcmap[attr >> (reverse_display ? 24 : 16) & 0xf];
>> 	fg = ri->ri_devcmap[attr >> (reverse_display ? 16 : 24) & 0xf];
>
> (it is in the "radeonfb_putchar" call, and the attr seems to be passed
> and set (for screen reversal) in radeonfb_allocattr call)...

I had a look at radeonfb and other drivers - I do get reversed text in 
less for search results etc., without the driver claiming it supports 
the reverse attribute. Which version of the NetBSD kernel are you 
using? Maybe someone fixed that in wsdisplay ( after all - implementing 
reverse in the upper layer is just as trivial as doing it in the 
drivers themselves )

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBRc1iGspnzkX8Yg2nAQKTEwf/eTDoeBp5QB8cFJwX1KoMWYlI0N2UQWf+
hdC4Cqy7GJhnwT2v5sPdksLYLI8eaHlmgYebpl6QeT387+GoSwsUHSUMzxai0p4C
r7dh62ADthT5bGJB6jY8EkoR73rd5fAzqBthsepLQqRraj7G6zG2qFLQ/rCAo0QR
+iWrv2h41aM35nme/jLq9Ea4639LAef7fzyaTDWCLhGLwOpXnA5FTVvwWJQP6/bz
vwoZldBj7z54PyfiWq+v+BPbGCkq9cqInD2XGtV3I9Yev1MNQ+MhZDs21lD6+unK
ieWambqfSQlzmtLAggfO+wQxXMdCY/aYFxqgomOXPLbQUufujdN3LQ==
=zlP0
-----END PGP SIGNATURE-----