Backends use a mixture of SANE_CURRENT_{MAJOR | MINOR} and V_{MAJOR |
MINOR} with all kind of permutations. I was confused by this and one
comment in pieusb.c tells me I was not alone. Some items in old
changelogs suggest to use the SANE_CURRENT_ macros in backends, so let's
switch to do that with the exception of net.c and dll.c. Done with:
$ find backend -name '*.[ch]' | xargs sed -i '/nearly every/ ! { s/\<V_M/SANE_CURRENT_M/g }'
$ git checkout backend/net.c backend/dll.c
And manually removing the comment from pieusb.c. Everything still builds
fine.
With the exception of use in three quotes as well as our inlcuded copy
of the GPL, all use of the Free Software Foundation's postal address
has been removed.
Re #320.
* Add command line parameters for readling LCD counter and LED indicator.
* Code refactoring: Use static parameter strings instead of dynamically
allocated string in order to avoid memory leak.
Some parts of SANE used __FUNCTION__ while other parts used __func__.
Now, __func__ is used consistently throughout the SANE sources. This
fixes all occurrences of the following GCC warning:
warning: ISO C does not support '__FUNCTION__' predefined identifier
While reading through the SANE sources I noticed some annoying typos
in the comments. This patch is my contribution to make the SANE
sources slightly more pleasant to read.
Little Endian (working)
=======================
[hp5590] hp5590_init_scanner
[hp5590] hp5590_cmd: USB-in-USB: command : 0012
[hp5590] hp5590_control_msg: USB-in-USB: core data: no
[hp5590] hp5590_control_msg: USB-in-USB: sending control msg
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 143, index = 0, len = 8
[sanei_usb] 0000: C0 04 00 12 00 00 32 00
Big Endian (not working)
========================
[hp5590] hp5590_init_scanner
[hp5590] hp5590_cmd: USB-in-USB: command : 0012
[hp5590] hp5590_control_msg: USB-in-USB: core data: no
[hp5590] hp5590_control_msg: USB-in-USB: sending control msg
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 143, index = 0, len = 8
[sanei_usb] 000 C0 04 00 12 00 00 00 32
USB field wLength should always be treated little-endian, last command value during
verification is received as little-endian as well.
Thanks to Nhan Ngo Dinh for identifying the issue and providing the patch.
Signed-off-by: Ilia Sotnikov <hostcc@gmail.com
these devices need no reading USB-in-USB acknowledgement after each command.
To achieve that, proto_flags are passed down to low-level functions. These
flags are taken from device descriptions
hp5590: fixed up get_status command - index should be 0x00, not 0x20
hp5590: bump up the backend version
Source code was inconsistent on how they were referencing
include files in include/sane. In certain cases, sane/sane.h
and sane/saneopts.h was really including external copies (with
some preprocessor implementations anyways).
- Updated the list of supported devices (HP 5500C which is similar to
4570C, 5500C which is similar to 4500C) - only strings/comments, no
code was changed
- Updated backend version
- Updated man page
without calling sane_open() first, just skip ptr->opts free()'ing in that case.
Thanks to David Campbell for spotting this.
* Protect sane_control_option() from possible SIGSEGV when it would be called
with uninitialized scanner options (scanner->opts == NULL).