mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xserver: hw/xfree86/parser: prepare types for pattern matching
It is patch 1/5 of a series that refactors matching input and output devices to classes and extends possibilities to describe them, in particular, it allows use of regular expressions. This patch introduces enum xf86Match for different modes of matching present in Xserver code: case sensitive/insensitive, equal strings, being substring, comparison of filenames or pathnames etc, and introduces struct xf86MatchPattern to hold a pattern together with a mode. These types are not used yet. Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
This commit is contained in:
committed by
Enrico Weigelt
parent
967ae609b6
commit
a94f76459b
@@ -305,9 +305,28 @@ typedef struct {
|
||||
typedef struct {
|
||||
struct xorg_list entry;
|
||||
char **values;
|
||||
struct xorg_list patterns;
|
||||
Bool is_negated;
|
||||
} xf86MatchGroup;
|
||||
|
||||
typedef enum {
|
||||
MATCH_IS_INVALID,
|
||||
MATCH_EXACT,
|
||||
MATCH_EXACT_NOCASE,
|
||||
MATCH_AS_SUBSTRING,
|
||||
MATCH_AS_SUBSTRING_NOCASE,
|
||||
MATCH_AS_FILENAME,
|
||||
MATCH_AS_PATHNAME,
|
||||
MATCH_SUBSTRINGS_SEQUENCE,
|
||||
} xf86MatchMode;
|
||||
|
||||
typedef struct {
|
||||
struct xorg_list entry;
|
||||
xf86MatchMode mode;
|
||||
Bool is_negated;
|
||||
char *str;
|
||||
} xf86MatchPattern;
|
||||
|
||||
typedef struct {
|
||||
GenericListRec list;
|
||||
char *identifier;
|
||||
|
||||
Reference in New Issue
Block a user