From 58912f68c2489bcee787599837447e0d64dfd61a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 24 May 2017 21:03:56 +0200 Subject: New upstream version 1.0.27 --- backend/sm3600.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'backend/sm3600.c') diff --git a/backend/sm3600.c b/backend/sm3600.c index dd1f31f..908e8be 100644 --- a/backend/sm3600.c +++ b/backend/sm3600.c @@ -73,7 +73,7 @@ Start: 2.4.2001 #include "../include/sane/saneopts.h" #include "../include/sane/sanei_usb.h" -#undef HAVE_LIBUSB +#undef HAVE_LIBUSB_LEGACY /* prevent inclusion of scantool.h */ #define SCANTOOL_H @@ -431,13 +431,11 @@ sane_exit (void) SANE_Status sane_get_devices (const SANE_Device *** device_list, - SANE_Bool local_only) + SANE_Bool __sane_unused__ local_only) { TDevice *dev; int i; - local_only = TRUE; /* Avoid compile warning */ - if (devlist) free (devlist); devlist = malloc ((num_devices + 1) * sizeof (devlist[0])); @@ -458,7 +456,6 @@ sane_open (SANE_String_Const devicename, SANE_Handle *handle) { TDevice *pdev; TInstance *this; - SANE_Status rc; DBG(DEBUG_VERBOSE,"opening %s\n",devicename); if (devicename[0]) /* selected */ { @@ -488,8 +485,6 @@ DBG(DEBUG_VERBOSE,"%s<>%s\n",devicename, pdev->sane.name); if (sanei_usb_open (devicename, &this->hScanner) != SANE_STATUS_GOOD) return SetError (this, SANE_STATUS_IO_ERROR, "cannot open scanner device"); - rc = SANE_STATUS_GOOD; - this->quality=fast; return InitOptions(this); } -- cgit v1.2.3 From 1687222e1b9e74c89cafbb5910e72d8ec7bfd40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 31 Jul 2019 16:59:49 +0200 Subject: New upstream version 1.0.28 --- backend/sm3600.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'backend/sm3600.c') diff --git a/backend/sm3600.c b/backend/sm3600.c index 908e8be..6e411c3 100644 --- a/backend/sm3600.c +++ b/backend/sm3600.c @@ -180,7 +180,7 @@ InitOptions(TInstance *this) Some hints: *every* field needs a constraint, elseway there will be a warning. */ - + switch (iOpt) { case optCount: @@ -353,8 +353,8 @@ RegisterSaneDev (TModel model, SANE_String_Const szName) return SANE_STATUS_GOOD; } - -static SANE_Status + +static SANE_Status sm_usb_attach (SANE_String_Const dev_name) { int fd; @@ -398,9 +398,9 @@ sane_init (SANE_Int *version_code, SANE_Auth_Callback authCB) } pdevFirst=NULL; - + sanei_usb_init(); - for (i = 0; aScanners[i].idProduct; i++) + for (i = 0; aScanners[i].idProduct; i++) { sanei_usb_find_devices(SCANNER_VENDOR, aScanners[i].idProduct, sm_usb_attach); } @@ -417,7 +417,7 @@ sane_exit (void) /* free all bound resources and instances */ while (pinstFirst) sane_close((SANE_Handle)pinstFirst); /* free all resources */ - + /* free all device descriptors */ for (dev = pdevFirst; dev; dev = pNext) { @@ -511,7 +511,7 @@ sane_close (SANE_Handle handle) if (p==this) break; pParent=p; } - + if (!p) { DBG(1,"invalid handle in close()\n"); @@ -545,7 +545,7 @@ sane_get_option_descriptor (SANE_Handle handle, SANE_Int iOpt) SANE_Status sane_control_option (SANE_Handle handle, SANE_Int iOpt, - SANE_Action action, void *pVal, + SANE_Action action, void *pVal, SANE_Int *pnInfo) { SANE_Word cap; @@ -562,7 +562,7 @@ sane_control_option (SANE_Handle handle, SANE_Int iOpt, return SANE_STATUS_INVAL; cap=this->aoptDesc[iOpt].cap; - + switch (action) { @@ -699,7 +699,7 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters *p) p->depth=1; p->bytes_per_line=(p->pixels_per_line+7)/8; break; - } + } DBG(DEBUG_INFO,"getting parameters (%d,%d)...\n",p->bytes_per_line,p->lines); return SANE_STATUS_GOOD; } -- cgit v1.2.3 From ffa8801644a7d53cc1c785e3450f794c07a14eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 2 Feb 2020 17:13:01 +0100 Subject: New upstream version 1.0.29 --- backend/sm3600.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'backend/sm3600.c') diff --git a/backend/sm3600.c b/backend/sm3600.c index 6e411c3..8f8adfc 100644 --- a/backend/sm3600.c +++ b/backend/sm3600.c @@ -609,14 +609,14 @@ sane_control_option (SANE_Handle handle, SANE_Int iOpt, { case optResolution: case optTLX: case optTLY: case optBRX: case optBRY: - if (pnInfo) (*pnInfo) |= SANE_INFO_RELOAD_PARAMS; - /* fall through side effect free */ + if (pnInfo) (*pnInfo) |= SANE_INFO_RELOAD_PARAMS; + // fall through + case optPreview: + case optGrayPreview: #ifdef SM3600_SUPPORT_EXPOSURE case optBrightness: case optContrast: #endif - case optPreview: - case optGrayPreview: this->aoptVal[iOpt].w = *(SANE_Word*)pVal; break; case optMode: -- cgit v1.2.3