[PATCH 1/2 v3] xserver: Use constants for matching modes and make xf86MatchGroup a list

Oleh Nykyforchyn oleh.nyk at gmail.com
Sat Dec 3 08:56:17 PST 2011


Please Your comments and suggestions about the two patches submitted in November.


Oleh Nykyforchyn

On Sat, 12 Nov 2011 17:24:45 +0200
"Oleh R. Nykyforchyn" <oleh.nyk at gmail.com> wrote:

> Remade to include correct freeing of val.str after use, cf.
> [PATCH 4/5] parser: free val.str after xf86getBoolValue,
> http://lists.x.org/archives/xorg-devel/2011-November/026773.html
> Moreover, for tokens of type STRING val.str should also be freed.
> Make a match group a list of patterns instead of an array of string, to unify
> with other structures in the parser, to prepare for introduction of regular
> expression in Match* statements, and to keep a matching mode field in
> a pattern together with a pattern string. This allows to join all match_*
> functions in InputClass.c into one "multi-mode" function.
> Signed-off-by: Oleh Nykyforchyn <oleh.nyk at gmail.com>
On Sat, 12 Nov 2011 17:25:09 +0200
"Oleh R. Nykyforchyn" <oleh.nyk at gmail.com> wrote:

> Together with "simple" matching modes (via strcmp() or fnmatch() etc), which
> are natural for different types on input device attributes, it will be allowed
> to match against extended regular expressions (cf. man 7 regex). For example,
> an InputClass with
>     MatchLayout "regex:/^Seat[0-5]$/"
> is applied to a device only in layouts Seat0, Seat1, ..., Seat5. In particular,
> this can allow for path matching on systems without fnmatch(). A regular
> expression is compiled only before its first use.
> Signed-off-by: Oleh Nykyforchyn <oleh.nyk at gmail.com>

More information about the xorg-devel mailing list