ReactOS
0.4.16-dev-1238-gd80fdbe
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
Pattern.cpp
Go to the documentation of this file.
1
/*
2
* regexpl - Console Registry Explorer
3
*
4
* Copyright (C) 2000-2005 Nedko Arnaudov <nedko@users.sourceforge.net>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; see the file COPYING. If not, write to
18
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
* Boston, MA 02111-1307, USA.
20
*/
21
22
// Pattern.cpp: implementation of pattern functions
23
24
#include "
ph.h
"
25
26
// based on wstrcmpjoki() by Jason Filby (jasonfilby@yahoo.com)
27
// reactos kernel, services/fs/vfat/string.c
28
BOOL
PatternMatch
(
const
TCHAR
*pszPattern,
const
TCHAR
*pszTry)
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
}
PatternMatch
BOOL PatternMatch(const TCHAR *pszPattern, const TCHAR *pszTry)
Definition:
Pattern.cpp:28
TRUE
#define TRUE
Definition:
types.h:120
FALSE
#define FALSE
Definition:
types.h:117
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
_totlower
#define _totlower
Definition:
tchar.h:1511
ph.h
_T
#define _T(x)
Definition:
vfdio.h:22
TCHAR
char TCHAR
Definition:
xmlstorage.h:189
modules
rosapps
applications
sysutils
regexpl
Pattern.cpp
Generated on Tue Jun 3 2025 06:11:25 for ReactOS by
1.9.6