Subject: Re: Documentation for the wsscroll patch
To: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
From: David Ferlier <david@netbsd-fr.org>
List: current-users
Date: 01/28/2003 14:08:41
On Tue, Jan 28, 2003 at 10:05:48AM +0100, Pavel Cahyna wrote:
> Hello,
>
> you write that it's for i386 only, but the files affected by the patch
I said i386, cause i just tested it on i386, but it can work on any machine
with a vga card.
> are all machine-independent. Why?
The api is machine-independent: in fact, it adds a function to the
wsdisplay_accessops structure.
Each display device driver that attaches to a wsdisplay device and which
supports scrolling just has to put a pointer to a function in its
wsdisplay_accessops (see the file vga.c my patch modifies). When you press
a key whose command is one of the Cmd_Scroll* commands i added,
wskbd_translate calls wskbd_command. This function calls the scroll function
with the good arguments (number of lines).
If the scroll function's pointer of the wsdisplay_accessops of the driver is
not null it calls it, and it calls a low-level md function (for vga, it's
vga_scroll).
So the interface is machine-independant. Device displays who can't scroll
just have to put a null pointer for scroll.
>
> If you make a version which will work on 1.6_STABLE, I probably could
> try it on an alpha.
It works on 1.6_STABLE (i tested it on a friend's machine).
Thanks for asking that, i'll modify the documentation.
David
>
> Bye Pavel
>
--
David Ferlier - david@netbsd-fr.org
www.NetBSD.org - Of Course It Runs NetBSD