[PATCH 2/2] wineps: Pass the collate setting as a CUPS option.
Huw Davies
huw at codeweavers.com
Wed Oct 21 03:17:50 CDT 2015
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
dlls/wineps.drv/ps.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dlls/wineps.drv/ps.c b/dlls/wineps.drv/ps.c
index a19dda3..a01346e 100644
--- a/dlls/wineps.drv/ps.c
+++ b/dlls/wineps.drv/ps.c
@@ -48,6 +48,8 @@ static const char *cups_duplexes[3] =
cups_two_sided_long, /* DMDUP_VERTICAL */
cups_two_sided_short /* DMDUP_HORIZONTAL */
};
+static const char cups_collate_false[] = "%cupsJobTicket: collate=false\n";
+static const char cups_collate_true[] = "%cupsJobTicket: collate=true\n";
static const char psheader[] = /* title llx lly urx ury orientation */
"%%%%Creator: Wine PostScript Driver\n"
@@ -364,6 +366,14 @@ static void write_cups_job_ticket( PHYSDEV dev, const struct ticket_info *info )
physDev->Devmode->dmPublic.u1.s1.dmCopies );
if (len > 0 && len < sizeof(buf))
write_spool( dev, buf, len );
+
+ if (physDev->Devmode->dmPublic.dmFields & DM_COLLATE)
+ {
+ if (physDev->Devmode->dmPublic.dmCollate == DMCOLLATE_FALSE)
+ write_spool( dev, cups_collate_false, sizeof(cups_collate_false) - 1 );
+ else if (physDev->Devmode->dmPublic.dmCollate == DMCOLLATE_TRUE)
+ write_spool( dev, cups_collate_true, sizeof(cups_collate_true) - 1 );
+ }
}
}
--
1.8.0
More information about the wine-patches
mailing list