File: match.hpp

package info (click to toggle)
unrar-nonfree 1%3A4.1.4-1%2Bdeb7u1
  • links: PTS
  • area: non-free
  • in suites: wheezy
  • size: 1,120 kB
  • sloc: cpp: 21,159; makefile: 32; sh: 10
file content (35 lines) | stat: -rw-r--r-- 1,362 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef _RAR_MATCH_
#define _RAR_MATCH_

enum {
   MATCH_NAMES,        // Paths are ignored.
                       // Compares names only using wildcards.

   MATCH_SUBPATHONLY,  // Paths must match either exactly or path in wildcard
                       // must be present in the beginning of file path.
                       // For example, "c:\path1\*" or "c:\path1" will match 
                       // "c:\path1\path2\file".
                       // Names are not compared.

   MATCH_EXACT,        // Paths must match exactly.
                       // Names must match exactly.

   MATCH_EXACTPATH,    // Paths must match exactly.
                       // Names are compared using wildcards.

   MATCH_SUBPATH,      // Names must be the same, but path in mask is allowed
                       // to be only a part of name path. In other words,
                       // we match all files matching the file mask 
                       // in current folder and subfolders.

   MATCH_WILDSUBPATH   // Works as MATCH_SUBPATH if file mask contains
                       // wildcards and as MATCH_EXACTPATH otherwise.
};

#define MATCH_MODEMASK           0x0000ffff
#define MATCH_FORCECASESENSITIVE 0x80000000

bool CmpName(const char *Wildcard,const char *Name,int CmpMode);
bool CmpName(const wchar *Wildcard,const wchar *Name,int CmpMode);

#endif