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
d9a80adc
Commit
d9a80adc
authored
Nov 29, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Don't translate port name to path in StartDocDlgW.
parent
b6204639
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
15 deletions
+37
-15
info.c
dlls/winspool.drv/info.c
+37
-15
No files found.
dlls/winspool.drv/info.c
View file @
d9a80adc
...
...
@@ -8033,6 +8033,28 @@ failed:
return
ret
;
}
static
BOOL
is_port
(
const
WCHAR
*
port_list
,
const
WCHAR
*
output
)
{
size_t
len
;
if
(
!
output
)
return
FALSE
;
if
(
wcschr
(
output
,
':'
))
return
TRUE
;
len
=
wcslen
(
output
);
while
(
port_list
&&
*
port_list
)
{
if
(
!
wcsncmp
(
output
,
port_list
,
len
)
&&
(
!
port_list
[
len
]
||
port_list
[
len
]
==
','
))
return
TRUE
;
port_list
=
wcschr
(
port_list
,
','
);
if
(
port_list
)
port_list
++
;
}
return
FALSE
;
}
/*****************************************************************************
* StartDocDlgW [WINSPOOL.@]
*
...
...
@@ -8044,24 +8066,24 @@ failed:
*/
LPWSTR
WINAPI
StartDocDlgW
(
HANDLE
hPrinter
,
DOCINFOW
*
doc
)
{
PRINTER_INFO_5W
*
pi5
;
LPWSTR
ret
=
NULL
;
DWORD
len
,
attr
;
BOOL
b
;
if
(
doc
->
lpszOutput
==
NULL
)
/* Check whether default port is FILE: */
{
PRINTER_INFO_5W
*
pi5
;
GetPrinterW
(
hPrinter
,
5
,
NULL
,
0
,
&
len
);
if
(
GetLastError
()
!=
ERROR_INSUFFICIENT_BUFFER
)
return
NULL
;
pi5
=
malloc
(
len
);
GetPrinterW
(
hPrinter
,
5
,
(
LPBYTE
)
pi5
,
len
,
&
len
);
if
(
!
pi5
->
pPortName
||
wcscmp
(
pi5
->
pPortName
,
L"FILE:"
))
{
free
(
pi5
);
return
NULL
;
}
free
(
pi5
);
}
GetPrinterW
(
hPrinter
,
5
,
NULL
,
0
,
&
len
);
if
(
GetLastError
()
!=
ERROR_INSUFFICIENT_BUFFER
)
return
NULL
;
pi5
=
malloc
(
len
);
GetPrinterW
(
hPrinter
,
5
,
(
LPBYTE
)
pi5
,
len
,
&
len
);
/* Check whether default port is FILE: */
b
=
!
doc
->
lpszOutput
&&
(
!
pi5
->
pPortName
||
wcscmp
(
pi5
->
pPortName
,
L"FILE:"
));
if
(
!
b
)
b
=
is_port
(
pi5
->
pPortName
,
doc
->
lpszOutput
);
free
(
pi5
);
if
(
b
)
return
NULL
;
if
(
doc
->
lpszOutput
==
NULL
||
!
wcscmp
(
doc
->
lpszOutput
,
L"FILE:"
))
{
...
...
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