kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_num_options");
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL)
+ return NULL;
descriptor->name = SANE_NAME_NUM_OPTIONS;
descriptor->title = SANE_TITLE_NUM_OPTIONS;
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_standard_group");
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL)
+ return NULL;
descriptor->name = SANE_NAME_STANDARD;
descriptor->title = SANE_TITLE_STANDARD;
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_scan_source");
char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "DocumentFeeder";
constraint[1] = "Automatic";
constraint[2] = "Flatbed";
constraint[3] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = SANE_NAME_SCAN_SOURCE;
descriptor->title = SANE_TITLE_SCAN_SOURCE;
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_mode");
char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "Color";
constraint[1] = "Gray";
constraint[2] = "BW";
constraint[3] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = SANE_NAME_SCAN_MODE;
descriptor->title = SANE_TITLE_SCAN_MODE;
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_dpi");
SANE_Word* constraint = malloc(sizeof(SANE_Word) * 6);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = 5;
constraint[1] = 100;
constraint[2] = 150;
constraint[5] = 600;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = SANE_NAME_SCAN_RESOLUTION;
descriptor->title = SANE_TITLE_SCAN_RESOLUTION;
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_scanside");
char** constraint = malloc(sizeof(SANE_String_Const*) * 3);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "Simplex";
constraint[1] = "Duplex";
constraint[2] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "scanside";
descriptor->title = "Duplex Mode";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_scan_area_group");
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL)
+ return NULL;
descriptor->name = SANE_NAME_GEOMETRY;
descriptor->title = SANE_TITLE_GEOMETRY;
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_cropping_mode");
char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "AutomaticStraighten";
constraint[1] = "Automatic";
constraint[2] = "Photograph";
constraint[4] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "cropping-mode";
descriptor->title = "Cropping Mode";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_cropping_image");
char** constraint = malloc(sizeof(SANE_String_Const*) * 3);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "EntireDocument";
constraint[1] = "PartialDocument";
constraint[2] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "cropping-image";
descriptor->title = "Cropping Image";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_offset_x");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = 0;
constraint->max = 2250;
constraint->quant = 30;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = SANE_NAME_SCAN_TL_X;
descriptor->title = SANE_TITLE_SCAN_TL_X;
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_offset_y");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = 0;
constraint->max = 3900;
constraint->quant = 30;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = SANE_NAME_SCAN_TL_Y;
descriptor->title = SANE_TITLE_SCAN_TL_Y;
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_width");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = 300;
constraint->max = 2550;
constraint->quant = 30;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = SANE_NAME_SCAN_BR_X;
descriptor->title = SANE_TITLE_SCAN_BR_X;
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_height");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = 300;
constraint->max = 4200;
constraint->quant = 30;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = SANE_NAME_SCAN_BR_Y;
descriptor->title = SANE_TITLE_SCAN_BR_Y;
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_advanced_group");
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL)
+ return NULL;
descriptor->name = "boldness-smoothing";
descriptor->title = "Boldness / Smoothing Options";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_foreground_boldness_mode");
char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "None";
constraint[1] = "AutomaticAdvanced";
constraint[2] = "Automatic";
constraint[3] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "foreground-boldness-mode";
descriptor->title = "Foreground Boldness Mode";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_foreground_boldness_aggressiveness");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = -10;
constraint->max = 10;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "foreground-boldness-aggressiveness";
descriptor->title = "Foreground Boldness Aggressiveness";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_background_smoothing_mode");
char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "None";
constraint[1] = "AutomaticAdvanced";
constraint[2] = "Automatic";
constraint[3] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "background-smoothing-mode";
descriptor->title = "Background Smoothing Mode";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_background_smoothing_aggressiveness");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = -10;
constraint->max = 10;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "background-smoothing-aggressiveness";
descriptor->title = "Background Smoothing Aggressiveness";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_boldness_color_group");
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL)
+ return NULL;
descriptor->name = "color-options";
descriptor->title = "Color Options";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_drop");
char** constraint = malloc(sizeof(SANE_String_Const*) * 9);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "None";
constraint[1] = "Red";
constraint[2] = "Green";
constraint[8] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "color-drop-out";
descriptor->title = "Color Drop Out";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_drop_out_aggressiveness");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = -10;
constraint->max = 10;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "color-drop-out-aggressiveness";
descriptor->title = "Color Drop Out Aggressiveness";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_auto_brightness_mode");
char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "None";
constraint[1] = "Manual";
constraint[2] = "Automatic";
constraint[3] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "color-auto-brightness-mode";
descriptor->title = "Color Auto Brightness Mode";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_brightness");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = -50;
constraint->max = 50;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "color-brightness";
descriptor->title = "Color Brightness";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_contrast");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = -50;
constraint->max = 50;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "color-contrast";
descriptor->title = "Color Contrast";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_mode");
char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "None";
constraint[1] = "Manual";
constraint[2] = "Automatic";
constraint[4] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "color-balance-mode";
descriptor->title = "Color Balance Mode";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balancea_agressiveness");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = -2;
constraint->max = 2;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "color-balance-aggressiveness";
descriptor->title = "Color Balance Aggressiveness";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_red");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = -50;
constraint->max = 50;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "color-balance-red";
descriptor->title = "Color Balance Red";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_green");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = -50;
constraint->max = 50;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "color-balance-green";
descriptor->title = "Color Balance Green";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_blue");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = -50;
constraint->max = 50;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "color-balance-blue";
descriptor->title = "Color Balance Blue";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_sharpen");
char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "None";
constraint[1] = "Normal";
constraint[2] = "High";
constraint[4] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "color-sharpen";
descriptor->title = "Color Sharpen";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_binarization_contrast");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = -50;
constraint->max = 50;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "binarization-contrast";
descriptor->title = "Binarization Contrast";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_config_reset");
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL)
+ return NULL;
descriptor->name = "config-reset";
descriptor->title = "Reset Config";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_processing_group");
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL)
+ return NULL;
descriptor->name = "image-processing-options";
descriptor->title = "Image Processing Options";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_skip_blank_pages");
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL)
+ return NULL;
descriptor->name = "skip-blank-pages";
descriptor->title = "Blank Blank Pages";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_skip_blank_page_content");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = 0;
constraint->max = 100;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "skip-blank-page-content";
descriptor->title = "Skip Blank Page Content";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_hole_fill");
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL)
+ return NULL;
descriptor->name = "hole-fill";
descriptor->title = "Hole Fill";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_post_scan_rotation");
char** constraint = malloc(sizeof(SANE_String_Const*) * 6);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "None";
constraint[1] = "Automatic";
constraint[2] = "Automatic90";
constraint[5] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "post-scan-rotation";
descriptor->title = "Post Scan Rotation";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_edge_fill");
char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "None";
constraint[1] = "Automatic";
constraint[2] = "AutomaticIncludeTears";
constraint[3] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "edge-fill";
descriptor->title = "Edge Fill";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_border");
char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "None";
constraint[1] = "Add";
constraint[2] = "Remove";
constraint[3] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ }
descriptor->name = "image-border";
descriptor->title = "Image Border";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_jpeg_quality");
char** constraint = malloc(sizeof(SANE_String_Const*) * 6);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "Draft";
constraint[1] = "Good";
constraint[2] = "Better";
constraint[5] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ };
descriptor->name = "jpeg-quality";
descriptor->title = "Jpeg Quality";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_feeder_group");
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL)
+ return NULL;
descriptor->name = "feeder-options";
descriptor->title = "Feeder Options";
kds_s2000w_debug_printf(ALL, "_kds_s2000w_option_descriptor_autostart");
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL)
+ return NULL;
descriptor->name = "autostart";
descriptor->title = "Autostart";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_max_document_length");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = 25;
constraint->max = 400;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ };
descriptor->name = "max-document-length";
descriptor->title = "Max Document Length";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_transport_handling");
char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "Normal";
constraint[1] = "ImprovedStacking";
constraint[2] = "BestStacking";
constraint[4] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ };
descriptor->name = "transport-handling";
descriptor->title = "Transport Handling";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_multifeed_sensitivity");
char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "None";
constraint[1] = "Low";
constraint[2] = "Medium";
constraint[4] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ };
descriptor->name = "multifeed-sensitivity";
descriptor->title = "Multifeed Sensitivity";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_multifeed_response");
char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "Stop";
constraint[1] = "StopAndGenerateImage";
constraint[2] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ };
descriptor->name = "multifeed-response";
descriptor->title = "Multifeed Response";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_document_feeder_timeout");
SANE_Range* constraint = malloc(sizeof(SANE_Range));
+ if (constraint == NULL)
+ return NULL;
+
constraint->min = 0;
constraint->max = 120;
constraint->quant = 1;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ };
descriptor->name = "document-feeder-timeout";
descriptor->title = "Document Feeder Timeout";
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_document_feeder_timeout_response");
char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+ if (constraint == NULL)
+ return NULL;
+
constraint[0] = "Stop";
constraint[1] = "Pause";
constraint[2] = "PauseAndWait";
constraint[3] = NULL;
SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+ if (descriptor == NULL) {
+ free(constraint);
+ constraint = NULL;
+ return NULL;
+ };
descriptor->name = "document-feeder-timeout-response";
descriptor->title = "Document Feeder Timeout Response";