[sane-devel] [sane-commit] [SCM] SANE backends - scanner drivers branch, master, updated. RELEASE_1_0_21-248-gaaa34de

m. allan noah kitno455 at gmail.com
Mon Nov 1 13:51:59 UTC 2010


On Mon, Nov 1, 2010 at 9:05 AM, stef <stef.dev at free.fr> wrote:
> Le Monday 01 November 2010 12:47:27 m. allan noah, vous avez écrit :
>> I disagree with this commit. Perhaps we need to change what is
>> printed, but I don't think we should hide them.
>>
>> allan
>>
>> On Mon, Nov 1, 2010 at 2:34 AM, Stéphane Voltz <stef.dev at free.fr> wrote:
>> > The following commit has been merged in the master branch:
>> > commit 27c7eae2b59385fec7228f6bec65fbcc649637a3
>> > Author: Stéphane Voltz <stef.dev at free.fr>
>> > Date:   Sat Oct 30 16:23:17 2010 +0200
>> >
>> >    don't print readonly controls as valid command line options
>> >
>> > diff --git a/frontend/scanimage.c b/frontend/scanimage.c
>> > index 8657a72..7a24ea1 100644
>> > --- a/frontend/scanimage.c
>> > +++ b/frontend/scanimage.c
>> > @@ -2141,7 +2141,8 @@ Parameters are separated by a blank from
>> > single-character options (e.g.\n\ if (!opt)
>> >                opt = sane_get_option_descriptor (device, i);
>> >
>> > -             print_option (device, i, opt);
>> > +             if (SANE_OPTION_IS_SETTABLE
>> > (opt->cap)||opt->type==SANE_TYPE_GROUP) +               print_option
>> > (device, i, opt);
>> >            }
>> >          if (num_dev_options)
>> >            fputc ('\n', stdout);
>> >
>> > --
>> > SANE backends - scanner drivers
>> >
>> > _______________________________________________
>> > sane-commit mailing list
>> > sane-commit at lists.alioth.debian.org
>> > http://lists.alioth.debian.org/mailman/listinfo/sane-commit
>        Hello,
>
>        I can change it if you want. What I don't see is what would be the
> purpose of printing these 'read-only' options with the --help argument, if we
> cannot use them on command line. The fetch_options() functions skip them, so
> scanimage can't make use of it.
>
>        Maybe a -Q/--query argument could print out everything the backend
> exposes for diagnostics purpose, which is different from what can be used by
> scanimage in a script.
>
> Regards,
>        Stef
>

We need a way for authors of button handling programs to figure out
what sensors a scanner exposes. Yes, they can use libsane to query the
options, but then a third user would have to install the button
daemon, just to find out if there are any sensors. I'd rather that
scanimage could tell us.

We have several options- improve the 'read only' text, change
fetch_options() to print an improved warning if the user tries to set
those options, or your suggestion of hiding them unless an arg is
given. I would pick something other than '--query', but any of these
choices is fine with me.

Opinions?

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



More information about the sane-devel mailing list