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
e6e42c86
Commit
e6e42c86
authored
Apr 11, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Apr 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Move the input slot list to a standard list.
parent
4dfef2ef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
31 deletions
+36
-31
driver.c
dlls/wineps.drv/driver.c
+23
-15
ppd.c
dlls/wineps.drv/ppd.c
+8
-12
ps.c
dlls/wineps.drv/ps.c
+1
-1
psdrv.h
dlls/wineps.drv/psdrv.h
+4
-3
No files found.
dlls/wineps.drv/driver.c
View file @
e6e42c86
...
...
@@ -116,20 +116,21 @@ void PSDRV_MergeDevmodes(PSDRV_DEVMODEA *dm1, PSDRV_DEVMODEA *dm2,
TRACE
(
"Changing Copies to %d
\n
"
,
dm2
->
dmPublic
.
u1
.
s1
.
dmCopies
);
}
if
(
dm2
->
dmPublic
.
dmFields
&
DM_DEFAULTSOURCE
)
{
if
(
dm2
->
dmPublic
.
dmFields
&
DM_DEFAULTSOURCE
)
{
INPUTSLOT
*
slot
;
for
(
slot
=
pi
->
ppd
->
InputSlots
;
slot
;
slot
=
slot
->
next
)
{
LIST_FOR_EACH_ENTRY
(
slot
,
&
pi
->
ppd
->
InputSlots
,
INPUTSLOT
,
entry
)
if
(
slot
->
WinBin
==
dm2
->
dmPublic
.
u1
.
s1
.
dmDefaultSource
)
break
;
}
if
(
slot
)
{
if
(
&
slot
->
entry
!=
&
pi
->
ppd
->
InputSlots
)
{
dm1
->
dmPublic
.
u1
.
s1
.
dmDefaultSource
=
dm2
->
dmPublic
.
u1
.
s1
.
dmDefaultSource
;
TRACE
(
"Changing bin to '%s'
\n
"
,
slot
->
FullName
);
}
else
{
TRACE
(
"Trying to change to unsupported bin %d
\n
"
,
dm2
->
dmPublic
.
u1
.
s1
.
dmDefaultSource
);
}
else
TRACE
(
"Trying to change to unsupported bin %d
\n
"
,
dm2
->
dmPublic
.
u1
.
s1
.
dmDefaultSource
);
}
if
(
dm2
->
dmPublic
.
dmFields
&
DM_DEFAULTSOURCE
)
...
...
@@ -512,9 +513,12 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP
WORD
*
wp
=
(
WORD
*
)
lpszOutput
;
int
i
=
0
;
for
(
slot
=
pi
->
ppd
->
InputSlots
;
slot
;
slot
=
slot
->
next
,
i
++
)
if
(
lpszOutput
!=
NULL
)
*
wp
++
=
slot
->
WinBin
;
LIST_FOR_EACH_ENTRY
(
slot
,
&
pi
->
ppd
->
InputSlots
,
INPUTSLOT
,
entry
)
{
i
++
;
if
(
lpszOutput
!=
NULL
)
*
wp
++
=
slot
->
WinBin
;
}
return
i
;
}
...
...
@@ -524,11 +528,15 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP
char
*
cp
=
lpszOutput
;
int
i
=
0
;
for
(
slot
=
pi
->
ppd
->
InputSlots
;
slot
;
slot
=
slot
->
next
,
i
++
)
if
(
lpszOutput
!=
NULL
)
{
lstrcpynA
(
cp
,
slot
->
FullName
,
24
);
cp
+=
24
;
}
LIST_FOR_EACH_ENTRY
(
slot
,
&
pi
->
ppd
->
InputSlots
,
INPUTSLOT
,
entry
)
{
i
++
;
if
(
lpszOutput
!=
NULL
)
{
lstrcpynA
(
cp
,
slot
->
FullName
,
24
);
cp
+=
24
;
}
}
return
i
;
}
...
...
dlls/wineps.drv/ppd.c
View file @
e6e42c86
...
...
@@ -583,23 +583,19 @@ static BOOL parse_resolution(const char *str, SIZE *sz)
* PSDRV_AddSlot
*
*/
static
INT
PSDRV_AddSlot
(
PPD
*
ppd
,
LPCSTR
szName
,
LPCSTR
szFullName
,
static
BOOL
PSDRV_AddSlot
(
PPD
*
ppd
,
LPCSTR
szName
,
LPCSTR
szFullName
,
LPSTR
szInvocationString
,
WORD
wWinBin
)
{
INPUTSLOT
*
slot
,
**
insert
=
&
ppd
->
InputSlots
;
while
(
*
insert
)
insert
=
&
((
*
insert
)
->
next
);
slot
=
*
insert
=
HeapAlloc
(
PSDRV_Heap
,
HEAP_ZERO_MEMORY
,
sizeof
(
INPUTSLOT
));
if
(
!
slot
)
return
1
;
INPUTSLOT
*
slot
=
HeapAlloc
(
PSDRV_Heap
,
0
,
sizeof
(
INPUTSLOT
)
);
if
(
!
slot
)
return
FALSE
;
slot
->
Name
=
szName
;
slot
->
FullName
=
szFullName
;
slot
->
InvocationString
=
szInvocationString
;
slot
->
WinBin
=
wWinBin
;
return
0
;
list_add_tail
(
&
ppd
->
InputSlots
,
&
slot
->
entry
);
return
TRUE
;
}
/***********************************************************************
...
...
@@ -635,13 +631,13 @@ PPD *PSDRV_ParsePPD(char *fname)
list_init
(
&
ppd
->
InstalledFonts
);
list_init
(
&
ppd
->
PageSizes
);
list_init
(
&
ppd
->
Constraints
);
list_init
(
&
ppd
->
InputSlots
);
/*
* The Windows PostScript drivers create the following "virtual bin" for
* every PostScript printer
*/
if
(
PSDRV_AddSlot
(
ppd
,
NULL
,
"Automatically Select"
,
NULL
,
DMBIN_FORMSOURCE
))
if
(
!
PSDRV_AddSlot
(
ppd
,
NULL
,
"Automatically Select"
,
NULL
,
DMBIN_FORMSOURCE
))
{
HeapFree
(
PSDRV_Heap
,
0
,
ppd
);
fclose
(
fp
);
...
...
@@ -1002,7 +998,7 @@ PPD *PSDRV_ParsePPD(char *fname)
optionEntry
->
FullName
,
optionEntry
->
InvocationString
);
}
for
(
slot
=
ppd
->
InputSlots
;
slot
;
slot
=
slot
->
next
)
LIST_FOR_EACH_ENTRY
(
slot
,
&
ppd
->
InputSlots
,
INPUTSLOT
,
entry
)
TRACE
(
"INPUTSLOTS '%s' Name '%s' (%d) Invocation '%s'
\n
"
,
debugstr_a
(
slot
->
Name
),
slot
->
FullName
,
slot
->
WinBin
,
debugstr_a
(
slot
->
InvocationString
));
...
...
dlls/wineps.drv/ps.c
View file @
e6e42c86
...
...
@@ -350,7 +350,7 @@ INT PSDRV_WriteHeader( PHYSDEV dev, LPCWSTR title )
write_spool
(
dev
,
copies_buf
,
strlen
(
copies_buf
));
}
for
(
slot
=
physDev
->
pi
->
ppd
->
InputSlots
;
slot
;
slot
=
slot
->
next
)
{
LIST_FOR_EACH_ENTRY
(
slot
,
&
physDev
->
pi
->
ppd
->
InputSlots
,
INPUTSLOT
,
entry
)
{
if
(
slot
->
WinBin
==
physDev
->
Devmode
->
dmPublic
.
u1
.
s1
.
dmDefaultSource
)
{
if
(
slot
->
InvocationString
)
{
PSDRV_WriteFeature
(
dev
,
"*InputSlot"
,
slot
->
Name
,
...
...
dlls/wineps.drv/psdrv.h
View file @
e6e42c86
...
...
@@ -177,12 +177,13 @@ typedef struct
char
*
Value2
;
}
CONSTRAINT
;
typedef
struct
_tagINPUTSLOT
{
typedef
struct
{
struct
list
entry
;
const
char
*
Name
;
const
char
*
FullName
;
char
*
InvocationString
;
WORD
WinBin
;
/* eg DMBIN_LOWER */
struct
_tagINPUTSLOT
*
next
;
}
INPUTSLOT
;
typedef
enum
_RASTERIZEROPTION
...
...
@@ -220,7 +221,7 @@ typedef struct {
PAGESIZE
*
DefaultPageSize
;
OPTION
*
InstalledOptions
;
struct
list
Constraints
;
INPUTSLOT
*
InputSlots
;
struct
list
InputSlots
;
RASTERIZEROPTION
TTRasterizer
;
DUPLEX
*
Duplexes
;
DUPLEX
*
DefaultDuplex
;
...
...
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