1 #ifndef _RAR_MATCH_
2 #define _RAR_MATCH_
3 
4 enum {
5    MATCH_NAMES,        // Paths are ignored.
6                        // Compares names only using wildcards.
7 
8    MATCH_SUBPATHONLY,  // Paths must match either exactly or path in wildcard
9                        // must be present in the beginning of file path.
10                        // For example, "c:\path1\*" or "c:\path1" will match
11                        // "c:\path1\path2\file".
12                        // Names are not compared.
13 
14    MATCH_EXACT,        // Paths must match exactly.
15                        // Names must match exactly.
16 
17    MATCH_ALLWILD,      // Paths and names are compared using wildcards.
18                        // Unlike MATCH_SUBPATH, paths do not match subdirs
19                        // unless a wildcard tells so.
20 
21    MATCH_EXACTPATH,    // Paths must match exactly.
22                        // Names are compared using wildcards.
23 
24    MATCH_SUBPATH,      // Names must be the same, but path in mask is allowed
25                        // to be only a part of name path. In other words,
26                        // we match all files matching the file mask
27                        // in current folder and subfolders.
28 
29    MATCH_WILDSUBPATH   // Works as MATCH_SUBPATH if file mask contains
30                        // wildcards and as MATCH_EXACTPATH otherwise.
31 };
32 
33 #define MATCH_MODEMASK           0x0000ffff
34 #define MATCH_FORCECASESENSITIVE 0x80000000
35 
36 bool CmpName(const wchar *Wildcard,const wchar *Name,int CmpMode);
37 
38 #endif
39