Revamp ggo help.
[paraslash.git] / recv.c
diff --git a/recv.c b/recv.c
index a3fdd30..7a5549a 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -39,15 +39,11 @@ INIT_RECV_ERRLISTS;
 
 __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);
 }