20 Oct
2009
20 Oct
'09
8:06 a.m.
Hib Eris <hib(a)hiberis.nl> writes:
+static BOOL merge_type_match(LPCWSTR type1, LPCWSTR type2) +{ + const WCHAR szl[] = {'l', 0}; + const WCHAR szs[] = {'s', 0}; + const WCHAR szL[] = {'L', 0}; + const WCHAR szS[] = {'S', 0}; + + if ((!StrCmpNW(type1, szl, 1) || !StrCmpNW(type1, szs, 1)) && + (!StrCmpNW(type2, szl, 1) || !StrCmpNW(type2, szs, 1))) + return TRUE; + + if ((!StrCmpNW(type1, szL, 1) || !StrCmpNW(type1, szS, 1)) && + (!StrCmpNW(type2, szL, 1) || !StrCmpNW(type2, szS, 1))) + return TRUE; + + return !StrCmpNW(type1, type2, 1); +}
Surely you don't need StrCmpNW to compare one character... -- Alexandre Julliard julliard(a)winehq.org