[sane-devel] sane.h and commented out definitions for next version SANE

m. allan noah kitno455 at gmail.com
Tue May 11 01:37:29 UTC 2010


On Sun, May 9, 2010 at 4:59 PM, Ilmārs Poikāns <ilmars at delibero.lv> wrote:
> Hi,
>
>> At this point, I dont think we want to enshrine anything as being part
>> of SANE2.
>
> I didn't ment exactly SANE2, just next version, if there will be any.
>
> Both #ifdef 0 in sane.h comments out code because "following are for
> later sane version, older frontends wont support" and "these are to be
> exposed in a later version of SANE". I didn't get it, why enabling
> this code with one define flag (SANE_<something>) doesn't make your
> code look nicer?  Wouldn't that make updating backends and frontends
> for new version changes easier - make with and without flag, test it,
> ship it? Anyway I'm new here, so I don't see things you see :)

we have not concluded that these are the right ways to implement the features.

>> The proper fix is to either remove that code, or stop
>> shipping sane-frontends altogether.
>
> Please, find patch in attachment, that adds ifdefs in sane-frontends,
> so undefined SANE_STATUS_WARMING_UP (currently commented out in
> sane.h) doesn't break compilation of frontends.

This seems proper, I will commit it.

> Only thing that is
> left - configure needs to be updated too, so it doesn't require
> sane-backends version >= 1.1.0.

OK, i can do that. But, in the end, I think that sane-frontends will
end up deprecated. It would be more helpful to figure out if any
changes are required to use scanimage as a replacement for scanadf.

> With this patch sane-frontends
> compiles with current sane-backends. I was able to scan with scanadf
> and xsane as usual. I guess backends doesn't return STATUS WARMING_UP
> or  blocks on sane_init, if it isn't defined?

If it is not defined, no backend can/should return it.

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



More information about the sane-devel mailing list