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
187f90d8
Commit
187f90d8
authored
Oct 03, 2018
by
Huw Davies
Committed by
Alexandre Julliard
Oct 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Add helpers to enter and leave passthrough.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f7c15b9f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
13 deletions
+27
-13
escape.c
dlls/wineps.drv/escape.c
+1
-9
ps.c
dlls/wineps.drv/ps.c
+23
-4
psdrv.h
dlls/wineps.drv/psdrv.h
+3
-0
No files found.
dlls/wineps.drv/escape.c
View file @
187f90d8
...
...
@@ -44,10 +44,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
psdrv
);
static
const
char
psbegindocument
[]
=
"%%BeginDocument: Wine passthrough
\n
"
;
DWORD
write_spool
(
PHYSDEV
dev
,
const
void
*
data
,
DWORD
num
)
{
PSDRV_PDEVICE
*
physDev
=
get_psdrv_dev
(
dev
);
...
...
@@ -269,11 +265,7 @@ INT PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data,
* length of the string, rather than 2 more. So we'll use the WORD at
* in_data[0] instead.
*/
if
(
physDev
->
job
.
passthrough_state
==
passthrough_none
)
{
write_spool
(
dev
,
psbegindocument
,
sizeof
(
psbegindocument
)
-
1
);
physDev
->
job
.
passthrough_state
=
passthrough_active
;
}
passthrough_enter
(
dev
);
return
write_spool
(
dev
,
((
char
*
)
in_data
)
+
2
,
*
(
const
WORD
*
)
in_data
);
}
...
...
dlls/wineps.drv/ps.c
View file @
187f90d8
...
...
@@ -213,9 +213,31 @@ static const char psarrayput[] =
static
const
char
psarraydef
[]
=
"/%s %d array def
\n
"
;
static
const
char
psbegindocument
[]
=
"%%BeginDocument: Wine passthrough
\n
"
;
static
const
char
psenddocument
[]
=
"
\n
%%EndDocument
\n
"
;
void
passthrough_enter
(
PHYSDEV
dev
)
{
PSDRV_PDEVICE
*
physDev
=
get_psdrv_dev
(
dev
);
if
(
physDev
->
job
.
passthrough_state
!=
passthrough_none
)
return
;
write_spool
(
dev
,
psbegindocument
,
sizeof
(
psbegindocument
)
-
1
);
physDev
->
job
.
passthrough_state
=
passthrough_active
;
}
void
passthrough_leave
(
PHYSDEV
dev
)
{
PSDRV_PDEVICE
*
physDev
=
get_psdrv_dev
(
dev
);
if
(
physDev
->
job
.
passthrough_state
==
passthrough_none
)
return
;
write_spool
(
dev
,
psenddocument
,
sizeof
(
psenddocument
)
-
1
);
physDev
->
job
.
passthrough_state
=
passthrough_none
;
}
DWORD
PSDRV_WriteSpool
(
PHYSDEV
dev
,
LPCSTR
lpData
,
DWORD
cch
)
{
PSDRV_PDEVICE
*
physDev
=
get_psdrv_dev
(
dev
);
...
...
@@ -226,10 +248,7 @@ DWORD PSDRV_WriteSpool(PHYSDEV dev, LPCSTR lpData, DWORD cch)
return
0
;
}
if
(
physDev
->
job
.
passthrough_state
!=
passthrough_none
)
{
/* Was in PASSTHROUGH mode */
write_spool
(
dev
,
psenddocument
,
sizeof
(
psenddocument
)
-
1
);
physDev
->
job
.
passthrough_state
=
passthrough_none
;
}
passthrough_leave
(
dev
);
if
(
physDev
->
job
.
OutOfPage
)
{
/* Will get here after NEWFRAME Escape */
if
(
!
PSDRV_StartPage
(
dev
)
)
...
...
dlls/wineps.drv/psdrv.h
View file @
187f90d8
...
...
@@ -578,6 +578,9 @@ extern void T42_free(TYPE42 *t42) DECLSPEC_HIDDEN;
extern
DWORD
RLE_encode
(
BYTE
*
in_buf
,
DWORD
len
,
BYTE
*
out_buf
)
DECLSPEC_HIDDEN
;
extern
DWORD
ASCII85_encode
(
BYTE
*
in_buf
,
DWORD
len
,
BYTE
*
out_buf
)
DECLSPEC_HIDDEN
;
extern
void
passthrough_enter
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
void
passthrough_leave
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
#define push_lc_numeric(x) do { \
const char *tmplocale = setlocale(LC_NUMERIC,NULL); \
setlocale(LC_NUMERIC,x);
...
...
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