X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fopt-help.c;h=4166cc5f717e627e41e993b0a7e7d53dd83f5885;hb=0db6e10eac28f38bfc3b325b13ad95107c58ce1e;hp=83b39835b98c4561b38ba15f7e27ad39817dc2a5;hpb=7b52f60afc7ab5c9e96975d2fe9b08f3018bbd60;p=libucw.git diff --git a/ucw/opt-help.c b/ucw/opt-help.c index 83b39835..4166cc5f 100644 --- a/ucw/opt-help.c +++ b/ucw/opt-help.c @@ -95,6 +95,8 @@ static void opt_help_scan(struct help *h, const struct opt_section *sec) for (struct opt_item * item = sec->opt; item->cls != OPT_CL_END; item++) { if (item->cls == OPT_CL_SECTION) opt_help_scan(h, item->u.section); + else if (item->cls == OPT_CL_HOOK) + ; else { struct opt_precomputed opt; opt_precompute(&opt, item); @@ -156,3 +158,9 @@ void opt_help(const struct opt_section * sec) { mp_delete(h.pool); } +void opt_handle_help(struct opt_item * opt UNUSED, const char * value UNUSED, void * data) +{ + struct opt_context *oc = data; + opt_help(oc->options); + exit(0); +}