summaryrefslogtreecommitdiff
path: root/src/cups
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2014-04-16 08:13:45 +0200
committerDidier Raboud <odyx@debian.org>2014-04-16 08:13:45 +0200
commit68062125a3214a6262bb1899b81f93abb35c8be9 (patch)
treec2eaee20fb0e6771187aa50f9fa4fb4850564f5b /src/cups
parentd7d42f6c969dc54157d85b7b6b611581bbfa7595 (diff)
Imported Upstream version 5.2.10~pre2
Diffstat (limited to 'src/cups')
-rw-r--r--src/cups/Makefile.am4
-rw-r--r--src/cups/Makefile.in2
-rw-r--r--src/cups/backend_common.h4
-rw-r--r--src/cups/dnpds40_print.c4
-rw-r--r--src/cups/selphy_print.c93
5 files changed, 51 insertions, 56 deletions
diff --git a/src/cups/Makefile.am b/src/cups/Makefile.am
index 75691af..939f1a8 100644
--- a/src/cups/Makefile.am
+++ b/src/cups/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.145 2014/02/12 13:42:27 rlk Exp $
+## $Id: Makefile.am,v 1.146 2014/02/19 12:26:43 speachy Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -160,7 +160,7 @@ if BUILD_LIBUSB_BACKENDS
INSTALL_BLACKLIST=install-blacklist
install-blacklist:
$(mkdir_p) $(DESTDIR)$(cupsdata_blacklistdir)
- $(INSTALL_DATA) blacklist $(DESTDIR)$(cupsdata_blacklistdir)/net.sf.gimp-print.usb-quirks
+ $(INSTALL_DATA) $(srcdir)/blacklist $(DESTDIR)$(cupsdata_blacklistdir)/net.sf.gimp-print.usb-quirks
endif
install-data-local: $(INSTALL_DATA_LOCAL_DEPS) $(INSTALL_BLACKLIST)
diff --git a/src/cups/Makefile.in b/src/cups/Makefile.in
index 991e2cd..8af0f4a 100644
--- a/src/cups/Makefile.in
+++ b/src/cups/Makefile.in
@@ -1811,7 +1811,7 @@ $(top_builddir)/src/gutenprintui2/libgutenprintui2.la:
@BUILD_CUPS_TRUE@@BUILD_LIBUSB_BACKENDS_TRUE@ chmod 700 "$(DESTDIR)$(pkglibdir)/backend/gutenprint$(GUTENPRINT_MAJOR_VERSION)$(GUTENPRINT_MINOR_VERSION)+usb"
@BUILD_LIBUSB_BACKENDS_TRUE@install-blacklist:
@BUILD_LIBUSB_BACKENDS_TRUE@ $(mkdir_p) $(DESTDIR)$(cupsdata_blacklistdir)
-@BUILD_LIBUSB_BACKENDS_TRUE@ $(INSTALL_DATA) blacklist $(DESTDIR)$(cupsdata_blacklistdir)/net.sf.gimp-print.usb-quirks
+@BUILD_LIBUSB_BACKENDS_TRUE@ $(INSTALL_DATA) $(srcdir)/blacklist $(DESTDIR)$(cupsdata_blacklistdir)/net.sf.gimp-print.usb-quirks
install-data-local: $(INSTALL_DATA_LOCAL_DEPS) $(INSTALL_BLACKLIST)
if test -n "$(CUPS_PKG)" -a -n "$(INSTALL_DATA_LOCAL_DEPS)" ; then \
diff --git a/src/cups/backend_common.h b/src/cups/backend_common.h
index 286dedd..99f8297 100644
--- a/src/cups/backend_common.h
+++ b/src/cups/backend_common.h
@@ -35,7 +35,7 @@
#include <fcntl.h>
#include <signal.h>
-#include <libusb-1.0/libusb.h>
+#include <libusb.h>
#include <arpa/inet.h>
#ifndef __BACKEND_COMMON_H
@@ -68,7 +68,7 @@
uint16_t __x = (x); \
((uint16_t)( \
(((uint16_t)(__x) & (uint16_t)0x00ff) << 8) | \
- (((uint16_t)(__x) & (uint16_t)0xff00) >> 8) | \
+ (((uint16_t)(__x) & (uint16_t)0xff00) >> 8))); \
})
#define be32_to_cpu(__x) __x
#define be16_to_cpu(__x) __x
diff --git a/src/cups/dnpds40_print.c b/src/cups/dnpds40_print.c
index c3cc689..f79df53 100644
--- a/src/cups/dnpds40_print.c
+++ b/src/cups/dnpds40_print.c
@@ -397,12 +397,10 @@ static int dnpds40_read_parse(void *vctx, int data_fd) {
if(!memcmp("CNTRL OVERCOAT", ctx->databuf + ctx->datalen+2, 14)) {
memcpy(buf, ctx->databuf + ctx->datalen + 32, 8);
matte = atoi(buf);
- matte = le32_to_cpu(matte);
}
if(!memcmp("CNTRL MULTICUT", ctx->databuf + ctx->datalen+2, 14)) {
memcpy(buf, ctx->databuf + ctx->datalen + 32, 8);
multicut = atoi(buf);
- multicut = le32_to_cpu(multicut);
}
if(!memcmp("IMAGE YPLANE", ctx->databuf + ctx->datalen + 2, 12)) {
uint32_t x_ppm;
@@ -993,7 +991,7 @@ static int dnpds40_cmdline_arg(void *vctx, int argc, char **argv)
/* Exported */
struct dyesub_backend dnpds40_backend = {
.name = "DNP DS40/DS80/DSRX1",
- .version = "0.29",
+ .version = "0.30",
.uri_prefix = "dnpds40",
.cmdline_usage = dnpds40_cmdline,
.cmdline_arg = dnpds40_cmdline_arg,
diff --git a/src/cups/selphy_print.c b/src/cups/selphy_print.c
index 29284a0..a15c572 100644
--- a/src/cups/selphy_print.c
+++ b/src/cups/selphy_print.c
@@ -37,6 +37,41 @@
#include "backend_common.h"
+/* Exported */
+#define USB_VID_CANON 0x04a9
+#define USB_PID_CANON_CP10 0x304A
+#define USB_PID_CANON_CP100 0x3063
+#define USB_PID_CANON_CP200 0x307C
+#define USB_PID_CANON_CP220 0x30BD
+#define USB_PID_CANON_CP300 0x307D
+#define USB_PID_CANON_CP330 0x30BE
+#define USB_PID_CANON_CP400 0x30F6
+#define USB_PID_CANON_CP500 0x30F5
+#define USB_PID_CANON_CP510 0x3128
+#define USB_PID_CANON_CP520 520 // XXX 316f? 3172? (related to cp740/cp750)
+#define USB_PID_CANON_CP530 0x31b1
+#define USB_PID_CANON_CP600 0x310B
+#define USB_PID_CANON_CP710 0x3127
+#define USB_PID_CANON_CP720 0x3143
+#define USB_PID_CANON_CP730 0x3142
+#define USB_PID_CANON_CP740 0x3171
+#define USB_PID_CANON_CP750 0x3170
+#define USB_PID_CANON_CP760 0x31AB
+#define USB_PID_CANON_CP770 0x31AA
+#define USB_PID_CANON_CP780 0x31DD
+#define USB_PID_CANON_CP790 0x31E7
+#define USB_PID_CANON_CP800 0x3214
+#define USB_PID_CANON_CP810 0x3256
+#define USB_PID_CANON_CP820 820 // XXX
+#define USB_PID_CANON_CP900 0x3255
+#define USB_PID_CANON_CP910 910 // XXX
+#define USB_PID_CANON_ES1 0x3141
+#define USB_PID_CANON_ES2 0x3185
+#define USB_PID_CANON_ES20 0x3186
+#define USB_PID_CANON_ES3 0x31AF
+#define USB_PID_CANON_ES30 0x31B0
+#define USB_PID_CANON_ES40 0x31EE
+
#define READBACK_LEN 12
struct printer_data {
@@ -222,8 +257,8 @@ static struct printer_data selphy_printers[] = {
.ready_m_readback = { 0x04, 0x00, 0x03, 0x00, 0x02, 0x01, -1, 0x01, 0x00, 0x00, 0x00, 0x00 },
.ready_c_readback = { 0x04, 0x00, 0x07, 0x00, 0x02, 0x01, -1, 0x01, 0x00, 0x00, 0x00, 0x00 },
.done_c_readback = { 0x04, 0x00, 0x00, 0x00, 0x02, 0x01, -1, 0x01, 0x00, 0x00, 0x00, 0x00 },
- // .clear_error + clear_error_len
- // .paper_codes
+ .clear_error = { 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ .clear_error_len = 12,
.pgcode_offset = 3,
.paper_code_offset = 6,
.error_detect = es1_error_detect,
@@ -237,8 +272,8 @@ static struct printer_data selphy_printers[] = {
.ready_m_readback = { 0x06, 0x00, 0x03, 0x00, -1, 0x00, -1, -1, 0x00, 0x00, 0x00, 0x00 },
.ready_c_readback = { 0x09, 0x00, 0x07, 0x00, -1, 0x00, -1, -1, 0x00, 0x00, 0x00, 0x00 },
.done_c_readback = { 0x09, 0x00, 0x00, 0x00, -1, 0x00, -1, -1, 0x00, 0x00, 0x00, 0x00 },
- // .clear_error + clear_error_len
- // .paper_codes
+ .clear_error = { 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ .clear_error_len = 12,
.pgcode_offset = 2,
.paper_code_offset = 4,
.error_detect = es2_error_detect,
@@ -252,8 +287,8 @@ static struct printer_data selphy_printers[] = {
.ready_m_readback = { 0x03, 0xff, 0x02, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 },
.ready_c_readback = { 0x05, 0xff, 0x03, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 },
.done_c_readback = { 0x00, 0xff, 0x10, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 },
- // .clear_error + clear_error_len
- // .paper_codes
+ .clear_error = { 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ .clear_error_len = 12,
.pgcode_offset = 2,
.paper_code_offset = -1,
.error_detect = es3_error_detect,
@@ -274,8 +309,8 @@ static struct printer_data selphy_printers[] = {
.ready_m_readback = { 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -1 },
.ready_c_readback = { 0x00, 0x05, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -1 },
.done_c_readback = { 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -1 },
- // .clear_error + clear_error_len
- // .paper_codes
+ .clear_error = { 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ .clear_error_len = 12,
.pgcode_offset = 2,
.paper_code_offset = 11,
.error_detect = es40_error_detect,
@@ -523,9 +558,6 @@ static void canonselphy_attach(void *vctx, struct libusb_device_handle *dev,
device = libusb_get_device(dev);
libusb_get_device_descriptor(device, &desc);
-
-#define USB_PID_CANON_CP790 0x31E7
-#define USB_PID_CANON_ES40 0x31EE
if (desc.idProduct == USB_PID_CANON_CP790)
printer_type = P_CP790;
@@ -892,44 +924,9 @@ top:
return 0;
}
-/* Exported */
-#define USB_VID_CANON 0x04a9
-#define USB_PID_CANON_CP10 0x304A
-#define USB_PID_CANON_CP100 0x3063
-#define USB_PID_CANON_CP200 0x307C
-#define USB_PID_CANON_CP220 0x30BD
-#define USB_PID_CANON_CP300 0x307D
-#define USB_PID_CANON_CP330 0x30BE
-#define USB_PID_CANON_CP400 0x30F6
-#define USB_PID_CANON_CP500 0x30F5
-#define USB_PID_CANON_CP510 0x3128
-#define USB_PID_CANON_CP520 520 // XXX 316f? 3172? (related to cp740/cp750)
-#define USB_PID_CANON_CP530 0x31b1
-#define USB_PID_CANON_CP600 0x310B
-#define USB_PID_CANON_CP710 0x3127
-#define USB_PID_CANON_CP720 0x3143
-#define USB_PID_CANON_CP730 0x3142
-#define USB_PID_CANON_CP740 0x3171
-#define USB_PID_CANON_CP750 0x3170
-#define USB_PID_CANON_CP760 0x31AB
-#define USB_PID_CANON_CP770 0x31AA
-#define USB_PID_CANON_CP780 0x31DD
-#define USB_PID_CANON_CP790 0x31E7
-#define USB_PID_CANON_CP800 0x3214
-#define USB_PID_CANON_CP810 0x3256
-#define USB_PID_CANON_CP820 820 // XXX
-#define USB_PID_CANON_CP900 0x3255
-#define USB_PID_CANON_CP910 910 // XXX
-#define USB_PID_CANON_ES1 0x3141
-#define USB_PID_CANON_ES2 0x3185
-#define USB_PID_CANON_ES20 0x3186
-#define USB_PID_CANON_ES3 0x31AF
-#define USB_PID_CANON_ES30 0x31B0
-#define USB_PID_CANON_ES40 0x31EE
-
struct dyesub_backend canonselphy_backend = {
.name = "Canon SELPHY CP/ES",
- .version = "0.80",
+ .version = "0.81",
.uri_prefix = "canonselphy",
.init = canonselphy_init,
.attach = canonselphy_attach,
@@ -1283,6 +1280,6 @@ struct dyesub_backend canonselphy_backend = {
necessarily identical. So it's possible to have a code of, say,
0x41 if the 'Wide' paper tray is loaded with a 'P' ribbon. A '0' is used
to signify nothing being loaded.
-
+
*/