From: Bastian Dehn Date: Thu, 26 Dec 2024 16:42:31 +0000 (+0100) Subject: remove nodebug defininition X-Git-Tag: v1.0.14^2~2 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=1f659223eab147aef5a3e4f34c226d8da591ec0b;p=sane-kds-s2000w-net.git remove nodebug defininition --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bb21e31..0b3836a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -100,10 +100,6 @@ TARGET_LINK_LIBRARIES("sane-kds_s2000w_net-static" ${ImageMagick_LIBRARIES} json-c) -IF(CMAKE_BUILD_TYPE STREQUAL "Release") - add_compile_definitions("NODEBUG") -ENDIF() - INSTALL(TARGETS "sane-kds_s2000w_net" "sane-kds_s2000w_net-static" DESTINATION ${CMAKE_LIBRARY_PATH}/sane) install(FILES "kds_s2000w_net.conf" diff --git a/src/kds_s2000w_client.c b/src/kds_s2000w_client.c index 87ca231..09ecf30 100644 --- a/src/kds_s2000w_client.c +++ b/src/kds_s2000w_client.c @@ -5,10 +5,7 @@ #include "kds_s2000w_config.h" #include "kds_s2000w_heartbeat.h" #include "kds_s2000w_client.h" - -#ifndef NODEBUG #include "kds_s2000w_debug.h" -#endif void _kds_s2000w_client_read_error_status(CURL* curl, response* resp) { @@ -35,9 +32,7 @@ void _kds_s2000w_client_load_config() void _kds_s2000w_client_stream_to_response(FILE* stream, response* resp, size_t* size) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_stream_to_response"); -#endif resp->data = realloc(resp->data, sizeof(char) * *size + 1); fseek(stream, 0, SEEK_SET); @@ -48,9 +43,7 @@ void _kds_s2000w_client_stream_to_response(FILE* stream, response* resp, size_t* response* kds_s2000w_client_response_init() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_response_init"); -#endif response* resp = malloc(sizeof(response)); resp->data = malloc(sizeof(char)); @@ -64,9 +57,8 @@ response* kds_s2000w_client_response_init() void kds_s2000w_client_response_free(response* response) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_response_free"); -#endif + if (response == NULL) return; @@ -80,9 +72,7 @@ void kds_s2000w_client_response_free(response* response) int kds_s2000w_client_open_session(response* response) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_open_session"); -#endif _kds_s2000w_client_load_config(); @@ -135,9 +125,7 @@ int kds_s2000w_client_open_session(response* response) void kds_s2000w_client_close_session(int64_t sessionid) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_close_session"); -#endif struct curl_slist* headers = NULL; char header_str[80]; @@ -176,9 +164,7 @@ void kds_s2000w_client_close_session(int64_t sessionid) int kds_s2000w_client_status_session(int64_t sessionid, response* response) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_status_session"); -#endif join_thread(); wait_seconds(&p_config.heartbeat); @@ -234,9 +220,7 @@ int kds_s2000w_client_status_session(int64_t sessionid, response* response) int kds_s2000w_client_start_scan(int64_t sessionid, response* response) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_start_scan"); -#endif char* url = NULL; struct curl_slist* headers = NULL; @@ -290,9 +274,7 @@ int kds_s2000w_client_start_scan(int64_t sessionid, response* response) int kds_s2000w_client_stop_scan(int64_t sessionid, response* response) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_stop_scan"); -#endif struct curl_slist* headers = NULL; char header_str[80]; @@ -346,9 +328,7 @@ int kds_s2000w_client_stop_scan(int64_t sessionid, response* response) int kds_s2000w_client_get_image(int64_t sessionid, int img_number, response* response) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_get_image"); -#endif struct curl_slist* headers = NULL; char* url = NULL; @@ -403,9 +383,7 @@ int kds_s2000w_client_get_image(int64_t sessionid, int img_number, response* res int kds_s2000w_client_delete_image(int64_t sessionid, int img_number, response* response) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_delete_image"); -#endif char* url = NULL; struct curl_slist* headers = NULL; @@ -460,9 +438,7 @@ int kds_s2000w_client_delete_image(int64_t sessionid, int img_number, response* int kds_s2000w_client_get_capabilities(response* response) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_get_capabilities"); -#endif char* url = NULL; @@ -510,9 +486,7 @@ int kds_s2000w_client_get_capabilities(response* response) int kds_s2000w_client_get_option(int64_t sessionid, response* response) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_get_option"); -#endif struct curl_slist* headers = NULL; char header_str[80]; @@ -565,9 +539,7 @@ int kds_s2000w_client_get_option(int64_t sessionid, response* response) int kds_s2000w_client_set_option(int64_t sessionid, response* response) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_client_set_option"); -#endif char* url = NULL; struct curl_slist* headers = NULL; diff --git a/src/kds_s2000w_debug.c b/src/kds_s2000w_debug.c index c8897fc..2535dfb 100644 --- a/src/kds_s2000w_debug.c +++ b/src/kds_s2000w_debug.c @@ -1,4 +1,3 @@ -#ifndef NODEBUG #include #include #include "kds_s2000w_debug.h" @@ -35,5 +34,4 @@ void debug_printf_hex(int level, const char* message, char value) { if (level <= _get_log_level()) printf("%s: %hhx\n", message, value); -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/kds_s2000w_debug.h b/src/kds_s2000w_debug.h index c8377eb..f507612 100644 --- a/src/kds_s2000w_debug.h +++ b/src/kds_s2000w_debug.h @@ -1,4 +1,3 @@ -#ifndef NODEBUG #ifndef KDS_S2000w_DEBUG_H #define KDS_S2000w_DEBUG_H @@ -14,5 +13,4 @@ void debug_printf(int level, const char* message); void debug_printf_int(int level, const char* message, int value); void debug_printf_long(int level, const char* message, long value); void debug_printf_hex(int level, const char* message, char value); -#endif /* KDS_S2000w_DEBUG_H */ -#endif /* NODEBUG */ \ No newline at end of file +#endif \ No newline at end of file diff --git a/src/kds_s2000w_handler.c b/src/kds_s2000w_handler.c index fee2739..440e0ca 100644 --- a/src/kds_s2000w_handler.c +++ b/src/kds_s2000w_handler.c @@ -6,16 +6,11 @@ #include "kds_s2000w_handler_opts.h" #include "kds_s2000w_client.h" #include "kds_s2000w_image_converter.h" - -#ifndef NODEBUG #include "kds_s2000w_debug.h" -#endif handler* init_handler() { -#ifndef NODEBUG debug_printf(ALL, "init handler"); -#endif handler* h = malloc(sizeof(handler)); h->current_scanner_config = NULL; @@ -44,9 +39,7 @@ handler* init_handler() void free_handler(handler* h) { -#ifndef NODEBUG debug_printf(ALL, "free handler"); -#endif json_object_put(h->current_scanner_config); h->current_scanner_config = NULL; @@ -64,9 +57,7 @@ void free_handler(handler* h) void reset_handler(handler* h) { -#ifndef NODEBUG debug_printf(ALL, "reset handler"); -#endif free(h->image->data); h->image->data = NULL; @@ -86,9 +77,7 @@ void reset_handler(handler* h) void kds_s2000w_handler_get_current_metadata(handler* h, metadata* params) { -#ifndef NODEBUG debug_printf(ALL, "get_current_metadata"); -#endif params->format = 1; params->last_frame = 1; @@ -141,9 +130,7 @@ void kds_s2000w_handler_get_current_metadata(handler* h, metadata* params) kds_s2000w_convert_tiff_to_pnm(scanner_image, image); } -#ifndef NODEBUG debug_printf_int(DEBUG, "size of pnm image", image->size); -#endif if (params->depth == 1) params->bytes_per_line = channels * floor((params->pixels_per_line + 7) / 8); @@ -161,9 +148,7 @@ void kds_s2000w_handler_get_current_metadata(handler* h, metadata* params) void kds_s2000w_handler_delete_current_image(handler* h) { -#ifndef NODEBUG debug_printf(ALL, "delete_current_image"); -#endif response* resp = kds_s2000w_client_response_init(); kds_s2000w_client_delete_image(h->sessionid, h->current_scan_status->current_image_number, resp); @@ -179,9 +164,7 @@ void kds_s2000w_handler_delete_current_image(handler* h) void kds_s2000w_handler_download_current_image(handler* h) { -#ifndef NODEBUG debug_printf(ALL, "download_current_image"); -#endif free(h->image->data); h->image->data = NULL; @@ -204,9 +187,7 @@ void kds_s2000w_handler_download_current_image(handler* h) void kds_s2000w_net_handler_get_current_scan_status(handler* h) { -#ifndef NODEBUG debug_printf(ALL, "get_current_scan_status"); -#endif if (h->current_scan_status->available_images > 1) return; @@ -216,9 +197,7 @@ void kds_s2000w_net_handler_get_current_scan_status(handler* h) if (resp->error_size > 0) fprintf(stderr, "%s\n", resp->error_status); -#ifndef NODEBUG debug_printf(DEBUG, resp->data); -#endif json_object* status_resp_obj = json_tokener_parse(resp->data); json_object* status_obj = json_object_object_get(status_resp_obj, "Status"); @@ -261,10 +240,7 @@ void kds_s2000w_handler_recreate_session(handler* h) value_object = NULL; json_object_put(sessionJson); sessionJson = NULL; - -#ifndef NODEBUG debug_printf_long(INFO, "SessionId", h->sessionid); -#endif // set old config parameters kds_s2000w_client_response_free(resp); @@ -285,9 +261,7 @@ void kds_s2000w_handler_recreate_session(handler* h) void kds_s2000w_handler_open(const char* devicename, void** handle) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_handler_open"); -#endif if (strcmp(devicename, "kds_s2000w_net") != 0) return; @@ -335,9 +309,7 @@ void kds_s2000w_handler_open(const char* devicename, void** handle) json_object_object_get_ex(h->current_scanner_config, "SessionId", &value_object); h->sessionid = json_object_get_int64(value_object); h->state = OPENED; -#ifndef NODEBUG debug_printf_long(INFO, "SessionId", h->sessionid); -#endif value_object = NULL; json_object_put(h->current_scanner_config); @@ -348,9 +320,7 @@ void kds_s2000w_handler_open(const char* devicename, void** handle) void kds_s2000w_handler_close(handler* h) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_handler_close"); -#endif json_object_put(h->current_scanner_config); h->current_scanner_config = NULL; @@ -366,9 +336,7 @@ void kds_s2000w_handler_close(handler* h) void kds_s2000w_handler_start_scan(handler* h) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_handler_start_scan"); -#endif response* resp = kds_s2000w_client_response_init(); kds_s2000w_client_start_scan(h->sessionid, resp); @@ -382,9 +350,7 @@ void kds_s2000w_handler_start_scan(handler* h) void kds_s2000w_handler_stop_scan(handler* h) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_handler_stop_scan"); -#endif response* resp = kds_s2000w_client_response_init(); kds_s2000w_client_stop_scan(h->sessionid, resp); diff --git a/src/kds_s2000w_handler_opts.c b/src/kds_s2000w_handler_opts.c index 65725bf..3b9cb89 100644 --- a/src/kds_s2000w_handler_opts.c +++ b/src/kds_s2000w_handler_opts.c @@ -3,10 +3,7 @@ #include "kds_s2000w_handler.h" #include "kds_s2000w_client.h" #include "kds_s2000w_handler_opts.h" - -#ifndef NODEBUG #include "kds_s2000w_debug.h" -#endif #define AUTOSTART_ALWAYS_ON 1 #define COUNT_CUSTOM_OPTIONS 0 @@ -47,9 +44,7 @@ void _load_options(handler* h) h->current_scanner_config = json_tokener_parse(resp->data); if (result != 0 || resp->code != 200) { -#ifndef NODEBUG debug_printf_int(ERROR, "load options response code", resp->code); -#endif kds_s2000w_client_response_free(resp); resp = NULL; json_object_put(h->current_scanner_config); @@ -82,10 +77,8 @@ void _set_option_to_default(handler* h) resp->data = realloc(resp->data, resp->size); resp->data = memcpy(resp->data, json_string, resp->size); kds_s2000w_client_set_option(h->sessionid, resp); -#ifndef NODEBUG if (resp->code != 200) debug_printf_int(ERROR, "set options response code", resp->code); -#endif kds_s2000w_client_response_free(resp); resp = NULL; @@ -102,10 +95,8 @@ void _set_options(handler* h) resp->data = realloc(resp->data, resp->size); resp->data = memcpy(resp->data, json_string, resp->size); kds_s2000w_client_set_option(h->sessionid, resp); -#ifndef NODEBUG if (resp->code != 200) debug_printf_int(ERROR, "set options response code", resp->code); -#endif kds_s2000w_client_response_free(resp); resp = NULL; @@ -130,9 +121,7 @@ void kds_s2000w_handler_get_option(handler* h, int option, void* value, int* inf config = json_object_object_get(h->current_scanner_config, "Configuration"); int* int_value_ptr = (int*) value; *int_value_ptr = json_object_object_length(config) + COUNT_CUSTOM_OPTIONS; -#ifndef NODEBUG debug_printf_int(DEBUG, "option numbers", *int_value_ptr); -#endif break; case 2: value_object = json_object_object_get(config, "ScanSource"); diff --git a/src/kds_s2000w_image_converter.c b/src/kds_s2000w_image_converter.c index 4f67c41..b77b135 100644 --- a/src/kds_s2000w_image_converter.c +++ b/src/kds_s2000w_image_converter.c @@ -14,28 +14,20 @@ #include #endif #include "kds_s2000w_image_converter.h" - -#ifndef NODEBUG #include "kds_s2000w_debug.h" -#endif void kds_s2000w_convert_to_pnm_with_depth(blobdata* in, blobdata* out, int depth, const char* format) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_convert_to_pnm_With_depth"); -#endif ExceptionInfo* exception = AcquireExceptionInfo(); ImageInfo* image_info = CloneImageInfo(NULL); sprintf(image_info->filename, "streamin.%s", format); - -#ifndef NODEBUG debug_printf(DEBUG, image_info->filename); -#endif Image* input_image = BlobToImage(image_info, in->data, in->size , exception); @@ -78,29 +70,21 @@ void kds_s2000w_convert_to_pnm_with_depth(blobdata* in, void kds_s2000w_convert_jpg_to_pnm_with_depth(blobdata* in, blobdata* out, int depth) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_convert_jpg_to_pnm_With_depth"); -#endif - const char* extension = "jpg"; - kds_s2000w_convert_to_pnm_with_depth(in, out, depth, extension); + kds_s2000w_convert_to_pnm_with_depth(in, out, depth, "jpg"); } void kds_s2000w_convert_tiff_to_pnm(blobdata* in, blobdata* out) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_convert_tiff_to_pnm"); -#endif - const char* extension = "tiff"; - kds_s2000w_convert_to_pnm_with_depth(in, out, -1, extension); + kds_s2000w_convert_to_pnm_with_depth(in, out, -1, "tiff"); } void kds_s2000w_metadata_from_image(blobdata* image, image_metadata* mdata) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_metadata_from_image"); -#endif ExceptionInfo* exception = AcquireExceptionInfo(); ImageInfo* image_info = CloneImageInfo(NULL); diff --git a/src/kds_s2000w_net.c b/src/kds_s2000w_net.c index 5772bd1..1e54a43 100644 --- a/src/kds_s2000w_net.c +++ b/src/kds_s2000w_net.c @@ -7,18 +7,13 @@ #include "kds_s2000w_net.h" #include "kds_s2000w_option_descriptors.h" #include "kds_s2000w_handler.h" - -#ifndef NODEBUG #include "kds_s2000w_debug.h" -#endif #define SPACE 0x0a int _sane_kds_s2000w_net_find_first_data_byte(imagedata* image) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_find_first_data_byte"); -#endif char* data = image->data; int header_spaces = 3; @@ -41,9 +36,7 @@ int _sane_kds_s2000w_net_find_first_data_byte(imagedata* image) SANE_Status _sane_kds_s2000w_net_init(SANE_Int* version_code, SANE_Auth_Callback authorize) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_init"); -#endif *version_code = SANE_VERSION_CODE(MAJOR, MINOR, PATCH); @@ -52,17 +45,13 @@ SANE_Status _sane_kds_s2000w_net_init(SANE_Int* version_code, SANE_Auth_Callback void _sane_kds_s2000w_net_exit(void) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_exit"); -#endif } SANE_Status _sane_kds_s2000w_net_get_devices(SANE_Device*** device_list, SANE_Bool local_only) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_get_devices"); -#endif if (local_only) return SANE_STATUS_NO_MEM; @@ -83,9 +72,7 @@ SANE_Status _sane_kds_s2000w_net_get_devices(SANE_Device*** device_list, SANE_Status _sane_kds_s2000w_net_open(SANE_String_Const devicename, SANE_Handle* handle) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_open"); -#endif if (strcmp(devicename, "kds_s2000w_net") != 0) return SANE_STATUS_INVAL; @@ -104,9 +91,7 @@ SANE_Status _sane_kds_s2000w_net_open(SANE_String_Const devicename, void _sane_kds_s2000w_net_close(SANE_Handle handle) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_close"); -#endif kds_s2000w_option_descriptor_free_option_descriptors(); kds_s2000w_handler_close(handle); @@ -115,9 +100,7 @@ void _sane_kds_s2000w_net_close(SANE_Handle handle) const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor( SANE_Handle handle, SANE_Int option) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_get_option_descriptor"); -#endif return kds_s2000w_option_get_descriptor(option); } @@ -125,9 +108,7 @@ const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor( SANE_Status _sane_kds_s2000w_net_control_option(SANE_Handle handle, SANE_Int option, SANE_Action action, void* value, SANE_Int* info) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_control_option"); -#endif handler* h = (handler*) handle; if (action == SANE_ACTION_GET_VALUE) @@ -141,9 +122,7 @@ SANE_Status _sane_kds_s2000w_net_control_option(SANE_Handle handle, void _sane_kds_s2000w_net_cancel(SANE_Handle handle) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_cancel"); -#endif handler* h = (handler*) handle; @@ -166,9 +145,7 @@ void _sane_kds_s2000w_net_cancel(SANE_Handle handle) SANE_Status _sane_kds_s2000w_net_get_parameters(SANE_Handle handle, SANE_Parameters* params) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_get_parameters"); -#endif handler* h = (handler*) handle; @@ -178,23 +155,12 @@ SANE_Status _sane_kds_s2000w_net_get_parameters(SANE_Handle handle, h->read_info->readed_bytes_per_line = 0; h->read_info->readed_lines = 0; -#ifndef NODEBUG - debug_printf_int(DEBUG, "format", params->format); - debug_printf_int(DEBUG, "last frame", params->last_frame); - debug_printf_int(DEBUG, "bytes per line", params->bytes_per_line); - debug_printf_int(DEBUG, "pixels per line", params->pixels_per_line); - debug_printf_int(DEBUG, "lines", params->lines); - debug_printf_int(DEBUG, "depth", params->depth); -#endif - return SANE_STATUS_GOOD; } SANE_Status _sane_kds_s2000w_net_start(SANE_Handle handle) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_start"); -#endif handler* h = (handler*) handle; @@ -238,9 +204,7 @@ SANE_Status _sane_kds_s2000w_net_start(SANE_Handle handle) SANE_Status _sane_kds_s2000w_net_read(SANE_Handle handle, SANE_Byte* data, SANE_Int max_length, SANE_Int* length) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_read"); -#endif handler* h = (handler*) handle; @@ -272,18 +236,14 @@ SANE_Status _sane_kds_s2000w_net_read(SANE_Handle handle, SANE_Byte* data, SANE_Status _sane_kds_s2000w_net_set_io_mode(SANE_Handle handle, SANE_Bool non_blocking) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_set_io_mode"); -#endif return SANE_STATUS_UNSUPPORTED; } SANE_Status _sane_kds_s2000w_net_get_select_fd(SANE_Handle handle, SANE_Int* fd) { -#ifndef NODEBUG debug_printf(ALL, "sane_kds_s2000w_net_get_select_fd"); -#endif return SANE_STATUS_UNSUPPORTED; } \ No newline at end of file diff --git a/src/kds_s2000w_option_descriptors.c b/src/kds_s2000w_option_descriptors.c index d0a34f6..0adacb6 100644 --- a/src/kds_s2000w_option_descriptors.c +++ b/src/kds_s2000w_option_descriptors.c @@ -1,10 +1,7 @@ #include #include #include "kds_s2000w_option_descriptors.h" - -#ifndef NODEBUG #include "kds_s2000w_debug.h" -#endif SANE_Option_Descriptor* descriptor_array = NULL; @@ -30,9 +27,7 @@ SANE_String_Const* constraint_scan_source = NULL; SANE_Option_Descriptor _kds_s2000w_option_descriptor_standard_group() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_standard_group"); -#endif SANE_Option_Descriptor descriptor = { SANE_NAME_STANDARD, @@ -50,9 +45,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_standard_group() SANE_Option_Descriptor _kds_s2000w_option_descriptor_geometry_group() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_scan_area_group"); -#endif SANE_Option_Descriptor descriptor = { SANE_NAME_GEOMETRY, @@ -70,9 +63,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_geometry_group() SANE_Option_Descriptor _kds_s2000w_option_descriptor_num_options() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_num_options"); -#endif SANE_Option_Descriptor descriptor = { SANE_NAME_NUM_OPTIONS, @@ -90,9 +81,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_num_options() SANE_Option_Descriptor _kds_s2000w_option_descriptor_dpi() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_dpi"); -#endif SANE_Option_Descriptor descriptor = { SANE_NAME_SCAN_RESOLUTION, @@ -111,9 +100,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_dpi() SANE_Option_Descriptor _kds_s2000w_option_descriptor_scanside() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_scanside"); -#endif constraint_scanside = malloc(sizeof(SANE_String_Const*) * 3); constraint_scanside[0] = "Simplex"; @@ -137,9 +124,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_scanside() SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_mode() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_color_mode"); -#endif constraint_colormode = malloc(sizeof(SANE_String_Const*) * 4); constraint_colormode[0] = "Color"; @@ -164,9 +149,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_mode() SANE_Option_Descriptor _kds_s2000w_option_descriptor_skip_blank_pages() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_skip_blank_pages"); -#endif SANE_Option_Descriptor descriptor = { "skip-blank-pages", @@ -184,9 +167,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_skip_blank_pages() SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_drop() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_color_drop"); -#endif constraint_colordrop = malloc(sizeof(SANE_String_Const*) * 9); constraint_colordrop[0] = "None"; @@ -216,9 +197,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_drop() SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_drop_out_aggressiveness() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_color_drop_out_aggressiveness"); -#endif SANE_Option_Descriptor descriptor = { "colordropoutaggressiveness", @@ -237,9 +216,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_drop_out_aggressivene SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_auto_brightness_mode() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_color_auto_brightness_mode"); -#endif constraint_color_auto_brightnessmode = malloc(sizeof(SANE_String_Const*) * 3); constraint_color_auto_brightnessmode[0] = "None"; @@ -263,9 +240,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_auto_brightness_mode( SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_mode() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_mode"); -#endif constraint_color_balance_mode = malloc(sizeof(SANE_String_Const*) * 5); constraint_color_balance_mode[0] = "None"; @@ -291,9 +266,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_mode() SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balancea_agressiveness() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_color_balancea_agressiveness"); -#endif SANE_Option_Descriptor descriptor = { "colorbalanceaggressiveness", @@ -312,9 +285,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balancea_agressivenes SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_red() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_red"); -#endif SANE_Option_Descriptor descriptor = { "colorbalancered", @@ -333,9 +304,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_red() SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_green() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_green"); -#endif SANE_Option_Descriptor descriptor = { "colorbalancegreen", @@ -354,9 +323,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_green() SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_blue() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_blue"); -#endif SANE_Option_Descriptor descriptor = { "colorbalanceblue", @@ -375,9 +342,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_blue() SANE_Option_Descriptor _kds_s2000w_option_descriptor_foreground_boldness_mode() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_foreground_boldness_mode"); -#endif constraint_foreground_boldness_mode = malloc(sizeof(SANE_String_Const*) * 4); constraint_foreground_boldness_mode[0] = "None"; @@ -402,9 +367,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_foreground_boldness_mode() SANE_Option_Descriptor _kds_s2000w_option_descriptor_foreground_boldness_aggressiveness() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_foreground_boldness_aggressiveness"); -#endif SANE_Option_Descriptor descriptor = { "foreground-boldness-aggressiveness", @@ -423,9 +386,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_foreground_boldness_aggress SANE_Option_Descriptor _kds_s2000w_option_descriptor_background_smoothing_mode() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_background_smoothing_mode"); -#endif constraint_background_smoothing_mode = malloc(sizeof(SANE_String_Const*) * 4); constraint_background_smoothing_mode[0] = "None"; @@ -450,9 +411,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_background_smoothing_mode() SANE_Option_Descriptor _kds_s2000w_option_descriptor_background_smoothing_aggressiveness() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_background_smoothing_aggressiveness"); -#endif SANE_Option_Descriptor descriptor = { "background-smoothing-aggressiveness", @@ -471,9 +430,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_background_smoothing_aggres SANE_Option_Descriptor _kds_s2000w_option_descriptor_binarization_contrast() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_binarization_contrast"); -#endif SANE_Option_Descriptor descriptor = { SANE_NAME_CONTRAST, @@ -492,9 +449,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_binarization_contrast() SANE_Option_Descriptor _kds_s2000w_option_descriptor_scan_source() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_scan_source"); -#endif constraint_scan_source = malloc(sizeof(SANE_String_Const*) * 4); constraint_scan_source[0] = "DocumentFeeder"; @@ -518,9 +473,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_scan_source() SANE_Option_Descriptor _kds_s2000w_option_descriptor_config_reset() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_config_reset"); -#endif SANE_Option_Descriptor descriptor = { "config-reset", @@ -538,9 +491,7 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_config_reset() void kds_s2000w_option_descriptor_init_option_descriptors() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_init_option_descriptors"); -#endif descriptor_array = malloc(sizeof(SANE_Option_Descriptor) * MAX_OPTION_COUNT); descriptor_array[0] = _kds_s2000w_option_descriptor_num_options(); @@ -569,9 +520,7 @@ void kds_s2000w_option_descriptor_init_option_descriptors() void kds_s2000w_option_descriptor_free_option_descriptors() { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_descriptor_free_option_descriptors"); -#endif free(constraint_scanside); constraint_scanside = NULL; @@ -599,9 +548,7 @@ void kds_s2000w_option_descriptor_free_option_descriptors() SANE_Option_Descriptor* kds_s2000w_option_get_descriptor(int option) { -#ifndef NODEBUG debug_printf(ALL, "kds_s2000w_option_get_descriptor"); -#endif if (option >= MAX_OPTION_COUNT) return NULL;