#include <string.h>
#include <sane/sane.h>
-SANE_Option_Descriptor* optionDescripor = NULL;
-
SANE_Status _sane_kds_s2000w_net_init(SANE_Int* version_code, SANE_Auth_Callback authorize)
{
*version_code = SANE_VERSION_CODE(1, 0, 0);
void _sane_kds_s2000w_net_exit(void)
{
- free(optionDescripor);
- optionDescripor = NULL;
printf("kds_s2000w_net exit\n");
}
return SANE_STATUS_NO_MEM;
}
- SANE_Device device;
- device.name = "kds_s2000w_net";
- device.vendor = "Kodak";
- device.model = "Kodak Alaris s2000w series";
- device.type = "document scanner";
+ SANE_Device* device = malloc(sizeof(SANE_Device));
+ device->name = "kds_s2000w_net";
+ device->vendor = "Kodak";
+ device->model = "Kodak Alaris s2000w series";
+ device->type = "document scanner";
- **device_list = &device;
+ **device_list = device;
return SANE_STATUS_GOOD;
}
const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor(
SANE_Handle handle, SANE_Int option)
{
- printf("kds_s2000w_net get option descriptor\n");
-
- optionDescripor = malloc(sizeof(SANE_Option_Descriptor));
+ SANE_Option_Descriptor* optionDescripor = malloc(sizeof(SANE_Option_Descriptor));
optionDescripor->name = "test";
optionDescripor->title = "test get option descriptor";
optionDescripor->desc = "function get option descriptor test";