/*
- * Copyright (C) 2005-2013 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2014 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
__noreturn static void print_help_and_die(void)
{
- int d = conf.detailed_help_given;
- const char **p = d? recv_args_info_detailed_help
- : recv_args_info_help;
-
- printf_or_die("%s\n\n", VERSION_SINGLE_LINE("recv"));
- printf_or_die("%s\n\n", recv_args_info_usage);
- for (; *p; p++)
- printf_or_die("%s\n", *p);
- print_receiver_helps(d);
+ struct ggo_help h = DEFINE_GGO_HELP(recv);
+ bool d = conf.detailed_help_given;
+
+ ggo_print_help(&h, d? GPH_STANDARD_FLAGS_DETAILED : GPH_STANDARD_FLAGS);
+ print_receiver_helps(d? GPH_MODULE_FLAGS_DETAILED : GPH_MODULE_FLAGS);
exit(0);
}
recv_cmdline_parser(argc, argv, &conf);
loglevel = get_loglevel_by_name(conf.loglevel_arg);
- HANDLE_VERSION_FLAG("recv", conf);
+ version_handle_flag("recv", conf.version_given);
recv_init();
if (conf.help_given || conf.detailed_help_given)
print_help_and_die();