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
9d549a9c
Commit
9d549a9c
authored
Dec 01, 2009
by
Jeremy White
Committed by
Alexandre Julliard
Dec 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Remove unvarying unicode parameter from WINSPOOL_GetDefaultDevMode.
parent
c0238d96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
23 deletions
+10
-23
info.c
dlls/winspool.drv/info.c
+10
-23
No files found.
dlls/winspool.drv/info.c
View file @
9d549a9c
...
...
@@ -3257,18 +3257,17 @@ static BOOL WINSPOOL_GetStringFromReg(HKEY hkey, LPCWSTR ValueName, LPBYTE ptr,
static
void
WINSPOOL_GetDefaultDevMode
(
LPBYTE
ptr
,
DWORD
buflen
,
DWORD
*
needed
,
BOOL
unicode
)
DWORD
buflen
,
DWORD
*
needed
)
{
DEVMODE
A
dm
;
static
const
char
szwps
[]
=
"wineps.drv"
;
DEVMODE
W
dm
;
static
const
WCHAR
szWwps
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'p'
,
's'
,
'.'
,
'd'
,
'r'
,
'v'
,
0
}
;
/* fill default DEVMODE - should be read from ppd... */
ZeroMemory
(
&
dm
,
sizeof
(
dm
)
);
memcpy
(
dm
.
dmDeviceName
,
sz
wps
,
sizeof
sz
wps
);
memcpy
(
dm
.
dmDeviceName
,
sz
Wwps
,
sizeof
szW
wps
);
dm
.
dmSpecVersion
=
DM_SPECVERSION
;
dm
.
dmDriverVersion
=
1
;
dm
.
dmSize
=
sizeof
(
DEVMODE
A
);
dm
.
dmSize
=
sizeof
(
DEVMODE
W
);
dm
.
dmDriverExtra
=
0
;
dm
.
dmFields
=
DM_ORIENTATION
|
DM_PAPERSIZE
|
...
...
@@ -3308,21 +3307,9 @@ static void WINSPOOL_GetDefaultDevMode(
/* dm.dmPanningWidth */
/* dm.dmPanningHeight */
if
(
unicode
)
{
if
(
buflen
>=
sizeof
(
DEVMODEW
))
{
DEVMODEW
*
pdmW
=
GdiConvertToDevmodeW
(
&
dm
);
memcpy
(
ptr
,
pdmW
,
sizeof
(
DEVMODEW
));
HeapFree
(
GetProcessHeap
(),
0
,
pdmW
);
}
*
needed
=
sizeof
(
DEVMODEW
);
}
else
{
if
(
buflen
>=
sizeof
(
DEVMODEA
))
{
memcpy
(
ptr
,
&
dm
,
sizeof
(
DEVMODEA
));
}
*
needed
=
sizeof
(
DEVMODEA
);
}
if
(
buflen
>=
sizeof
(
DEVMODEW
))
memcpy
(
ptr
,
&
dm
,
sizeof
(
DEVMODEW
));
*
needed
=
sizeof
(
DEVMODEW
);
}
/*****************************************************************************
...
...
@@ -3494,7 +3481,7 @@ static BOOL WINSPOOL_GetPrinter_2(HKEY hkeyPrinter, PRINTER_INFO_2W *pi2,
}
else
{
WINSPOOL_GetDefaultDevMode
(
ptr
,
left
,
&
size
,
TRUE
);
WINSPOOL_GetDefaultDevMode
(
ptr
,
left
,
&
size
);
if
(
space
&&
size
<=
left
)
{
pi2
->
pDevMode
=
(
LPDEVMODEW
)
ptr
;
ptr
+=
size
;
...
...
@@ -3692,7 +3679,7 @@ static BOOL WINSPOOL_GetPrinter_9(HKEY hkeyPrinter, PRINTER_INFO_9W *pi9, LPBYTE
}
else
{
WINSPOOL_GetDefaultDevMode
(
buf
,
cbBuf
,
&
size
,
TRUE
);
WINSPOOL_GetDefaultDevMode
(
buf
,
cbBuf
,
&
size
);
if
(
space
&&
size
<=
cbBuf
)
{
pi9
->
pDevMode
=
(
LPDEVMODEW
)
buf
;
}
else
...
...
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