ReactOS 0.4.15-dev-8241-g63935f8
Pattern.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PATTERN_MATCH_ALL   _T("*")
 

Functions

BOOL PatternMatch (const TCHAR *pszPattern, const TCHAR *pszTry)
 

Macro Definition Documentation

◆ PATTERN_MATCH_ALL

#define PATTERN_MATCH_ALL   _T("*")

Definition at line 7 of file Pattern.h.

Function Documentation

◆ PatternMatch()

BOOL PatternMatch ( const TCHAR pszPattern,
const TCHAR pszTry 
)

Definition at line 28 of file Pattern.cpp.

29{
30 while ((*pszPattern == _T('?'))||((_totlower(*pszTry)) == (_totlower(*pszPattern))))
31 {
32 if (((*pszTry) == 0) && ((*pszPattern) == 0))
33 return TRUE;
34
35 if (((*pszTry) == 0) || ((*pszPattern) == 0))
36 return FALSE;
37
38 pszTry++;
39 pszPattern++;
40 }
41
42 if (*pszPattern == _T('*'))
43 {
44 pszPattern++;
45 while (*pszTry)
46 {
47 if (PatternMatch(pszPattern,pszTry))
48 return TRUE;
49 else
50 pszTry++;
51 }
52 }
53
54 if (((*pszTry) == 0) && ((*pszPattern) == 0))
55 return TRUE;
56
57 return FALSE;
58}
BOOL PatternMatch(const TCHAR *pszPattern, const TCHAR *pszTry)
Definition: Pattern.cpp:28
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define _totlower
Definition: tchar.h:1511
#define _T(x)
Definition: vfdio.h:22

Referenced by CRegistryTree::DeleteSubkeys(), CShellCommandDeleteValue::Execute(), CShellCommandDir::Execute(), and PatternMatch().