testing strategy

Peter Hutterer peter.hutterer at who-t.net
Sun Jul 20 17:10:28 PDT 2008


On Sun, Jul 20, 2008 at 03:33:54PM -0400, Chuck Robey wrote:
> I just finished spending 4 hours playing about with hw/xfree86/parser/cpconfig
> (I wrote a small makefile for it) and I've been swapping various functions I
> found in that directory, trying to find out how to parse the config file.  I get
> it how to print various stuff from List-s but I can't tell the right way to go
> about making the List s yet.  If there was an example of how to find all of the
> following config section, I would truly appreciate this.  Don't need to tell me
> how to do it, just list the functions needed, I'll experiment out the rest:
> 
> Section "InputDevice"
> 
>     # generated from default
>     Identifier     "Mouse0"
>     Driver         "mouse"
>     Option         "Protocol" "auto"
>     Option         "Device" "/dev/sysmouse"
>     Option         "Emulate3Buttons" "no"
>     Option         "ZAxisMapping" "4 5"
> EndSection
 

the default section is always

Section "InputDevice"
  Identifier "..."
  Driver "..."
  Device "..." # not always required
  Option "whatever" "values"
EndSection

You can define Options in the driver, as much as you want.
xf86CheckIntOption, xf86CheckStrOption, etc. hand you the value when you need
it.

> I know how to register all the values (valuators and buttons) and send events, I
> just need to read the conf file.  cpconfig is not terribly  useful at this,
> although it DOES work.

why do you need to read the config file again? the server does it anyway, you
just ask the server for the values applicable for your device. What am I
missing here?
 
Cheers,
  Peter



More information about the xorg mailing list