Because different frontends have different requirements. Some try to
save memory, some try to maximize speed by using large buffers, some
try to fill a network packet exactly. You can (and should expect) to
get any value of maxlen from 1 byte to perhaps a 1M, maybe more.

allan

On Tue, Mar 8, 2016 at 8:23 PM, ky gcp <[email protected]> wrote:
> why does the value of maxlen vary from various frontends?
>
> On Tue, Mar 8, 2016 at 9:06 PM, m. allan noah <[email protected]> wrote:
>>
>> maxlen is provided by the caller of the function, to tell the backend
>> how much memory the caller has allocated for image data.
>>
>> allan
>>
>> On Tue, Mar 8, 2016 at 3:09 AM, ky gcp <[email protected]> wrote:
>> > hi,
>> >
>> > how is the argument maxlen determined in sane_read() function?
>> >
>> > SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen,
>> > SANE_Int * len);
>> >
>> > Thanks for your help.
>> >
>> > --
>> > sane-devel mailing list: [email protected]
>> > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>> > Unsubscribe: Send mail with subject "unsubscribe your_password"
>> >              to [email protected]
>>
>>
>>
>> --
>> "well, I stand up next to a mountain- and I chop it down with the edge
>> of my hand"
>
>



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

-- 
sane-devel mailing list: [email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [email protected]

Reply via email to