]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/opt-test.c
Opt: Documented opt and its interaction with conf
[libucw.git] / ucw / opt-test.c
index a71174602ac18ba5ca6ba48265c65f88586231f0..b9bedde5160a8621c314b7a1524e39392f907a71 100644 (file)
@@ -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)