[sane-devel] option size = 0 allowed ?

Oliver Rauch oliver.rauch@rauch-domain.de
Wed, 18 Dec 2002 16:46:44 +0100


On Wednesday 18 December 2002 11:55, Henning Meier-Geinitz wrote:
> Hi,

> > Furthermore, the umax backend changes the option size later. IMHO, th=
at
> > at least isn't allowed, because only the availablity or value of an
> > option may change.
>
> It's not allowed. But at least the mustek backend does it also.

Please can you point me to the paragraph where you think it is
mentioned that it is not allowed to change constraints and option sizes?

"The returned option descriptor is guaranteed to
remain valid (and at the returned address) until the device is closed."

As long as the option descriptor (=3Dpointer) keeps valid (points
to a memory block of the size of the structur and contains correct data)
 I do not see a reason why it should not be allowed to change anything
 in the option.

SANE_INFO_RELOAD_OPTIONS:=20
The setting of an option may affect the value or availability of one or m=
ore
{other} options. When this happens, the SANE backend sets this member in
*i to indicate that the application should reload all options. This membe=
r may
be set if and only if at least one option changed.=20

Here it is said that the value or availability of on option may have chan=
ged.
I understand this as an example. It is not said (or I do not find it anyw=
here)=20
that it is not allowed to change the size of an option or the contents of=
 a=20
constraint.


--=20
http://www.xsane.org
http://www.mostang.com/sane
http://www.rauch-domain.de
mailto:Oliver.Rauch@Rauch-Domain.DE