diff --git a/backend_canonselphy.c b/backend_canonselphy.c index 3573edb..6d06b3d 100644 --- a/backend_canonselphy.c +++ b/backend_canonselphy.c @@ -27,16 +27,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND canonselphy_backend #include "backend_common.h" diff --git a/backend_canonselphyneo.c b/backend_canonselphyneo.c index 4b0f7de..24f810a 100644 --- a/backend_canonselphyneo.c +++ b/backend_canonselphyneo.c @@ -27,16 +27,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND canonselphyneo_backend #include "backend_common.h" diff --git a/backend_common.c b/backend_common.c index 00921e4..22ab12e 100644 --- a/backend_common.c +++ b/backend_common.c @@ -29,6 +29,7 @@ #include "backend_common.h" #include +#include #define BACKEND_VERSION "0.96" #ifndef URI_PREFIX diff --git a/backend_common.h b/backend_common.h index af783ee..667de17 100644 --- a/backend_common.h +++ b/backend_common.h @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/backend_dnpds40.c b/backend_dnpds40.c index 4b4b287..157d89e 100644 --- a/backend_dnpds40.c +++ b/backend_dnpds40.c @@ -41,16 +41,6 @@ assume the worst */ //#define STATE_DIR "/tmp" -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND dnpds40_backend #include "backend_common.h" diff --git a/backend_hiti.c b/backend_hiti.c index e4ddf05..62ced37 100644 --- a/backend_hiti.c +++ b/backend_hiti.c @@ -27,16 +27,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND hiti_backend #include "backend_common.h" diff --git a/backend_kodak1400.c b/backend_kodak1400.c index a2f9e13..662c2c3 100644 --- a/backend_kodak1400.c +++ b/backend_kodak1400.c @@ -27,16 +27,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND kodak1400_backend #include "backend_common.h" diff --git a/backend_kodak605.c b/backend_kodak605.c index 5a3e194..ad0daa7 100644 --- a/backend_kodak605.c +++ b/backend_kodak605.c @@ -27,16 +27,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND kodak605_backend #include "backend_common.h" diff --git a/backend_kodak6800.c b/backend_kodak6800.c index c2daa54..8895891 100644 --- a/backend_kodak6800.c +++ b/backend_kodak6800.c @@ -31,16 +31,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND kodak6800_backend #include "backend_common.h" diff --git a/backend_magicard.c b/backend_magicard.c index adafd52..157a69f 100644 --- a/backend_magicard.c +++ b/backend_magicard.c @@ -27,22 +27,12 @@ * */ -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - #define BACKEND magicard_backend #include "backend_common.h" +#include + /* Exported */ #define USB_VID_MAGICARD 0x0C1F #define USB_PID_MAGICARD_TANGO2E 0x1800 diff --git a/backend_mitsu70x.c b/backend_mitsu70x.c index f738dcf..c58cc49 100644 --- a/backend_mitsu70x.c +++ b/backend_mitsu70x.c @@ -27,15 +27,9 @@ * */ -#include -#include -#include -#include +#define BACKEND mitsu70x_backend -#include -#include -#include -#include +#include "backend_common.h" /* For Integration into gutenprint */ #if defined(HAVE_CONFIG_H) @@ -65,10 +59,6 @@ #warning "No dynamic loading support!" #endif -#define BACKEND mitsu70x_backend - -#include "backend_common.h" - // #include "lib70x/libMitsuD70ImageReProcess.h" #ifndef LUT_LEN diff --git a/backend_mitsu9550.c b/backend_mitsu9550.c index 529de70..7f652d1 100644 --- a/backend_mitsu9550.c +++ b/backend_mitsu9550.c @@ -27,24 +27,15 @@ * */ -#include -#include -#include -#include +#define BACKEND mitsu9550_backend -#include -#include -#include -#include +#include "backend_common.h" /* For Integration into gutenprint */ #if defined(HAVE_CONFIG_H) #include #endif -#define BACKEND mitsu9550_backend - - #if defined(USE_DLOPEN) #define WITH_DYNAMIC #include @@ -68,8 +59,6 @@ #warning "No dynamic loading support!" #endif -#include "backend_common.h" - // #include "lib70x/libMitsuD70ImageReProcess.h" #ifndef LUT_LEN diff --git a/backend_mitsud90.c b/backend_mitsud90.c index 96c0827..2e8f762 100644 --- a/backend_mitsud90.c +++ b/backend_mitsud90.c @@ -27,16 +27,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND mitsud90_backend #include "backend_common.h" diff --git a/backend_mitsup95d.c b/backend_mitsup95d.c index 88b0406..e0586b3 100644 --- a/backend_mitsup95d.c +++ b/backend_mitsup95d.c @@ -31,16 +31,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND mitsup95d_backend #include "backend_common.h" diff --git a/backend_shinkos1245.c b/backend_shinkos1245.c index 2360a40..5103549 100644 --- a/backend_shinkos1245.c +++ b/backend_shinkos1245.c @@ -29,16 +29,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND shinkos1245_backend #include "backend_common.h" diff --git a/backend_shinkos2145.c b/backend_shinkos2145.c index 7a6394c..3839b91 100644 --- a/backend_shinkos2145.c +++ b/backend_shinkos2145.c @@ -31,16 +31,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND shinkos2145_backend #include "backend_common.h" diff --git a/backend_shinkos6145.c b/backend_shinkos6145.c index fb60690..17b2e11 100644 --- a/backend_shinkos6145.c +++ b/backend_shinkos6145.c @@ -37,16 +37,12 @@ * */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#define BACKEND shinkos6145_backend + +#include "backend_common.h" +#include "backend_sinfonia.h" + #include /* For Integration into gutenprint */ @@ -77,11 +73,6 @@ #warning "No dynamic loading support!" #endif -#define BACKEND shinkos6145_backend - -#include "backend_common.h" -#include "backend_sinfonia.h" - /* Image processing library function prototypes */ typedef int (*ImageProcessingFN)(unsigned char *, unsigned short *, void *); typedef int (*ImageAvrCalcFN)(unsigned char *, unsigned short, unsigned short, unsigned char *); @@ -812,7 +803,7 @@ static int shinkos6145_get_imagecorr(struct shinkos6145_ctx *ctx) ctx->corrdata = malloc(sizeof(struct shinkos6145_correctionparam)); if (!ctx->corrdata) { ERROR("Memory allocation failure\n"); - ret = -ENOMEM; + ret = CUPS_BACKEND_FAILED; goto done; } memset(ctx->corrdata, 0, sizeof(struct shinkos6145_correctionparam)); @@ -865,7 +856,7 @@ static int shinkos6145_get_eeprom(struct shinkos6145_ctx *ctx) ctx->eeprom = malloc(ctx->eepromlen); if (!ctx->eeprom) { ERROR("Memory allocation failure\n"); - ret = -ENOMEM; + ret = CUPS_BACKEND_FAILED; goto done; } memcpy(ctx->eeprom, resp.data, ctx->eepromlen); diff --git a/backend_shinkos6245.c b/backend_shinkos6245.c index ee419d6..f8f86de 100644 --- a/backend_shinkos6245.c +++ b/backend_shinkos6245.c @@ -29,22 +29,13 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include -#include - #define BACKEND shinkos6245_backend #include "backend_common.h" #include "backend_sinfonia.h" +#include + enum { S_IDLE = 0, S_PRINTER_READY_CMD, diff --git a/backend_sinfonia.c b/backend_sinfonia.c index e674a8d..7a1348b 100644 --- a/backend_sinfonia.c +++ b/backend_sinfonia.c @@ -27,16 +27,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #include "backend_common.h" #include "backend_sinfonia.h" diff --git a/backend_sonyupd.c b/backend_sonyupd.c index 5c9bb52..1c4bf12 100644 --- a/backend_sonyupd.c +++ b/backend_sonyupd.c @@ -27,16 +27,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND sonyupd_backend #include "backend_common.h" diff --git a/backend_sonyupdneo.c b/backend_sonyupdneo.c index 4a9a744..bdb5055 100644 --- a/backend_sonyupdneo.c +++ b/backend_sonyupdneo.c @@ -27,16 +27,6 @@ * */ -#include -#include -#include -#include - -#include -#include -#include -#include - #define BACKEND sonyupdneo_backend #include "backend_common.h"