summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2019-09-28 11:05:42 -0400
committerSolomon Peachy <pizza@shaftnet.org>2019-09-28 11:05:42 -0400
commit8d371eee153ffb6dae3d59ed6232eb61d3a258ca (patch)
tree055e45998804d113144e870ef2372d794a0515a1
parenta06a81d1e98166f0cd5b5ef634ae41ec83366873 (diff)
downloadselphy_print-8d371eee153ffb6dae3d59ed6232eb61d3a258ca.tar.gz
selphy_print-8d371eee153ffb6dae3d59ed6232eb61d3a258ca.tar.bz2
selphy_print-8d371eee153ffb6dae3d59ed6232eb61d3a258ca.zip
all: Clean up unnecessary #include
-rw-r--r--backend_canonselphy.c10
-rw-r--r--backend_canonselphyneo.c10
-rw-r--r--backend_common.c1
-rw-r--r--backend_common.h1
-rw-r--r--backend_dnpds40.c10
-rw-r--r--backend_hiti.c10
-rw-r--r--backend_kodak1400.c10
-rw-r--r--backend_kodak605.c10
-rw-r--r--backend_kodak6800.c10
-rw-r--r--backend_magicard.c14
-rw-r--r--backend_mitsu70x.c14
-rw-r--r--backend_mitsu9550.c15
-rw-r--r--backend_mitsud90.c10
-rw-r--r--backend_mitsup95d.c10
-rw-r--r--backend_shinkos1245.c10
-rw-r--r--backend_shinkos2145.c10
-rw-r--r--backend_shinkos6145.c25
-rw-r--r--backend_shinkos6245.c13
-rw-r--r--backend_sinfonia.c10
-rw-r--r--backend_sonyupd.c10
-rw-r--r--backend_sonyupdneo.c10
21 files changed, 17 insertions, 206 deletions
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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <errno.h>
+#include <signal.h>
#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 <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <signal.h>
#include <libusb.h>
#include <arpa/inet.h>
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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <time.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <string.h>
-
#define BACKEND magicard_backend
#include "backend_common.h"
+#include <time.h>
+
/* 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
+#define BACKEND mitsu70x_backend
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
+#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
+#define BACKEND mitsu9550_backend
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
+#include "backend_common.h"
/* For Integration into gutenprint */
#if defined(HAVE_CONFIG_H)
#include <config.h>
#endif
-#define BACKEND mitsu9550_backend
-
-
#if defined(USE_DLOPEN)
#define WITH_DYNAMIC
#include <dlfcn.h>
@@ -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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
+
+#define BACKEND shinkos6145_backend
+
+#include "backend_common.h"
+#include "backend_sinfonia.h"
+
#include <time.h>
/* 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <time.h>
-
#define BACKEND shinkos6245_backend
#include "backend_common.h"
#include "backend_sinfonia.h"
+#include <time.h>
+
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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-
#define BACKEND sonyupdneo_backend
#include "backend_common.h"