- printf("dsfsfsd\n");
- int i, d = conf.detailed_help_given;
- const char **p = d? recv_args_info_detailed_help
- : recv_args_info_help;
-
- printf_or_die("%s\n\n", RECV_CMDLINE_PARSER_PACKAGE "-"
- RECV_CMDLINE_PARSER_VERSION);
- printf_or_die("%s\n\n", recv_args_info_usage);
- for (; *p; p++)
- printf_or_die("%s\n", *p);
-
- printf_or_die("\nAvailable receivers: \n\t");
- FOR_EACH_RECEIVER(i)
- printf_or_die("%s%s", i? " " : "", receivers[i].name);
- printf_or_die("\n\n");
- FOR_EACH_RECEIVER(i) {
- struct receiver *r = receivers + i;
-
- if (!r->help.short_help)
- continue;
- printf_or_die("Options for %s:\n", r->name);
- ggo_print_help(&r->help, d);
- }
- exit(0);
-}
-
-static void *parse_config(int argc, char *argv[], int *receiver_num)
-{
- if (recv_cmdline_parser(argc, argv, &conf))
- return NULL;
- HANDLE_VERSION_FLAG("recv", conf);
- if (conf.help_given || conf.detailed_help_given)
- print_help_and_die();
- return check_receiver_arg(conf.receiver_arg, receiver_num);
+ char *help;
+
+ if (OPT_GIVEN(DETAILED_HELP, lpr))
+ help = lls_long_help(CMD_PTR);
+ else if (OPT_GIVEN(HELP, lpr))
+ help = lls_short_help(CMD_PTR);
+ else
+ return;
+ printf("%s\n", help);
+ free(help);
+ print_receiver_helps(OPT_GIVEN(DETAILED_HELP, lpr));
+ exit(EXIT_SUCCESS);