Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e32d62df
Commit
e32d62df
authored
Nov 15, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscms: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
236fa496
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
15 deletions
+8
-15
profile.c
dlls/mscms/profile.c
+3
-5
profile.c
dlls/mscms/tests/profile.c
+5
-10
No files found.
dlls/mscms/profile.c
View file @
e32d62df
...
...
@@ -615,7 +615,6 @@ BOOL WINAPI GetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR profi
static
BOOL
header_from_file
(
LPCWSTR
file
,
PPROFILEHEADER
header
)
{
static
const
WCHAR
slash
[]
=
{
'\\'
,
0
};
BOOL
ret
;
PROFILE
profile
;
WCHAR
path
[
MAX_PATH
];
...
...
@@ -628,13 +627,13 @@ static BOOL header_from_file( LPCWSTR file, PPROFILEHEADER header )
WARN
(
"Can't retrieve color directory
\n
"
);
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
"
);
return
FALSE
;
}
lstrcatW
(
path
,
slash
);
lstrcatW
(
path
,
L"
\\
"
);
lstrcatW
(
path
,
file
);
profile
.
dwType
=
PROFILE_FILENAME
;
...
...
@@ -1058,7 +1057,6 @@ BOOL WINAPI InstallColorProfileW( PCWSTR machine, PCWSTR profile )
{
WCHAR
dest
[
MAX_PATH
],
base
[
MAX_PATH
];
DWORD
size
=
sizeof
(
dest
);
static
const
WCHAR
slash
[]
=
{
'\\'
,
0
};
TRACE
(
"( %s )
\n
"
,
debugstr_w
(
profile
)
);
...
...
@@ -1068,7 +1066,7 @@ BOOL WINAPI InstallColorProfileW( PCWSTR machine, PCWSTR profile )
basename
(
profile
,
base
);
lstrcatW
(
dest
,
slash
);
lstrcatW
(
dest
,
L"
\\
"
);
lstrcatW
(
dest
,
base
);
/* Is source equal to destination? */
...
...
dlls/mscms/tests/profile.c
View file @
e32d62df
...
...
@@ -102,7 +102,7 @@ static BOOL init_function_ptrs( void )
}
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
* 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"
;
static
const
WCHAR
profile1W
[]
=
{
'\\'
,
'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
};
L"
\\
color
\\
srgb color space profile.icm"
;
static
const
WCHAR
profile2W
[]
=
{
'\\'
,
's'
,
'p'
,
'o'
,
'o'
,
'l'
,
'\\'
,
'd'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
's'
,
'\\'
,
'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
};
L"
\\
spool
\\
drivers
\\
color
\\
srgb color space profile.icm"
;
static
BOOL
have_color_profile
;
...
...
@@ -832,7 +829,6 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi
{
WCHAR
dest
[
MAX_PATH
],
base
[
MAX_PATH
];
DWORD
size
=
sizeof
(
dest
);
WCHAR
slash
[]
=
{
'\\'
,
0
};
HANDLE
handle
;
SetLastError
(
0xdeadbeef
);
...
...
@@ -849,7 +845,7 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi
MSCMS_basenameW
(
testprofileW
,
base
);
lstrcatW
(
dest
,
slash
);
lstrcatW
(
dest
,
L"
\\
"
);
lstrcatW
(
dest
,
base
);
/* Check if the profile is really there */
...
...
@@ -1210,7 +1206,6 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW )
WCHAR
dest
[
MAX_PATH
],
base
[
MAX_PATH
];
char
destA
[
MAX_PATH
];
DWORD
size
=
sizeof
(
dest
);
WCHAR
slash
[]
=
{
'\\'
,
0
};
HANDLE
handle
;
int
bytes_copied
;
...
...
@@ -1228,7 +1223,7 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW )
MSCMS_basenameW
(
testprofileW
,
base
);
lstrcatW
(
dest
,
slash
);
lstrcatW
(
dest
,
L"
\\
"
);
lstrcatW
(
dest
,
base
);
ret
=
pUninstallColorProfileW
(
NULL
,
dest
,
TRUE
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment