Commit 4501ab0a authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use wcscmp() instead of strcmpW().

parent 0d1b7737
......@@ -779,12 +779,12 @@ static inline BOOL xml_elem_cmp(const struct xml_elem *elem, const WCHAR *str, c
{
if (!xmlstr_cmp( &elem->name, str )) return FALSE;
if (xmlstr_cmp( &elem->ns, namespace )) return TRUE;
if (!strcmpW( namespace, asmv1W ))
if (!wcscmp( namespace, asmv1W ))
{
if (xmlstr_cmp( &elem->ns, asmv2W )) return TRUE;
if (xmlstr_cmp( &elem->ns, asmv3W )) return TRUE;
}
else if (!strcmpW( namespace, asmv2W ))
else if (!wcscmp( namespace, asmv2W ))
{
if (xmlstr_cmp( &elem->ns, asmv3W )) return TRUE;
}
......@@ -1014,7 +1014,7 @@ static BOOL is_matching_identity( const struct assembly_identity *id1,
if (id1->language && id2->language && !is_matching_string( id1->language, id2->language ))
{
if (strcmpW( wildcardW, id1->language ) && strcmpW( wildcardW, id2->language ))
if (wcscmp( wildcardW, id1->language ) && wcscmp( wildcardW, id2->language ))
return FALSE;
}
if (id1->version.major != id2->version.major) return FALSE;
......@@ -2235,7 +2235,7 @@ static void parse_dependent_assembly_elem( xmlbuf_t *xmlbuf, struct actctx_loade
{
parse_assembly_identity_elem(xmlbuf, acl->actctx, &ai, &elem);
/* store the newly found identity for later loading */
if (ai.arch && !strcmpW(ai.arch, wildcardW)) ai.arch = strdupW( current_archW );
if (ai.arch && !wcscmp(ai.arch, wildcardW)) ai.arch = strdupW( current_archW );
TRACE( "adding name=%s version=%s arch=%s\n",
debugstr_w(ai.name), debugstr_version(&ai.version), debugstr_w(ai.arch) );
if (!add_dependent_assembly_id(acl, &ai)) set_error( xmlbuf );
......@@ -4926,8 +4926,8 @@ static const WCHAR *find_app_settings( ACTIVATION_CONTEXT *actctx, const WCHAR *
{
struct entity *entity = &assembly->entities.base[j];
if (entity->kind == ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS &&
!strcmpW( entity->u.settings.name, settings ) &&
!strcmpW( entity->u.settings.ns, ns ))
!wcscmp( entity->u.settings.name, settings ) &&
!wcscmp( entity->u.settings.ns, ns ))
return entity->u.settings.value;
}
}
......@@ -5589,10 +5589,10 @@ NTSTATUS WINAPI RtlQueryActivationContextApplicationSettings( DWORD flags, HANDL
if (ns)
{
if (strcmpW( ns, windowsSettings2005NSW ) &&
strcmpW( ns, windowsSettings2011NSW ) &&
strcmpW( ns, windowsSettings2016NSW ) &&
strcmpW( ns, windowsSettings2017NSW ))
if (wcscmp( ns, windowsSettings2005NSW ) &&
wcscmp( ns, windowsSettings2011NSW ) &&
wcscmp( ns, windowsSettings2016NSW ) &&
wcscmp( ns, windowsSettings2017NSW ))
return STATUS_INVALID_PARAMETER;
}
else ns = windowsSettings2005NSW;
......
......@@ -1820,7 +1820,7 @@ static int name_compare( const void *a, const void *b )
const struct dir_data_names *file_b = (const struct dir_data_names *)b;
int ret = RtlCompareUnicodeStrings( file_a->long_name, wcslen(file_a->long_name),
file_b->long_name, wcslen(file_b->long_name), TRUE );
if (!ret) ret = strcmpW( file_a->long_name, file_b->long_name );
if (!ret) ret = wcscmp( file_a->long_name, file_b->long_name );
return ret;
}
......
......@@ -847,7 +847,7 @@ static LCID unix_locale_to_lcid( const char *unix_name )
if (!(p = wcspbrk( buffer, sepW )))
{
if (!strcmpW( buffer, posixW ) || !strcmpW( buffer, cW ))
if (!wcscmp( buffer, posixW ) || !wcscmp( buffer, cW ))
return MAKELCID( MAKELANGID(LANG_ENGLISH,SUBLANG_DEFAULT), SORT_DEFAULT );
wcscpy( win_name, buffer );
}
......@@ -877,8 +877,8 @@ static LCID unix_locale_to_lcid( const char *unix_name )
wcscpy( win_name, buffer );
if (modifier)
{
if (!strcmpW( modifier, latinW )) wcscat( win_name, latnW );
else if (!strcmpW( modifier, euroW )) {} /* ignore */
if (!wcscmp( modifier, latinW )) wcscat( win_name, latnW );
else if (!wcscmp( modifier, euroW )) {} /* ignore */
else return 0;
}
if (country)
......
......@@ -311,6 +311,7 @@ int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... );
#define wcslen(s) NTDLL_wcslen(s)
#define wcscspn(s,r) NTDLL_wcscspn(s,r)
#define wcsspn(s,a) NTDLL_wcsspn(s,a)
#define wcscmp(s1,s2) NTDLL_wcscmp(s1,s2)
/* convert from straight ASCII to Unicode without depending on the current codepage */
static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
......
......@@ -47,7 +47,6 @@
#include "windef.h"
#include "winternl.h"
#include "wine/exception.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "ntdll_misc.h"
......@@ -662,7 +661,7 @@ static int compare_tz_key(const void *a, const void *b)
const struct tz_name_map *map_a, *map_b;
map_a = (const struct tz_name_map *)a;
map_b = (const struct tz_name_map *)b;
return strcmpW(map_a->key_name, map_b->key_name);
return wcscmp(map_a->key_name, map_b->key_name);
}
static BOOL match_tz_name(const char* tz_name,
......
......@@ -31,7 +31,6 @@
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "ntdll_misc.h"
#include "ddk/wdm.h"
......@@ -458,7 +457,7 @@ static BOOL parse_win_version( HANDLE hkey )
for (i = 0; i < ARRAY_SIZE(version_names); i++)
{
if (strcmpW( version_names[i].name, name )) continue;
if (wcscmp( version_names[i].name, name )) continue;
current_version = &VersionData[version_names[i].ver];
TRACE( "got win version %s\n", debugstr_w(version_names[i].name) );
return TRUE;
......
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