|
|
|
@ -192,19 +192,12 @@ struct dnpds40_cmd {
|
|
|
|
|
#define MULTICUT_4_5x6 51
|
|
|
|
|
#define MULTICUT_4_5x8 52
|
|
|
|
|
|
|
|
|
|
#define MULTICUT_4x3 53
|
|
|
|
|
#define MULTICUT_4x4_5 54
|
|
|
|
|
#define MULTICUT_4_5x3 55
|
|
|
|
|
// #define MULTICUT_??? 56 // XXX WTF is missing?
|
|
|
|
|
#define MULTICUT_4_5x4 57
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
// XXX do these exist? Or are they just the larger print cut in two?
|
|
|
|
|
// #define MULTICUT_4x3X2
|
|
|
|
|
// #define MULTICUT_4x4X2
|
|
|
|
|
// #define MULTICUT_4_5x3X2
|
|
|
|
|
// #define MULTICUT_4_5x4X2
|
|
|
|
|
#endif
|
|
|
|
|
// #define MULTICUT_4x3 XXX // 1266x936
|
|
|
|
|
// #define MULTICUT_4x3X2 XXX
|
|
|
|
|
// #define MULTICUT_4x4X2 XXX
|
|
|
|
|
// #define MULTICUT_4_5x3 XXX // 1408x936
|
|
|
|
|
// #define MULTICUT_4_5x3X2 XXX
|
|
|
|
|
// #define MULTICUT_4_5x4X2 XXX
|
|
|
|
|
|
|
|
|
|
#define MULTICUT_S_SIMPLEX 100
|
|
|
|
|
#define MULTICUT_S_FRONT 200
|
|
|
|
@ -327,33 +320,6 @@ static void *dnp_combine_jobs(const void *vjob1,
|
|
|
|
|
new_h = 3702;
|
|
|
|
|
gap_bytes = 30;
|
|
|
|
|
break;
|
|
|
|
|
#if 0 // XXX Do these printers handle automatic multicut?
|
|
|
|
|
// if not, implement using FULL_CUTTER_CONTROL!
|
|
|
|
|
case MULTICUT_4x3:
|
|
|
|
|
new_multicut = MULTICUT_4x6;
|
|
|
|
|
new_w = 1408;
|
|
|
|
|
new_h = 1836;
|
|
|
|
|
gap_bytes = 36;
|
|
|
|
|
break;
|
|
|
|
|
case MULTICUT_4x4:
|
|
|
|
|
new_multicut = MULTICUT_4x8;
|
|
|
|
|
new_w = 1408;
|
|
|
|
|
new_h = 2436;
|
|
|
|
|
gap_bytes = 36;
|
|
|
|
|
break;
|
|
|
|
|
case MULTICUT_4_5x3:
|
|
|
|
|
new_multicut = MULTICUT_4_5x6;
|
|
|
|
|
new_w = 1408;
|
|
|
|
|
new_h = 1836;
|
|
|
|
|
gap_bytes = 36;
|
|
|
|
|
break;
|
|
|
|
|
case MULTICUT_4_5x4:
|
|
|
|
|
new_multicut = MULTICUT_4_5x8;
|
|
|
|
|
new_w = 1408;
|
|
|
|
|
new_h = 2436;
|
|
|
|
|
gap_bytes = 36;
|
|
|
|
|
break;
|
|
|
|
|
#endif
|
|
|
|
|
default:
|
|
|
|
|
/* Everything else is NOT handled */
|
|
|
|
|
goto done;
|
|
|
|
@ -1917,9 +1883,8 @@ parsed:
|
|
|
|
|
if (job->multicut < 100) {
|
|
|
|
|
switch(ctx->media) {
|
|
|
|
|
case 150: // 4x6, QW410
|
|
|
|
|
if(job->multicut != MULTICUT_4x3 &&
|
|
|
|
|
job->multicut != MULTICUT_4x4 &&
|
|
|
|
|
job->multicut != MULTICUT_4x4_5 &&
|
|
|
|
|
if (job->multicut != MULTICUT_4x4 &&
|
|
|
|
|
// XXX job->multicut != MULTICUT_4x3 &&
|
|
|
|
|
// XXX job->multicut != MULTICUT_4x3X2 &&
|
|
|
|
|
job->multicut != MULTICUT_4x6) {
|
|
|
|
|
ERROR("Incorrect media for job loaded (%u vs %u)\n", ctx->media, job->multicut);
|
|
|
|
@ -1928,10 +1893,9 @@ parsed:
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 151: // 4x8, QW410
|
|
|
|
|
if (job->multicut != MULTICUT_4x3 &&
|
|
|
|
|
job->multicut != MULTICUT_4x4 &&
|
|
|
|
|
job->multicut != MULTICUT_4x4_5 &&
|
|
|
|
|
if (job->multicut != MULTICUT_4x4 &&
|
|
|
|
|
job->multicut != MULTICUT_4x6 &&
|
|
|
|
|
// XXX job->multicut != MULTICUT_4x3 &&
|
|
|
|
|
// XXX job->multicut != MULTICUT_4x3X2 &&
|
|
|
|
|
// XXX job->multicut != MULTICUT_4x4X2 &&
|
|
|
|
|
job->multicut != MULTICUT_4x8) {
|
|
|
|
@ -1941,9 +1905,7 @@ parsed:
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 160: // 4.5x6, QW410
|
|
|
|
|
if (job->multicut != MULTICUT_4_5x3 &&
|
|
|
|
|
job->multicut != MULTICUT_4_5x4 &&
|
|
|
|
|
job->multicut != MULTICUT_4_5x4_5 &&
|
|
|
|
|
if (job->multicut != MULTICUT_4_5x4_5 &&
|
|
|
|
|
// XXX job->multicut != MULTICUT_4_5x3X2 &&
|
|
|
|
|
job->multicut != MULTICUT_4_5x6) {
|
|
|
|
|
ERROR("Incorrect media for job loaded (%u vs %u)\n", ctx->media, job->multicut);
|
|
|
|
@ -1952,11 +1914,9 @@ parsed:
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 161: // 4.5x8, QW410
|
|
|
|
|
if (job->multicut != MULTICUT_4_5x3 &&
|
|
|
|
|
job->multicut != MULTICUT_4_5x4 &&
|
|
|
|
|
job->multicut != MULTICUT_4_5x4_5 &&
|
|
|
|
|
if (job->multicut != MULTICUT_4_5x4_5 &&
|
|
|
|
|
job->multicut != MULTICUT_4_5x6 &&
|
|
|
|
|
// XXX job->multicut != MULTICUT_4_5x4X2 &&
|
|
|
|
|
// XXX job->multicut != MULTICUT_4_5x4_X2 &&
|
|
|
|
|
// XXX job->multicut != MULTICUT_4_5x3X2 &&
|
|
|
|
|
job->multicut != MULTICUT_4_5x8) {
|
|
|
|
|
ERROR("Incorrect media for job loaded (%u vs %u)\n", ctx->media, job->multicut);
|
|
|
|
@ -3550,7 +3510,7 @@ static const char *dnpds40_prefixes[] = {
|
|
|
|
|
|
|
|
|
|
const struct dyesub_backend dnpds40_backend = {
|
|
|
|
|
.name = "DNP DS-series / Citizen C-series",
|
|
|
|
|
.version = "0.146",
|
|
|
|
|
.version = "0.145",
|
|
|
|
|
.uri_prefixes = dnpds40_prefixes,
|
|
|
|
|
.cmdline_usage = dnpds40_cmdline,
|
|
|
|
|
.cmdline_arg = dnpds40_cmdline_arg,
|
|
|
|
@ -3903,9 +3863,7 @@ struct qw410_spool_hdr {
|
|
|
|
|
uint8_t null3[3];
|
|
|
|
|
|
|
|
|
|
uint8_t hd;
|
|
|
|
|
uint8_t null4[3];
|
|
|
|
|
uint8_t dc;
|
|
|
|
|
uint8_t null5[3];
|
|
|
|
|
uint8_t null4[7];
|
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
|
|
|
|
|
static int legacy_qw410_read_parse(struct dnpds40_printjob *job, int data_fd, int read_data)
|
|
|
|
@ -3919,7 +3877,7 @@ static int legacy_qw410_read_parse(struct dnpds40_printjob *job, int data_fd, in
|
|
|
|
|
/* Early parsing and sanity checking */
|
|
|
|
|
plane_len = le32_to_cpu(hdr.plane_len);
|
|
|
|
|
|
|
|
|
|
if (hdr.type < MULTICUT_4x4 || hdr.type > MULTICUT_4_5x4 ||
|
|
|
|
|
if (hdr.type < MULTICUT_4x4 || hdr.type > MULTICUT_4_5x8 ||
|
|
|
|
|
hdr.null0[0] || hdr.null0[1] || hdr.null0[2]) {
|
|
|
|
|
ERROR("Unrecognized header data format @%d!\n", job->datalen);
|
|
|
|
|
return CUPS_BACKEND_CANCEL;
|
|
|
|
@ -3930,7 +3888,6 @@ static int legacy_qw410_read_parse(struct dnpds40_printjob *job, int data_fd, in
|
|
|
|
|
job->matte = hdr.matte;
|
|
|
|
|
job->cutter = (hdr.cut2) ? 120 : 0;
|
|
|
|
|
job->printspeed = (hdr.hd) ? 3 : 0;
|
|
|
|
|
// XXX decurl = hdr.dc (Decurl: 2 = auto, 1 = on, 0 = off)
|
|
|
|
|
|
|
|
|
|
return legacy_spool_helper(job, data_fd, read_data,
|
|
|
|
|
sizeof(hdr), plane_len, 1);
|
|
|
|
|