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
d69cdbf1
Commit
d69cdbf1
authored
Dec 01, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Dec 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Define copy_file() only if CUPS is available.
Avoid unused function warnings.
parent
aac8ae73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
cups.c
dlls/winspool.drv/cups.c
+23
-23
No files found.
dlls/winspool.drv/cups.c
View file @
d69cdbf1
...
...
@@ -161,29 +161,6 @@ static NTSTATUS process_attach( void *args )
#endif
/* SONAME_LIBCUPS */
}
static
BOOL
copy_file
(
const
char
*
src
,
const
char
*
dst
)
{
int
fds
[
2
]
=
{
-
1
,
-
1
},
num
;
char
buf
[
1024
];
BOOL
ret
=
FALSE
;
fds
[
0
]
=
open
(
src
,
O_RDONLY
);
fds
[
1
]
=
open
(
dst
,
O_CREAT
|
O_TRUNC
|
O_WRONLY
,
0666
);
if
(
fds
[
0
]
==
-
1
||
fds
[
1
]
==
-
1
)
goto
fail
;
while
((
num
=
read
(
fds
[
0
],
buf
,
sizeof
(
buf
)
))
!=
0
)
{
if
(
num
==
-
1
)
goto
fail
;
if
(
write
(
fds
[
1
],
buf
,
num
)
!=
num
)
goto
fail
;
}
ret
=
TRUE
;
fail:
if
(
fds
[
1
]
!=
-
1
)
close
(
fds
[
1
]
);
if
(
fds
[
0
]
!=
-
1
)
close
(
fds
[
0
]
);
return
ret
;
}
static
char
*
get_unix_file_name
(
LPCWSTR
path
)
{
UNICODE_STRING
nt_name
;
...
...
@@ -246,6 +223,29 @@ static BOOL cups_is_scanner( cups_dest_t *dest )
return
cups_get_printer_type
(
dest
)
&
0x2000000
/* CUPS_PRINTER_SCANNER */
;
}
static
BOOL
copy_file
(
const
char
*
src
,
const
char
*
dst
)
{
int
fds
[
2
]
=
{
-
1
,
-
1
},
num
;
char
buf
[
1024
];
BOOL
ret
=
FALSE
;
fds
[
0
]
=
open
(
src
,
O_RDONLY
);
fds
[
1
]
=
open
(
dst
,
O_CREAT
|
O_TRUNC
|
O_WRONLY
,
0666
);
if
(
fds
[
0
]
==
-
1
||
fds
[
1
]
==
-
1
)
goto
fail
;
while
((
num
=
read
(
fds
[
0
],
buf
,
sizeof
(
buf
)
))
!=
0
)
{
if
(
num
==
-
1
)
goto
fail
;
if
(
write
(
fds
[
1
],
buf
,
num
)
!=
num
)
goto
fail
;
}
ret
=
TRUE
;
fail:
if
(
fds
[
1
]
!=
-
1
)
close
(
fds
[
1
]
);
if
(
fds
[
0
]
!=
-
1
)
close
(
fds
[
0
]
);
return
ret
;
}
static
http_status_t
cupsGetPPD3_wrapper
(
http_t
*
http
,
const
char
*
name
,
time_t
*
modtime
,
char
*
buffer
,
size_t
bufsize
)
{
...
...
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