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
64edac40
Commit
64edac40
authored
Apr 16, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Apr 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Add a helper to find a duplex entry.
parent
44d880b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
driver.c
dlls/wineps.drv/driver.c
+14
-0
ps.c
dlls/wineps.drv/ps.c
+3
-14
psdrv.h
dlls/wineps.drv/psdrv.h
+1
-0
No files found.
dlls/wineps.drv/driver.c
View file @
64edac40
...
...
@@ -67,6 +67,20 @@ PAGESIZE *find_pagesize( PPD *ppd, PSDRV_DEVMODE *dm )
return
NULL
;
}
DUPLEX
*
find_duplex
(
PPD
*
ppd
,
PSDRV_DEVMODE
*
dm
)
{
DUPLEX
*
duplex
;
WORD
win_duplex
=
dm
->
dmPublic
.
dmFields
&
DM_DUPLEX
?
dm
->
dmPublic
.
dmDuplex
:
0
;
if
(
win_duplex
==
0
)
return
NULL
;
/* Not capable */
LIST_FOR_EACH_ENTRY
(
duplex
,
&
ppd
->
Duplexes
,
DUPLEX
,
entry
)
if
(
duplex
->
WinDuplex
==
win_duplex
)
return
duplex
;
return
NULL
;
}
/************************************************************************
*
* PSDRV_MergeDevmodes
...
...
dlls/wineps.drv/ps.c
View file @
64edac40
...
...
@@ -303,8 +303,7 @@ INT PSDRV_WriteHeader( PHYSDEV dev, LPCWSTR title )
char
*
buf
,
*
escaped_title
;
INPUTSLOT
*
slot
=
find_slot
(
physDev
->
pi
->
ppd
,
physDev
->
Devmode
);
PAGESIZE
*
page
=
find_pagesize
(
physDev
->
pi
->
ppd
,
physDev
->
Devmode
);
DUPLEX
*
duplex
;
int
win_duplex
;
DUPLEX
*
duplex
=
find_duplex
(
physDev
->
pi
->
ppd
,
physDev
->
Devmode
);
int
llx
,
lly
,
urx
,
ury
;
int
ret
,
len
;
...
...
@@ -356,18 +355,8 @@ INT PSDRV_WriteHeader( PHYSDEV dev, LPCWSTR title )
if
(
page
&&
page
->
InvocationString
)
PSDRV_WriteFeature
(
dev
,
"*PageSize"
,
page
->
Name
,
page
->
InvocationString
);
win_duplex
=
physDev
->
Devmode
->
dmPublic
.
dmFields
&
DM_DUPLEX
?
physDev
->
Devmode
->
dmPublic
.
dmDuplex
:
0
;
LIST_FOR_EACH_ENTRY
(
duplex
,
&
physDev
->
pi
->
ppd
->
Duplexes
,
DUPLEX
,
entry
)
{
if
(
duplex
->
WinDuplex
==
win_duplex
)
{
if
(
duplex
->
InvocationString
)
{
PSDRV_WriteFeature
(
dev
,
"*Duplex"
,
duplex
->
Name
,
duplex
->
InvocationString
);
break
;
}
}
}
if
(
duplex
&&
duplex
->
InvocationString
)
PSDRV_WriteFeature
(
dev
,
"*Duplex"
,
duplex
->
Name
,
duplex
->
InvocationString
);
write_spool
(
dev
,
psendsetup
,
strlen
(
psendsetup
)
);
...
...
dlls/wineps.drv/psdrv.h
View file @
64edac40
...
...
@@ -403,6 +403,7 @@ extern char *PSDRV_ANSIVector[256] DECLSPEC_HIDDEN;
extern
INPUTSLOT
*
find_slot
(
PPD
*
ppd
,
PSDRV_DEVMODE
*
dm
);
extern
PAGESIZE
*
find_pagesize
(
PPD
*
ppd
,
PSDRV_DEVMODE
*
dm
);
extern
DUPLEX
*
find_duplex
(
PPD
*
ppd
,
PSDRV_DEVMODE
*
dm
);
/* GDI driver functions */
extern
BOOL
PSDRV_Arc
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
...
...
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