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
b09f8714
Commit
b09f8714
authored
Nov 29, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl: Add cups port extension.
parent
ee147d92
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
312 additions
and
9 deletions
+312
-9
Makefile.in
dlls/localspl/Makefile.in
+2
-0
cups.c
dlls/localspl/cups.c
+289
-1
localmon.c
dlls/localspl/localmon.c
+17
-7
localspl_private.h
dlls/localspl/localspl_private.h
+2
-0
provider.c
dlls/localspl/provider.c
+2
-1
No files found.
dlls/localspl/Makefile.in
View file @
b09f8714
MODULE
=
localspl.dll
MODULE
=
localspl.dll
UNIXLIB
=
localspl.so
UNIXLIB
=
localspl.so
IMPORTS
=
spoolss user32 advapi32
IMPORTS
=
spoolss user32 advapi32
UNIX_CFLAGS
=
$(CUPS_CFLAGS)
UNIX_LIBS
=
$(APPLICATIONSERVICES_LIBS)
EXTRADLLFLAGS
=
-Wb
,--prefer-native
EXTRADLLFLAGS
=
-Wb
,--prefer-native
...
...
dlls/localspl/cups.c
View file @
b09f8714
This diff is collapsed.
Click to expand it.
dlls/localspl/localmon.c
View file @
b09f8714
...
@@ -96,7 +96,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
...
@@ -96,7 +96,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
case
DLL_PROCESS_ATTACH
:
case
DLL_PROCESS_ATTACH
:
DisableThreadLibraryCalls
(
hinstDLL
);
DisableThreadLibraryCalls
(
hinstDLL
);
localspl_instance
=
hinstDLL
;
localspl_instance
=
hinstDLL
;
return
!
__wine_init_unix_call
();
if
(
__wine_init_unix_call
())
return
FALSE
;
UNIX_CALL
(
process_attach
,
NULL
);
break
;
}
}
return
TRUE
;
return
TRUE
;
}
}
...
@@ -506,8 +509,7 @@ static BOOL WINAPI localmon_StartDocPort(HANDLE hport, WCHAR *printer_name,
...
@@ -506,8 +509,7 @@ static BOOL WINAPI localmon_StartDocPort(HANDLE hport, WCHAR *printer_name,
TRACE
(
"(%p %s %ld %ld %p)
\n
"
,
hport
,
debugstr_w
(
printer_name
),
TRACE
(
"(%p %s %ld %ld %p)
\n
"
,
hport
,
debugstr_w
(
printer_name
),
job_id
,
level
,
doc_info
);
job_id
,
level
,
doc_info
);
if
(
port
->
type
==
PORT_IS_PIPE
||
port
->
type
==
PORT_IS_UNIXNAME
||
if
(
port
->
type
>=
PORT_IS_WINE
)
port
->
type
==
PORT_IS_LPR
)
{
{
struct
start_doc_params
params
;
struct
start_doc_params
params
;
...
@@ -516,6 +518,7 @@ static BOOL WINAPI localmon_StartDocPort(HANDLE hport, WCHAR *printer_name,
...
@@ -516,6 +518,7 @@ static BOOL WINAPI localmon_StartDocPort(HANDLE hport, WCHAR *printer_name,
params
.
type
=
port
->
type
;
params
.
type
=
port
->
type
;
params
.
port
=
port
->
nameW
;
params
.
port
=
port
->
nameW
;
params
.
document_title
=
doc_info
?
doc_info
->
pDocName
:
NULL
;
params
.
doc
=
&
port
->
doc_handle
;
params
.
doc
=
&
port
->
doc_handle
;
return
UNIX_CALL
(
start_doc
,
&
params
);
return
UNIX_CALL
(
start_doc
,
&
params
);
}
}
...
@@ -547,12 +550,17 @@ static BOOL WINAPI localmon_WritePort(HANDLE hport, BYTE *buf, DWORD size,
...
@@ -547,12 +550,17 @@ static BOOL WINAPI localmon_WritePort(HANDLE hport, BYTE *buf, DWORD size,
TRACE
(
"(%p %p %lu %p)
\n
"
,
hport
,
buf
,
size
,
written
);
TRACE
(
"(%p %p %lu %p)
\n
"
,
hport
,
buf
,
size
,
written
);
if
(
port
->
type
==
PORT_IS_PIPE
||
port
->
type
==
PORT_IS_UNIXNAME
||
if
(
port
->
type
>=
PORT_IS_WINE
)
port
->
type
==
PORT_IS_LPR
)
{
{
struct
write_doc_params
params
;
struct
write_doc_params
params
;
BOOL
ret
;
BOOL
ret
;
if
(
!
port
->
doc_handle
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
params
.
doc
=
port
->
doc_handle
;
params
.
doc
=
port
->
doc_handle
;
params
.
buf
=
buf
;
params
.
buf
=
buf
;
params
.
size
=
size
;
params
.
size
=
size
;
...
@@ -570,11 +578,13 @@ static BOOL WINAPI localmon_EndDocPort(HANDLE hport)
...
@@ -570,11 +578,13 @@ static BOOL WINAPI localmon_EndDocPort(HANDLE hport)
TRACE
(
"(%p)
\n
"
,
hport
);
TRACE
(
"(%p)
\n
"
,
hport
);
if
(
port
->
type
==
PORT_IS_PIPE
||
port
->
type
==
PORT_IS_UNIXNAME
||
if
(
port
->
type
>=
PORT_IS_WINE
)
port
->
type
==
PORT_IS_LPR
)
{
{
struct
end_doc_params
params
;
struct
end_doc_params
params
;
if
(
!
port
->
doc_handle
)
return
TRUE
;
params
.
doc
=
port
->
doc_handle
;
params
.
doc
=
port
->
doc_handle
;
port
->
doc_handle
=
0
;
port
->
doc_handle
=
0
;
return
UNIX_CALL
(
end_doc
,
&
params
);
return
UNIX_CALL
(
end_doc
,
&
params
);
...
...
dlls/localspl/localspl_private.h
View file @
b09f8714
...
@@ -171,6 +171,7 @@ struct start_doc_params
...
@@ -171,6 +171,7 @@ struct start_doc_params
{
{
unsigned
int
type
;
unsigned
int
type
;
const
WCHAR
*
port
;
const
WCHAR
*
port
;
const
WCHAR
*
document_title
;
INT64
*
doc
;
INT64
*
doc
;
};
};
...
@@ -190,6 +191,7 @@ struct end_doc_params
...
@@ -190,6 +191,7 @@ struct end_doc_params
enum
cups_funcs
enum
cups_funcs
{
{
unix_process_attach
,
unix_start_doc
,
unix_start_doc
,
unix_write_doc
,
unix_write_doc
,
unix_end_doc
,
unix_end_doc
,
...
...
dlls/localspl/provider.c
View file @
b09f8714
...
@@ -988,7 +988,8 @@ static monitor_t * monitor_load_by_port(LPCWSTR portname)
...
@@ -988,7 +988,8 @@ static monitor_t * monitor_load_by_port(LPCWSTR portname)
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
portname
));
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
portname
));
/* wine specific ports */
/* wine specific ports */
if
(
portname
[
0
]
==
'|'
||
portname
[
0
]
==
'/'
)
if
(
portname
[
0
]
==
'|'
||
portname
[
0
]
==
'/'
||
!
wcsncmp
(
portname
,
L"LPR:"
,
4
)
||
!
wcsncmp
(
portname
,
L"CUPS:"
,
5
))
return
monitor_load
(
L"Local Port"
,
NULL
);
return
monitor_load
(
L"Local Port"
,
NULL
);
/* Try the Local Monitor first */
/* Try the Local Monitor first */
...
...
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