help-gengetopt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-gengetopt] Enumerated Options


From: Lorenzo Bettini
Subject: Re: [help-gengetopt] Enumerated Options
Date: Wed, 14 Nov 2001 08:10:58 +0100

Hi

        Sorry for the delay of my answer to this mail.

Actually there's another person that is adding this features and many
others to gengetopt (for instance default values, and so on).  Indeed
he's also changing the syntax of the configuration file (the old syntax
will be supported anyway).  Indeed the current syntax is not so flexible
in adding new features to it (as you may have noticed).

So please stay tuned, as soon as we have a (beta)version with these
features I'll let you know :-)

cheers
        Lorenzo

Brian Minard wrote:
> 
> Hi,
> 
> I am wondering if anyone is working on the enumerated option type for
> gengetopt?  If not, how about this as a proposal for implementing it.
> 
> Description file format for enumerated values is as follows.
> 
>         option long short desc enum required
> 
> Here, option, long, short, desc, and required have the meanings
> currently associated with them.  The enum value is simply a value of
> argtype (much like flag is today).
> 
> The required value applies to all members of the enumerated type.
> That is, you MUST specify a value of the enumeration whenever any of
> the enumerated types are required, or you MAY specify a value of the
> enumeration whenever none of the enumerated values are required.
> 
> This design implies 1 enumerated type in a description file (and also
> program).  Lists of enumerated types would be created as follows.
> 
>   1.optional enumerated values
> 
>     option value1 val1 "first value"  enum no
>     option value2 val2 "second value" enum no
> 
>     The enumerated type is not required and is contains the values
>     "value1 and value2, or val1 and val2".
> 
>   2.required enumerated value (a yes associated with any enum value)
> 
>     option value1 val1 "first value"  enum yes
>     option value2 val2 "second value" enum no
> 
>     OR
> 
>     option value1 val1 "first value"  enum no
>     option value2 val2 "second value" enum yes
> 
>     The enumerated type is required whenever a yes appears in the
>     required value.
> 
> I've intentionally ignored multiple enumerated types as a way towards
> simplifying the resulting code.  Doing this seems to require a larger
> change to the description file format.
> 
> Thanks,
> Brian
> 
> _______________________________________________
> Help-gengetopt mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-gengetopt

-- 
+-----------------------------------------------------+
|  Lorenzo Bettini          ICQ# lbetto, 16080134     |
|  PhD student in Computer Science                    |
|  Dip. Sistemi e Informatica, Univ. di Firenze       |
|  Tel +39 055 4796741, Fax +39 055 4796730           |
|  Florence - Italy         (Linux User # 158233)     |
|  Home Page        : http://w3.newnet.it/bettini     |
|  Mail             : address@hidden            |
|  http://music.dsi.unifi.it         XKlaim language  |
|  http://w3.newnet.it/bettini/purple     Cover Band  |
|  http://www.gnu.org/software/src-highlite           |
|  http://www.gnu.org/software/gengetopt              |
+-----------------------------------------------------+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]