X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fopt-test.c;h=b9bedde5160a8621c314b7a1524e39392f907a71;hb=0db6e10eac28f38bfc3b325b13ad95107c58ce1e;hp=a71174602ac18ba5ca6ba48265c65f88586231f0;hpb=924caf6f42990dc99c1d7e4a954da1533e37e537;p=libucw.git diff --git a/ucw/opt-test.c b/ucw/opt-test.c index a7117460..b9bedde5 100644 --- a/ucw/opt-test.c +++ b/ucw/opt-test.c @@ -97,7 +97,7 @@ static struct cf_user_type teapot_temperature_t = { .dumper = (cf_dumper1*) teapot_temperature_dumper }; -static void opt_test_hook(struct opt_item * opt, const char * value, void * data) { +static void opt_test_hook(struct opt_item * opt, uns event UNUSED, const char * value, void * data) { if (!show_hooks) return; if (opt) @@ -114,7 +114,7 @@ static struct opt_section water_options = { } }; -static struct opt_section help = { +static struct opt_section options = { OPT_ITEMS { OPT_HELP("A simple tea boiling console."), OPT_HELP("Usage: teapot [options] name-of-the-tea"), @@ -124,7 +124,7 @@ static struct opt_section help = { OPT_HELP("At least one kind of tea must be specified."), OPT_HELP(""), OPT_HELP("Options:"), - OPT_HELP_OPTION(help), + OPT_HELP_OPTION, OPT_CALL('V', "version", show_version, NULL, OPT_NO_VALUE, "\tShow the version"), OPT_HELP(""), OPT_BOOL('e', "english-style", english, 0, "\tEnglish style (with milk)"), @@ -167,7 +167,7 @@ int main(int argc UNUSED, char ** argv) { cf_def_file = "etc/libucw"; clist_init(&black_magic); - opt_parse(&help, argv+1); + opt_parse(&options, argv+1); printf("English style: %s|", english ? "yes" : "no"); if (sugar)