[sane-devel] SANE_CAP_ALWAYS_SETTABLE (was Re: Preparing for a sane-backends release)

m. allan noah kitno455 at gmail.com
Tue Aug 4 23:31:48 UTC 2015


I removed SANE_CAP_ALWAYS_SETTABLE because it was not in the sane
standard, and the only backend that used it set it on every option. As
it's intended purpose was not defined by standard, I hoped that it
would disappear. If the distros are going to shove it back in, I guess
that will never happen.

allan

On Tue, Aug 4, 2015 at 7:21 PM, Olaf Meeuwissen
<olaf.meeuwissen at avasys.jp> wrote:
>
> Johannes Meixner writes:
>
>> Everey Linux distribution should submit their patches to SANE
>> upstream (provided their changes make sense for upstream).
>>
>> Here our (i.e. openSUSE) patches that we still have:
>> [...]
>> 2)
>> My re-add-SANE_CAP_ALWAYS_SETTABLE.patch re-adds SANE_CAP_ALWAYS_SETTABLE
>> to sane.h which was erroneously removed in sane-backends-1.0.20 so that
>> sane-frontends and xsane can no longer build, see
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=527675
>
> Hmm, SANE_CAP_ALWAYS_SETTABLE is not part of the SANE Standard.  Not in
> version 1 at least (and so far there hasn't been any other version).
>
>> re-add-SANE_CAP_ALWAYS_SETTABLE.patch
>> -----------------------------------------------------------------------------
>> --- include/sane/sane.h.orig    2009-06-12 10:19:19.000000000 +0200
>> +++ include/sane/sane.h 2009-06-12 10:20:12.000000000 +0200
>> @@ -115,6 +115,7 @@ SANE_Device;
>>   #define SANE_CAP_AUTOMATIC             (1 << 4)
>>   #define SANE_CAP_INACTIVE              (1 << 5)
>>   #define SANE_CAP_ADVANCED              (1 << 6)
>> +#define SANE_CAP_ALWAYS_SETTABLE       (1 << 7)
>
> The version 2 *draft* adds it with a value of 256, i.e. (1 << 8), and
> uses 128 (1 << 7) for SANE_CAP_HIDDEN.
>
>>   #define SANE_OPTION_IS_ACTIVE(cap)     (((cap) & SANE_CAP_INACTIVE) == 0)
>>   #define SANE_OPTION_IS_SETTABLE(cap)   (((cap) & SANE_CAP_SOFT_SELECT) != 0)
>> -----------------------------------------------------------------------------
>>
>> The re-add-SANE_CAP_ALWAYS_SETTABLE.patch still applies for
>> current sane-backends-git20150804.tar.gz so that I assume
>> SANE_CAP_ALWAYS_SETTABLE is still missing in sane-backends.
>>
>> I did not verify whether or not meanwhile all SANE frontends
>> also no longer use SANE_CAP_ALWAYS_SETTABLE so that it could
>> meanwhile be really removed in sane-backends.
>
> The sane-frontends have it in an #ifdef conditional (in src/gtkglue.c)
> that was added in 5e96223, apparently to switch to SANE 1.1 which never
> materialized.
>
> Hope this helps,
> --
> Olaf Meeuwissen, LPIC-2     FLOSS Engineer -- EPSON AVASYS CORPORATION
> FSF Associate Member #1962               Help support software freedom
>                  http://www.fsf.org/jf?referrer=1962
>
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>              to sane-devel-request at lists.alioth.debian.org



-- 
"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"



More information about the sane-devel mailing list