[PATCH 08/11] xfree86: Add InputClass match type for non-path pattern matching

Jamey Sharp jamey at minilop.net
Thu May 20 09:43:30 PDT 2010


I haven't tried compiling it, but doesn't this introduce a warning
about MatchPattern being unused? I think you should just squash it
together with the next patch, which uses it.

I don't feel qualified to review the next patch though. :-)

Jamey

On Thu, May 20, 2010 at 7:09 AM, Dan Nicholson <dbn.lists at gmail.com> wrote:
> We had MatchPathPattern for shell pattern matching on paths, and this
> adds a normal variant, MatchPattern. The difference is the FNM_PATHNAME
> flag in fnmatch(3).
>
> Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
> ---
>  hw/xfree86/common/xf86Xinput.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
> index 2396e33..0304c55 100644
> --- a/hw/xfree86/common/xf86Xinput.c
> +++ b/hw/xfree86/common/xf86Xinput.c
> @@ -526,6 +526,16 @@ MatchSubstring(const char *attr, const char *pattern)
>
>  #ifdef HAVE_FNMATCH_H
>  static int
> +MatchPattern(const char *attr, const char *pattern)
> +{
> +    return fnmatch(pattern, attr, 0);
> +}
> +#else
> +#define MatchPattern MatchSubstring
> +#endif
> +
> +#ifdef HAVE_FNMATCH_H
> +static int
>  MatchPathPattern(const char *attr, const char *pattern)
>  {
>     return fnmatch(pattern, attr, FNM_PATHNAME);
> --
> 1.6.6.1
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>


More information about the xorg-devel mailing list