2 * regexpl - Console Registry Explorer
4 * Copyright (C) 2000-2005 Nedko Arnaudov <nedko@users.sourceforge.net>
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.
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.
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.
22 // Pattern.cpp: implementation of pattern functions
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
)
30 while ((*pszPattern
== _T('?'))||((_totlower(*pszTry
)) == (_totlower(*pszPattern
))))
32 if (((*pszTry
) == 0) && ((*pszPattern
) == 0))
35 if (((*pszTry
) == 0) || ((*pszPattern
) == 0))
42 if (*pszPattern
== _T('*'))
47 if (PatternMatch(pszPattern
,pszTry
))
54 if (((*pszTry
) == 0) && ((*pszPattern
) == 0))