dbghelp: Implemented SymMatchFileNameW.
This commit is contained in:
parent
d707fe5ac3
commit
8b861202ba
|
@ -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)
|
||||
{
|
||||
|
@ -145,6 +146,34 @@ BOOL WINAPI MakeSureDirectoryPathExists(LPCSTR DirPath)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* 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
|
||||
|
|
Loading…
Reference in New Issue