[sane-devel] API addition request

m. allan noah kitno455 at gmail.com
Fri Aug 20 00:39:51 UTC 2010


Extending the caps SHOULD work perfectly with any reasonable
front-end. As long as the developer checks for each cap he cares
about, adding a new cap is not a problem.

However, it is technically possible that a stupid programmer could do
something like an if() test, after masking off all the bits he does
NOT care about, or doing a switch/case with all the possible
combinations listed, instead of testing the bitmask.

While I am of the opinion that he deserves to feel some pain for that
kind of horrible code, the end user of his code does not deserve
breakage.

I really, really want to commit your patch (after changing to the US
spelling :) but I cannot, as the possibility of breakage is enough.

We need SANE2 so badly it hurts, but it seems we have less cycles than
ever to do it...

allan

On Thu, Aug 19, 2010 at 3:49 PM, Kai-Uwe Behrmann <ku.b at gmx.de> wrote:
> Hello,
>
> Am 19.08.10, 18:22 +0200 schrieb Julien BLACHE:
>>
>> Kai-Uwe Behrmann <ku.b at gmx.de> wrote:
>> SANE 1 has always been frozen, and an attempt at thawing it a bit to
>> extend the API/ABI in a backward-compatible way has failed
>> spectacularly.
>
> Now, I see my subject line was misleading.
>
> The SANE_CAP_COLOUR is merely a flag. So I would suggest a API/ABI checker
> can not detect that. All the patch needs in the headers is:
>
> +++ include/sane/sane.h
>  #define SANE_CAP_ADVANCED              (1 << 6)
> +#define SANE_CAP_COLOUR                (1 << 7)
>
>
> The remainder is in the backends.
>
>> So unless we want to restart that effort, I don't see how your patch can
>> get merged in SANE 1.
>
> I shurely would not want that.
>
>> Not that I don't want it, note.
>
> Thanks for considering.
>
> kind regards
> Kai-Uwe Behrmann
> --
> developing for colour management www.behrmann.name + www.oyranos.org
>
>
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>            to sane-devel-request at lists.alioth.debian.org
>



-- 
"The truth is an offense, but not a sin"



More information about the sane-devel mailing list