Commit 8b861202 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Implemented SymMatchFileNameW.

parent d707fe5a
......@@ -119,7 +119,7 @@
@ stdcall SymLoadModuleEx(long long str str double long ptr long)
@ stdcall SymLoadModuleExW(long long wstr wstr double long ptr long)
@ stdcall SymMatchFileName(str str ptr ptr)
@ stub SymMatchFileNameW
@ stdcall SymMatchFileNameW(wstr wstr ptr ptr)
@ stdcall SymMatchString(str str long)
@ stub SymMatchStringA
@ stub SymMatchStringW
......
......@@ -32,6 +32,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
static inline BOOL is_sep(char ch) {return ch == '/' || ch == '\\';}
static inline BOOL is_sepW(WCHAR ch) {return ch == '/' || ch == '\\';}
static inline const char* file_name(const char* str)
{
......@@ -146,6 +147,34 @@ BOOL WINAPI MakeSureDirectoryPathExists(LPCSTR DirPath)
}
/******************************************************************
* SymMatchFileNameW (DBGHELP.@)
*
*/
BOOL WINAPI SymMatchFileNameW(WCHAR* file, WCHAR* match,
WCHAR** filestop, WCHAR** matchstop)
{
WCHAR* fptr;
WCHAR* mptr;
TRACE("(%s %s %p %p)\n",
debugstr_w(file), debugstr_w(match), filestop, matchstop);
fptr = file + strlenW(file) - 1;
mptr = match + strlenW(match) - 1;
while (fptr >= file && mptr >= match)
{
if (toupperW(*fptr) != toupperW(*mptr) && !(is_sepW(*fptr) && is_sepW(*mptr)))
break;
fptr--; mptr--;
}
if (filestop) *filestop = fptr;
if (matchstop) *matchstop = mptr;
return mptr == match - 1;
}
/******************************************************************
* SymMatchFileName (DBGHELP.@)
*
*/
......
......@@ -1023,6 +1023,7 @@ BOOL WINAPI SearchTreeForFile(PCSTR, PCSTR, PSTR);
typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(LPCSTR, PVOID);
BOOL WINAPI EnumDirTree(HANDLE, PCSTR, PCSTR, PSTR, PENUMDIRTREE_CALLBACK, void*);
BOOL WINAPI SymMatchFileName(PSTR, PSTR, PSTR*, PSTR*);
BOOL WINAPI SymMatchFileNameW(PWSTR, PWSTR, PWSTR*, PWSTR*);
PCHAR WINAPI SymSetHomeDirectory(HANDLE, PCSTR);
PCHAR WINAPI SymGetHomeDirectory(DWORD, PSTR, size_t);
#define hdBase 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment