Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
11fb2a59
Commit
11fb2a59
authored
Nov 10, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscms: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
daf9f128
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
42 deletions
+19
-42
Makefile.in
dlls/mscms/Makefile.in
+2
-0
handle.c
dlls/mscms/handle.c
+1
-3
icc.c
dlls/mscms/icc.c
+0
-2
mscms_main.c
dlls/mscms/mscms_main.c
+1
-5
profile.c
dlls/mscms/profile.c
+13
-26
stub.c
dlls/mscms/stub.c
+1
-3
transform.c
dlls/mscms/transform.c
+1
-3
No files found.
dlls/mscms/Makefile.in
View file @
11fb2a59
...
...
@@ -4,6 +4,8 @@ IMPORTS = shlwapi advapi32
EXTRAINCL
=
$(LCMS2_CFLAGS)
EXTRALIBS
=
$(LCMS2_LIBS)
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
handle.c
\
icc.c
\
...
...
dlls/mscms/handle.c
View file @
11fb2a59
...
...
@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/debug.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -28,6 +25,7 @@
#include "wingdi.h"
#include "winuser.h"
#include "icm.h"
#include "wine/debug.h"
#include "mscms_priv.h"
...
...
dlls/mscms/icc.c
View file @
11fb2a59
...
...
@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
...
...
dlls/mscms/mscms_main.c
View file @
11fb2a59
...
...
@@ -18,11 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -31,6 +26,7 @@
#include "winuser.h"
#include "winternl.h"
#include "icm.h"
#include "wine/debug.h"
#include "mscms_priv.h"
...
...
dlls/mscms/profile.c
View file @
11fb2a59
...
...
@@ -18,10 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -32,6 +28,7 @@
#include "winreg.h"
#include "shlwapi.h"
#include "icm.h"
#include "wine/debug.h"
#include "mscms_priv.h"
...
...
@@ -104,12 +101,6 @@ BOOL WINAPI AssociateColorProfileWithDeviceA( PCSTR machine, PCSTR profile, PCST
static
BOOL
set_profile_device_key
(
PCWSTR
file
,
const
BYTE
*
value
,
DWORD
size
)
{
static
const
WCHAR
fmtW
[]
=
{
'%'
,
'c'
,
'%'
,
'c'
,
'%'
,
'c'
,
'%'
,
'c'
,
0
};
static
const
WCHAR
icmW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
' '
,
'N'
,
'T'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'I'
,
'C'
,
'M'
,
0
};
PROFILEHEADER
header
;
PROFILE
profile
;
HPROFILE
handle
;
...
...
@@ -132,11 +123,13 @@ static BOOL set_profile_device_key( PCWSTR file, const BYTE *value, DWORD size )
SetLastError
(
ERROR_INVALID_PROFILE
);
return
FALSE
;
}
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
icmW
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
icm_key
,
NULL
);
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
L"Software
\\
Microsoft
\\
Windows NT
\\
CurrentVersion
\\
ICM"
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
icm_key
,
NULL
);
basename
(
file
,
basenameW
);
sprintfW
(
classW
,
fmtW
,
(
header
.
phClass
>>
24
)
&
0xff
,
(
header
.
phClass
>>
16
)
&
0xff
,
(
header
.
phClass
>>
8
)
&
0xff
,
header
.
phClass
&
0xff
);
swprintf
(
classW
,
ARRAY_SIZE
(
classW
),
L"%c%c%c%c"
,
(
header
.
phClass
>>
24
)
&
0xff
,
(
header
.
phClass
>>
16
)
&
0xff
,
(
header
.
phClass
>>
8
)
&
0xff
,
header
.
phClass
&
0xff
);
RegCreateKeyExW
(
icm_key
,
classW
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
class_key
,
NULL
);
if
(
value
)
RegSetValueExW
(
class_key
,
basenameW
,
0
,
REG_BINARY
,
value
,
size
);
...
...
@@ -287,8 +280,6 @@ BOOL WINAPI GetColorDirectoryA( PCSTR machine, PSTR buffer, PDWORD size )
BOOL
WINAPI
GetColorDirectoryW
(
PCWSTR
machine
,
PWSTR
buffer
,
PDWORD
size
)
{
WCHAR
colordir
[
MAX_PATH
];
static
const
WCHAR
colorsubdir
[]
=
{
'\\'
,
's'
,
'p'
,
'o'
,
'o'
,
'l'
,
'\\'
,
'd'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
's'
,
'\\'
,
'c'
,
'o'
,
'l'
,
'o'
,
'r'
,
0
};
DWORD
len
;
TRACE
(
"( %p, %p )
\n
"
,
buffer
,
size
);
...
...
@@ -296,7 +287,7 @@ BOOL WINAPI GetColorDirectoryW( PCWSTR machine, PWSTR buffer, PDWORD size )
if
(
machine
||
!
size
)
return
FALSE
;
GetSystemDirectoryW
(
colordir
,
ARRAY_SIZE
(
colordir
));
lstrcatW
(
colordir
,
colorsubdir
);
lstrcatW
(
colordir
,
L"
\\
spool
\\
drivers
\\
color"
);
len
=
lstrlenW
(
colordir
)
*
sizeof
(
WCHAR
);
...
...
@@ -573,9 +564,6 @@ BOOL WINAPI GetStandardColorSpaceProfileA( PCSTR machine, DWORD id, PSTR profile
*/
BOOL
WINAPI
GetStandardColorSpaceProfileW
(
PCWSTR
machine
,
DWORD
id
,
PWSTR
profile
,
PDWORD
size
)
{
static
const
WCHAR
rgbprofilefile
[]
=
{
'\\'
,
'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
};
WCHAR
rgbprofile
[
MAX_PATH
];
DWORD
len
=
sizeof
(
rgbprofile
);
...
...
@@ -605,7 +593,7 @@ BOOL WINAPI GetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR profi
{
case
LCS_sRGB
:
case
LCS_WINDOWS_COLOR_SPACE
:
/* FIXME */
lstrcatW
(
rgbprofile
,
rgbprofilefile
);
lstrcatW
(
rgbprofile
,
L"
\\
srgb color space profile.icm"
);
len
=
lstrlenW
(
rgbprofile
)
*
sizeof
(
WCHAR
);
if
(
*
size
<
len
)
...
...
@@ -917,7 +905,6 @@ exit:
BOOL
WINAPI
EnumColorProfilesW
(
PCWSTR
machine
,
PENUMTYPEW
record
,
PBYTE
buffer
,
PDWORD
size
,
PDWORD
number
)
{
static
const
WCHAR
spec
[]
=
{
'\\'
,
'*'
,
'i'
,
'c'
,
'm'
,
0
};
BOOL
match
,
ret
=
FALSE
;
WCHAR
colordir
[
MAX_PATH
],
glob
[
MAX_PATH
],
**
profiles
=
NULL
;
DWORD
i
,
len
=
sizeof
(
colordir
),
count
=
0
,
totalsize
=
0
;
...
...
@@ -932,14 +919,14 @@ BOOL WINAPI EnumColorProfilesW( PCWSTR machine, PENUMTYPEW record, PBYTE buffer,
record
->
dwVersion
!=
ENUM_TYPE_VERSION
)
return
FALSE
;
ret
=
GetColorDirectoryW
(
machine
,
colordir
,
&
len
);
if
(
!
ret
||
len
+
sizeof
(
spec
)
>
MAX_PATH
)
if
(
!
ret
||
len
+
ARRAY_SIZE
(
L"
\\
*icm"
)
>
MAX_PATH
)
{
WARN
(
"Can't retrieve color directory
\n
"
);
return
FALSE
;
}
lstrcpyW
(
glob
,
colordir
);
lstrcatW
(
glob
,
spec
);
lstrcatW
(
glob
,
L"
\\
*icm"
);
find
=
FindFirstFileW
(
glob
,
&
data
);
if
(
find
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
...
...
@@ -1085,7 +1072,7 @@ BOOL WINAPI InstallColorProfileW( PCWSTR machine, PCWSTR profile )
lstrcatW
(
dest
,
base
);
/* Is source equal to destination? */
if
(
!
lstrcmpW
(
profile
,
dest
))
return
TRUE
;
if
(
!
wcscmp
(
profile
,
dest
))
return
TRUE
;
return
CopyFileW
(
profile
,
dest
,
TRUE
);
}
...
...
@@ -1385,11 +1372,11 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
if
(
!
GetColorDirectoryW
(
NULL
,
NULL
,
&
size
)
&&
GetLastError
()
==
ERROR_MORE_DATA
)
{
size
+=
(
strlenW
(
profile
->
pProfileData
)
+
2
)
*
sizeof
(
WCHAR
);
size
+=
(
l
strlenW
(
profile
->
pProfileData
)
+
2
)
*
sizeof
(
WCHAR
);
if
(
!
(
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
)))
return
NULL
;
GetColorDirectoryW
(
NULL
,
path
,
&
size
);
PathAddBackslashW
(
path
);
strcatW
(
path
,
profile
->
pProfileData
);
l
strcatW
(
path
,
profile
->
pProfileData
);
}
else
return
NULL
;
handle
=
CreateFileW
(
path
,
flags
,
sharing
,
NULL
,
creation
,
0
,
NULL
);
...
...
dlls/mscms/stub.c
View file @
11fb2a59
...
...
@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/debug.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -28,6 +25,7 @@
#include "wingdi.h"
#include "winuser.h"
#include "icm.h"
#include "wine/debug.h"
#include "mscms_priv.h"
...
...
dlls/mscms/transform.c
View file @
11fb2a59
...
...
@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/debug.h"
#include <stdarg.h>
#include "windef.h"
...
...
@@ -29,6 +26,7 @@
#include "wingdi.h"
#include "winuser.h"
#include "icm.h"
#include "wine/debug.h"
#include "mscms_priv.h"
...
...
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