kopia lustrzana https://gitlab.com/sane-project/backends
Free devlist on exit. Undef MIN and MAX macros before defining them.
Henning Meier-Geinitz <henning@meier-geinitz.de>DEVEL_2_0_BRANCH-1
rodzic
5bdf4a4a54
commit
2c9106cf96
|
@ -46,7 +46,7 @@
|
||||||
This file implements a SANE backend for Mustek 1200UB and similar
|
This file implements a SANE backend for Mustek 1200UB and similar
|
||||||
USB flatbed scanners. */
|
USB flatbed scanners. */
|
||||||
|
|
||||||
#define BUILD 13
|
#define BUILD 14
|
||||||
|
|
||||||
#include "../include/sane/config.h"
|
#include "../include/sane/config.h"
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@
|
||||||
static SANE_Int num_devices;
|
static SANE_Int num_devices;
|
||||||
static Mustek_Usb_Device *first_dev;
|
static Mustek_Usb_Device *first_dev;
|
||||||
static Mustek_Usb_Scanner *first_handle;
|
static Mustek_Usb_Scanner *first_handle;
|
||||||
|
static const SANE_Device **devlist = 0;
|
||||||
|
|
||||||
/* Maximum amount of data read in one turn from USB */
|
/* Maximum amount of data read in one turn from USB */
|
||||||
static SANE_Word max_block_size = 8 * 1024;
|
static SANE_Word max_block_size = 8 * 1024;
|
||||||
|
@ -938,13 +939,16 @@ sane_exit (void)
|
||||||
free (dev);
|
free (dev);
|
||||||
}
|
}
|
||||||
first_dev = 0;
|
first_dev = 0;
|
||||||
|
if (devlist)
|
||||||
|
free (devlist);
|
||||||
|
devlist = 0;
|
||||||
|
|
||||||
DBG (5, "sane_exit: exit\n");
|
DBG (5, "sane_exit: exit\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
SANE_Status
|
SANE_Status
|
||||||
sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
|
sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
|
||||||
{
|
{
|
||||||
static const SANE_Device **devlist = 0;
|
|
||||||
Mustek_Usb_Device *dev;
|
Mustek_Usb_Device *dev;
|
||||||
SANE_Int dev_num;
|
SANE_Int dev_num;
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,12 @@
|
||||||
|
|
||||||
|
|
||||||
/* calculate the minimum/maximum values */
|
/* calculate the minimum/maximum values */
|
||||||
|
#if defined(MIN)
|
||||||
|
#undef MIN
|
||||||
|
#endif
|
||||||
|
#if defined(MAX)
|
||||||
|
#undef MAX
|
||||||
|
#endif
|
||||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||||
/* return the lower/upper 8 bits of a 16 bit word */
|
/* return the lower/upper 8 bits of a 16 bit word */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
:backend "mustek_usb"
|
:backend "mustek_usb"
|
||||||
:status :beta
|
:status :beta
|
||||||
:version "1.0-113"
|
:version "1.0-114"
|
||||||
:manpage "sane-mustek_usb"
|
:manpage "sane-mustek_usb"
|
||||||
:url "http://www.meier-geinitz.de/sane/"
|
:url "http://www.meier-geinitz.de/sane/"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
CHANGES for the SANE Mustek USB backend
|
CHANGES for the SANE Mustek USB backend
|
||||||
|
|
||||||
|
2002-04-24:
|
||||||
|
* Release of version 1.0-14.
|
||||||
|
|
||||||
|
2002-04-24:
|
||||||
|
* Undef MIN and MAX if they are defined in mustek_usb_low.h to avoid
|
||||||
|
warnings.
|
||||||
|
|
||||||
|
2002-04-23:
|
||||||
|
* Free devlist in sane_exit.
|
||||||
|
|
||||||
2002-04-10:
|
2002-04-10:
|
||||||
* Release of version 1.0-13.
|
* Release of version 1.0-13.
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue