help-gengetopt
[Top][All Lists]
Advanced

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

Re: [help-gengetopt] Re: GNU Gengetopt 2.16


From: Andre Noll
Subject: Re: [help-gengetopt] Re: GNU Gengetopt 2.16
Date: Mon, 27 Mar 2006 09:10:35 +0200
User-agent: Mutt/1.5.9i

Hi,

On 21:44, Lorenzo Bettini wrote:
> Andre Noll wrote:
> >A more general possibility would be to extend the args_info struct
> >such that it also contains the help text for each option. For example,
> >if there is an option called --foo, generate a foo_help member in
> >args_info, much like foo_given and foo_arg which we already have.
> >
> >This approach solves the above problem but it makes it difficult to
> >get the complete help text.
> >
> >So maybe you are very right and the best way to go is using an array.
> >We could combine this with the foo_help thing by first doing
> >
> >     const char *args_info_help[] = {
> >             "  -h, --help                    Print help and exit",
> >             "  -V, --version                 Print version and exit"
> >             "  -f, --foo                     set foo (default=`42')",
> >             "  -b, --bar                     set bar (default=`43')",
> >             ,,,
> >     }
> >
> >and then in clear_args()
> >
> >     args_info.foo_help = args_info_help[0];
> >     args_info.bar_help = args_info_help[1];
> >     ...
> >
> >As the help texts may be quite big, we should store it only once
> >to avoid bloat.
> >
> >Regards
> >Andre
> 
> Hi
> 
> I've put up a release candidate that implements this feature

Wonderful :)

Works like a charm and allowed me to get rid of another ugly
Makefile hack in paraslash.

>  (please take a look at the documentation):

Looks also fine.

Thanks
Andre

-- 
The only person who always got his work done by Friday was Robinson Crusoe




reply via email to

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