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
1990e194
Commit
1990e194
authored
Nov 01, 2013
by
Huw Davies
Committed by
Alexandre Julliard
Nov 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Add any default printer options that aren't set by the driver.
parent
92426b51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
info.c
dlls/winspool.drv/info.c
+26
-1
No files found.
dlls/winspool.drv/info.c
View file @
1990e194
...
...
@@ -786,6 +786,7 @@ static void unlink_ppd( const WCHAR *ppd )
static
void
*
cupshandle
;
#define CUPS_FUNCS \
DO_FUNC(cupsAddOption); \
DO_FUNC(cupsFreeDests); \
DO_FUNC(cupsFreeOptions); \
DO_FUNC(cupsGetDests); \
...
...
@@ -794,12 +795,14 @@ static void *cupshandle;
DO_FUNC(cupsParseOptions); \
DO_FUNC(cupsPrintFile)
#define CUPS_OPT_FUNCS \
DO_FUNC(cupsGetNamedDest); \
DO_FUNC(cupsGetPPD3)
#define DO_FUNC(f) static typeof(f) *p##f
CUPS_FUNCS
;
#undef DO_FUNC
static
http_status_t
(
*
pcupsGetPPD3
)(
http_t
*
,
const
char
*
,
time_t
*
,
char
*
,
size_t
);
static
cups_dest_t
*
(
*
pcupsGetNamedDest
)(
http_t
*
,
const
char
*
,
const
char
*
);
static
http_status_t
(
*
pcupsGetPPD3
)(
http_t
*
,
const
char
*
,
time_t
*
,
char
*
,
size_t
);
static
http_status_t
cupsGetPPD3_wrapper
(
http_t
*
http
,
const
char
*
name
,
time_t
*
modtime
,
char
*
buffer
,
...
...
@@ -8165,6 +8168,27 @@ end:
fclose
(
fp
);
return
num_options
;
}
static
int
get_cups_default_options
(
const
char
*
printer
,
int
num_options
,
cups_option_t
**
options
)
{
cups_dest_t
*
dest
;
int
i
;
if
(
!
pcupsGetNamedDest
)
return
num_options
;
dest
=
pcupsGetNamedDest
(
NULL
,
printer
,
NULL
);
if
(
!
dest
)
return
num_options
;
for
(
i
=
0
;
i
<
dest
->
num_options
;
i
++
)
{
if
(
!
pcupsGetOption
(
dest
->
options
[
i
].
name
,
num_options
,
*
options
))
num_options
=
pcupsAddOption
(
dest
->
options
[
i
].
name
,
dest
->
options
[
i
].
value
,
num_options
,
options
);
}
pcupsFreeDests
(
1
,
dest
);
return
num_options
;
}
#endif
/*****************************************************************************
...
...
@@ -8193,6 +8217,7 @@ static BOOL schedule_cups(LPCWSTR printer_name, LPCWSTR filename, LPCWSTR docume
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
document_title
,
-
1
,
unix_doc_title
,
len
,
NULL
,
NULL
);
num_options
=
get_cups_job_ticket_options
(
unixname
,
num_options
,
&
options
);
num_options
=
get_cups_default_options
(
queue
,
num_options
,
&
options
);
TRACE
(
"printing via cups with options:
\n
"
);
for
(
i
=
0
;
i
<
num_options
;
i
++
)
...
...
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