These were intended to suppress GCC warnings about unused variables.
However, this leads to different warnings from Clang instead.
Use another approach that suppresses warnings from both compilers.
This commit fixes a regression introduced in 1.0.25 for ADF scanners:
the scanning page-width was always set to a fixed value,
ignoring the page-width provided by the frontend.
This commit restores the behaviour that allows changing the page-width.
Signed-off-by: Peter Marschall <peter@adpm.de>
In the option descriptor definitions of tl_x, tl_y, br_x & br_y
make sure the the maximal value of the range is not smaller than
the minimal value.
Signed-off-by: Peter Marschall <peter@adpm.de>
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.
ScanScanp has a resolution 225x200 in each model.
The function which treat it should use a mathematic theory.
Euclidean algorithm should be used to get GCD (Greatest Common Devisor)
for this calcuration.
This patch make a separate function that should be get_GCD and
simplize a logic in copy image function.
TBD: this don't have Euclidean algorithm. Just prepare for it.
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
The driver can cut top of image for padding.
We can also cut an ordered size at a top of image.
It make tl_y parameter works.
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
The driver need a padding at top of page.
Because scansnap don't treat empty image
at the top of image that is generated when
loading paper, the driver cut top of page
in 1/2 inch.
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
ScanSnap itself don't have a feature to
detect and scan area in demanded width.
Otherwise driver need to cut into proper width.
this introduce page_width parameter and facility
to cut image into page width.
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
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).