#include "kds_s2000w_option_descriptors.h"
#include "kds_s2000w_debug.h"
-SANE_Option_Descriptor descriptor_array[MAX_OPTION_COUNT];
+SANE_Option_Descriptor* descriptor_array = NULL;
SANE_Word constraint_dpi[] = {2, 200, 300};
SANE_Range constraint_binarization_contrast = {-50, 50, 1};
{
debug_printf(ALL, "kds_s2000w_option_descriptor_init_option_descriptors");
+ descriptor_array = malloc(sizeof(SANE_Option_Descriptor) * MAX_OPTION_COUNT);
descriptor_array[0] = _kds_s2000w_option_descriptor_num_options();
descriptor_array[1] = _kds_s2000w_option_descriptor_standard_group();
descriptor_array[2] = _kds_s2000w_option_descriptor_scan_source();
constraint_max_document_length = NULL;
free(constraint_scan_source);
constraint_scan_source = NULL;
+ free(descriptor_array);
+ descriptor_array = NULL;
}
SANE_Option_Descriptor* kds_s2000w_option_get_descriptor(int option)
_sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &value, NULL);
- assert_int_equal(value, 23);
+ assert_int_equal(value, 22);
free_handler(h);
h = NULL;