Re: GOption replacement for poptPrintUsage needed



Hi Matthias,
On Wed, 2005-10-12 at 23:10 +0200, Stefan Kost wrote:

hi,

has anyone written a replacement for poptPrintUsage for GOption?
IMHO that would fit well into glib.

What does poptPrintUsage do ?

It prints the usage. That is the short help summary. GOption naturally does not detect if e.g. an argument is not valid. In the case the application could call g_option_context_print_usage(ctx);
and below print the error ("valid range for timeout is 10...20");

The g_option_context_print_usage(ctx); could determine the comman dline template from the given GOptionEntries and list tha usage in the form:
myapp <required options> ...


Stefan



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