mscms: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
236fa496da
commit
e32d62df43
|
@ -615,7 +615,6 @@ BOOL WINAPI GetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR profi
|
||||||
|
|
||||||
static BOOL header_from_file( LPCWSTR file, PPROFILEHEADER header )
|
static BOOL header_from_file( LPCWSTR file, PPROFILEHEADER header )
|
||||||
{
|
{
|
||||||
static const WCHAR slash[] = {'\\',0};
|
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
PROFILE profile;
|
PROFILE profile;
|
||||||
WCHAR path[MAX_PATH];
|
WCHAR path[MAX_PATH];
|
||||||
|
@ -628,13 +627,13 @@ static BOOL header_from_file( LPCWSTR file, PPROFILEHEADER header )
|
||||||
WARN( "Can't retrieve color directory\n" );
|
WARN( "Can't retrieve color directory\n" );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (size + sizeof(slash) + sizeof(WCHAR) * lstrlenW( file ) > sizeof(path))
|
if (size + sizeof(L"\\") + sizeof(WCHAR) * lstrlenW( file ) > sizeof(path))
|
||||||
{
|
{
|
||||||
WARN( "Filename too long\n" );
|
WARN( "Filename too long\n" );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
lstrcatW( path, slash );
|
lstrcatW( path, L"\\" );
|
||||||
lstrcatW( path, file );
|
lstrcatW( path, file );
|
||||||
|
|
||||||
profile.dwType = PROFILE_FILENAME;
|
profile.dwType = PROFILE_FILENAME;
|
||||||
|
@ -1058,7 +1057,6 @@ BOOL WINAPI InstallColorProfileW( PCWSTR machine, PCWSTR profile )
|
||||||
{
|
{
|
||||||
WCHAR dest[MAX_PATH], base[MAX_PATH];
|
WCHAR dest[MAX_PATH], base[MAX_PATH];
|
||||||
DWORD size = sizeof(dest);
|
DWORD size = sizeof(dest);
|
||||||
static const WCHAR slash[] = { '\\', 0 };
|
|
||||||
|
|
||||||
TRACE( "( %s )\n", debugstr_w(profile) );
|
TRACE( "( %s )\n", debugstr_w(profile) );
|
||||||
|
|
||||||
|
@ -1068,7 +1066,7 @@ BOOL WINAPI InstallColorProfileW( PCWSTR machine, PCWSTR profile )
|
||||||
|
|
||||||
basename( profile, base );
|
basename( profile, base );
|
||||||
|
|
||||||
lstrcatW( dest, slash );
|
lstrcatW( dest, L"\\" );
|
||||||
lstrcatW( dest, base );
|
lstrcatW( dest, base );
|
||||||
|
|
||||||
/* Is source equal to destination? */
|
/* Is source equal to destination? */
|
||||||
|
|
|
@ -102,7 +102,7 @@ static BOOL init_function_ptrs( void )
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char machine[] = "dummy";
|
static const char machine[] = "dummy";
|
||||||
static const WCHAR machineW[] = { 'd','u','m','m','y',0 };
|
static const WCHAR machineW[] = L"dummy";
|
||||||
|
|
||||||
/* To do any real functionality testing with this suite you need a copy of
|
/* To do any real functionality testing with this suite you need a copy of
|
||||||
* the freely distributable standard RGB color space profile. It comes
|
* the freely distributable standard RGB color space profile. It comes
|
||||||
|
@ -119,12 +119,9 @@ static const char profile2[] =
|
||||||
"\\spool\\drivers\\color\\srgb color space profile.icm";
|
"\\spool\\drivers\\color\\srgb color space profile.icm";
|
||||||
|
|
||||||
static const WCHAR profile1W[] =
|
static const WCHAR profile1W[] =
|
||||||
{ '\\','c','o','l','o','r','\\','s','r','g','b',' ','c','o','l','o','r',' ',
|
L"\\color\\srgb color space profile.icm";
|
||||||
's','p','a','c','e',' ','p','r','o','f','i','l','e','.','i','c','m',0 };
|
|
||||||
static const WCHAR profile2W[] =
|
static const WCHAR profile2W[] =
|
||||||
{ '\\','s','p','o','o','l','\\','d','r','i','v','e','r','s','\\',
|
L"\\spool\\drivers\\color\\srgb color space profile.icm";
|
||||||
'c','o','l','o','r','\\','s','r','g','b',' ','c','o','l','o','r',' ',
|
|
||||||
's','p','a','c','e',' ','p','r','o','f','i','l','e','.','i','c','m',0 };
|
|
||||||
|
|
||||||
static BOOL have_color_profile;
|
static BOOL have_color_profile;
|
||||||
|
|
||||||
|
@ -832,7 +829,6 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi
|
||||||
{
|
{
|
||||||
WCHAR dest[MAX_PATH], base[MAX_PATH];
|
WCHAR dest[MAX_PATH], base[MAX_PATH];
|
||||||
DWORD size = sizeof(dest);
|
DWORD size = sizeof(dest);
|
||||||
WCHAR slash[] = { '\\', 0 };
|
|
||||||
HANDLE handle;
|
HANDLE handle;
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
|
@ -849,7 +845,7 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi
|
||||||
|
|
||||||
MSCMS_basenameW( testprofileW, base );
|
MSCMS_basenameW( testprofileW, base );
|
||||||
|
|
||||||
lstrcatW( dest, slash );
|
lstrcatW( dest, L"\\" );
|
||||||
lstrcatW( dest, base );
|
lstrcatW( dest, base );
|
||||||
|
|
||||||
/* Check if the profile is really there */
|
/* Check if the profile is really there */
|
||||||
|
@ -1210,7 +1206,6 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW )
|
||||||
WCHAR dest[MAX_PATH], base[MAX_PATH];
|
WCHAR dest[MAX_PATH], base[MAX_PATH];
|
||||||
char destA[MAX_PATH];
|
char destA[MAX_PATH];
|
||||||
DWORD size = sizeof(dest);
|
DWORD size = sizeof(dest);
|
||||||
WCHAR slash[] = { '\\', 0 };
|
|
||||||
HANDLE handle;
|
HANDLE handle;
|
||||||
int bytes_copied;
|
int bytes_copied;
|
||||||
|
|
||||||
|
@ -1228,7 +1223,7 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW )
|
||||||
|
|
||||||
MSCMS_basenameW( testprofileW, base );
|
MSCMS_basenameW( testprofileW, base );
|
||||||
|
|
||||||
lstrcatW( dest, slash );
|
lstrcatW( dest, L"\\" );
|
||||||
lstrcatW( dest, base );
|
lstrcatW( dest, base );
|
||||||
|
|
||||||
ret = pUninstallColorProfileW( NULL, dest, TRUE );
|
ret = pUninstallColorProfileW( NULL, dest, TRUE );
|
||||||
|
|
Loading…
Reference in New Issue