From f0c65950c372816ea2743b56e4964c83f35705f7 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Fri, 10 Jan 2025 19:44:01 +0100 Subject: [PATCH] reduce header includes --- src/kds_s2000w_client.c | 3 +-- src/kds_s2000w_client.h | 2 ++ src/kds_s2000w_handler.c | 1 - src/kds_s2000w_handler.h | 1 + src/kds_s2000w_handler_opts.c | 3 +-- src/kds_s2000w_handler_opts.h | 3 +++ src/kds_s2000w_image_converter.c | 2 -- src/kds_s2000w_image_converter.h | 1 + src/kds_s2000w_net.c | 4 ---- src/kds_s2000w_option_descriptors.h | 1 + 10 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/kds_s2000w_client.c b/src/kds_s2000w_client.c index 8968974..eefcdc2 100644 --- a/src/kds_s2000w_client.c +++ b/src/kds_s2000w_client.c @@ -1,11 +1,10 @@ #include #include -#include #include #include "config.h" +#include "kds_s2000w_client.h" #include "kds_s2000w_config.h" #include "kds_s2000w_heartbeat.h" -#include "kds_s2000w_client.h" #include "kds_s2000w_debug.h" #define MAX_STR_BUFFER_LENGTH 80 diff --git a/src/kds_s2000w_client.h b/src/kds_s2000w_client.h index 5aa6af4..464f30d 100644 --- a/src/kds_s2000w_client.h +++ b/src/kds_s2000w_client.h @@ -1,5 +1,6 @@ #ifndef KDS_S2000W_CLIENT_H #define KDS_S2000W_CLIENT_H + typedef struct { char* data; size_t size; @@ -20,4 +21,5 @@ int kds_s2000w_client_delete_image(int64_t sessionid, int img_number, response* int kds_s2000w_client_get_capabilities(response* resp); int kds_s2000w_client_get_option(int64_t sessionid, response* resp); int kds_s2000w_client_set_option(int64_t sessionid, response* resp); + #endif \ No newline at end of file diff --git a/src/kds_s2000w_handler.c b/src/kds_s2000w_handler.c index dd38584..6e68432 100644 --- a/src/kds_s2000w_handler.c +++ b/src/kds_s2000w_handler.c @@ -1,4 +1,3 @@ -#include #include #include #include diff --git a/src/kds_s2000w_handler.h b/src/kds_s2000w_handler.h index 1507ac9..fba170b 100644 --- a/src/kds_s2000w_handler.h +++ b/src/kds_s2000w_handler.h @@ -66,4 +66,5 @@ void kds_s2000w_handler_set_option(handler* handle, int option, void* value, int void kds_s2000w_handler_set_option_auto(int option); void kds_s2000w_handler_start_scan(handler* h); void kds_s2000w_handler_stop_scan(handler* h); + #endif \ No newline at end of file diff --git a/src/kds_s2000w_handler_opts.c b/src/kds_s2000w_handler_opts.c index b1a53f4..9ee0566 100644 --- a/src/kds_s2000w_handler_opts.c +++ b/src/kds_s2000w_handler_opts.c @@ -1,8 +1,7 @@ #include #include -#include "kds_s2000w_handler.h" -#include "kds_s2000w_client.h" #include "kds_s2000w_handler_opts.h" +#include "kds_s2000w_client.h" #include "kds_s2000w_debug.h" #define AUTOSTART_ON 1 diff --git a/src/kds_s2000w_handler_opts.h b/src/kds_s2000w_handler_opts.h index f429743..0b41e7a 100644 --- a/src/kds_s2000w_handler_opts.h +++ b/src/kds_s2000w_handler_opts.h @@ -1,5 +1,8 @@ #ifndef KDS_S2000W_HANDLER_OPTS_H #define KDS_S2000W_HANDLER_OPTS_H +#include "kds_s2000w_handler.h" + void kds_s2000w_handler_get_option(handler* h, int option, void* value, int* info); void kds_s2000w_handler_set_option(handler* h, int option, void* value, int* info); + #endif \ No newline at end of file diff --git a/src/kds_s2000w_image_converter.c b/src/kds_s2000w_image_converter.c index d9f09f9..6878fd5 100644 --- a/src/kds_s2000w_image_converter.c +++ b/src/kds_s2000w_image_converter.c @@ -5,8 +5,6 @@ #define IMAGE_MAGICK_MAJOR 6 #endif -#include -#include #if IMAGE_MAGICK_MAJOR == 6 #include #endif diff --git a/src/kds_s2000w_image_converter.h b/src/kds_s2000w_image_converter.h index 01b47b6..20af3a6 100644 --- a/src/kds_s2000w_image_converter.h +++ b/src/kds_s2000w_image_converter.h @@ -15,4 +15,5 @@ typedef struct { void kds_s2000w_convert_jpg_to_pnm_with_depth(blobdata* in, blobdata* out, int depth); void kds_s2000w_convert_tiff_to_pnm(blobdata* in, blobdata* out); void kds_s2000w_metadata_from_image(blobdata* image, image_metadata* mdata); + #endif \ No newline at end of file diff --git a/src/kds_s2000w_net.c b/src/kds_s2000w_net.c index e8dd77e..c746a14 100644 --- a/src/kds_s2000w_net.c +++ b/src/kds_s2000w_net.c @@ -1,8 +1,4 @@ -#include -#include #include -#include -#include #include "config.h" #include "kds_s2000w_net.h" #include "kds_s2000w_option_descriptors.h" diff --git a/src/kds_s2000w_option_descriptors.h b/src/kds_s2000w_option_descriptors.h index a7fda6e..fc08f5b 100644 --- a/src/kds_s2000w_option_descriptors.h +++ b/src/kds_s2000w_option_descriptors.h @@ -7,4 +7,5 @@ void kds_s2000w_option_descriptor_init_option_descriptors(); void kds_s2000w_option_descriptor_free_option_descriptors(); SANE_Option_Descriptor* kds_s2000w_option_get_descriptor(int option); + #endif \ No newline at end of file -- 2.39.5