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
d5373ef6
Commit
d5373ef6
authored
Jul 09, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Buffer data sent to printer port.
parent
75e87c30
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
3 deletions
+34
-3
escape.c
dlls/wineps.drv/escape.c
+29
-1
ps.c
dlls/wineps.drv/ps.c
+1
-1
psdrv.h
dlls/wineps.drv/psdrv.h
+4
-1
No files found.
dlls/wineps.drv/escape.c
View file @
d5373ef6
...
...
@@ -38,13 +38,41 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
psdrv
);
BOOL
flush_spool
(
print_ctx
*
ctx
)
{
DWORD
written
;
if
(
ctx
->
job
.
data_cnt
)
{
if
(
!
WritePrinter
(
ctx
->
job
.
hprinter
,
ctx
->
job
.
data
,
ctx
->
job
.
data_cnt
,
&
written
)
||
written
!=
ctx
->
job
.
data_cnt
)
return
FALSE
;
}
ctx
->
job
.
data_cnt
=
0
;
return
TRUE
;
}
DWORD
write_spool
(
print_ctx
*
ctx
,
const
void
*
data
,
DWORD
num
)
{
DWORD
written
;
if
(
!
WritePrinter
(
ctx
->
job
.
hprinter
,
(
LPBYTE
)
data
,
num
,
&
written
)
||
(
written
!=
num
))
if
(
ctx
->
job
.
data_cnt
+
num
>
ARRAY_SIZE
(
ctx
->
job
.
data
))
{
if
(
!
flush_spool
(
ctx
))
return
SP_OUTOFDISK
;
}
if
(
ctx
->
job
.
data_cnt
+
num
>
ARRAY_SIZE
(
ctx
->
job
.
data
))
{
if
(
!
WritePrinter
(
ctx
->
job
.
hprinter
,
(
LPBYTE
)
data
,
num
,
&
written
)
||
written
!=
num
)
return
SP_OUTOFDISK
;
}
else
{
memcpy
(
ctx
->
job
.
data
+
ctx
->
job
.
data_cnt
,
data
,
num
);
ctx
->
job
.
data_cnt
+=
num
;
}
return
num
;
}
...
...
dlls/wineps.drv/ps.c
View file @
d5373ef6
...
...
@@ -502,7 +502,7 @@ INT PSDRV_WriteFooter( print_ctx *ctx )
sprintf
(
buf
,
psfooter
,
ctx
->
job
.
PageNo
);
if
(
write_spool
(
ctx
,
buf
,
strlen
(
buf
)
)
!=
strlen
(
buf
)
)
{
if
(
write_spool
(
ctx
,
buf
,
strlen
(
buf
)
)
!=
strlen
(
buf
)
||
!
flush_spool
(
ctx
)
)
{
WARN
(
"WriteSpool error
\n
"
);
ret
=
0
;
}
...
...
dlls/wineps.drv/psdrv.h
View file @
d5373ef6
...
...
@@ -352,6 +352,8 @@ typedef struct {
INT
PageNo
;
BOOL
quiet
;
/* Don't actually output anything */
enum
passthrough
passthrough_state
;
BYTE
data
[
4096
];
int
data_cnt
;
}
JOB
;
typedef
struct
...
...
@@ -519,7 +521,8 @@ extern BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical);
extern
BOOL
PSDRV_WriteDownloadGlyphShow
(
print_ctx
*
ctx
,
const
WORD
*
glyphs
,
UINT
count
);
extern
BOOL
PSDRV_EmptyDownloadList
(
print_ctx
*
ctx
,
BOOL
write_undef
);
extern
DWORD
write_spool
(
print_ctx
*
ctx
,
const
void
*
data
,
DWORD
num
);
extern
BOOL
flush_spool
(
print_ctx
*
ctx
);
extern
DWORD
write_spool
(
print_ctx
*
ctx
,
const
void
*
data
,
DWORD
num
);
#define MAX_G_NAME 31
/* max length of PS glyph name */
extern
void
get_glyph_name
(
HDC
hdc
,
WORD
index
,
char
*
name
);
...
...
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