[sane-devel] option size = 0 allowed ?

Oliver Rauch oliver.rauch at rauch-domain.de
Wed Dec 18 15:46:44 GMT 2002


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

> > Furthermore, the umax backend changes the option size later. IMHO, that
> > 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 (=pointer) 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: 
The setting of an option may affect the value or availability of one or more
{other} options. When this happens, the SANE backend sets this member in
*i to indicate that the application should reload all options. This member may
be set if and only if at least one option changed. 

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


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



More information about the sane-devel mailing list