X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=recv_common.c;h=2840df00b4317d143bcadec5637e0ca4d1200ef7;hp=03f569fe3aff4386f9792881a023d7be520fad0e;hb=8221397af24a2df3c2edbc889847ce0ab15eb3e0;hpb=5ba8f6dff01904907d1dcfaa1555c8ceb5a72c90 diff --git a/recv_common.c b/recv_common.c index 03f569fe..2840df00 100644 --- a/recv_common.c +++ b/recv_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2008 Andre Noll + * Copyright (C) 2006-2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -84,3 +84,26 @@ void *check_receiver_arg(char *ra, int *receiver_num) PARA_ERROR_LOG("receiver not found\n"); return NULL; } + +/** + * Print out the help texts to all receivers. + * + * \param detailed Whether the detailed help should be printed. + */ +void print_receiver_helps(int detailed) +{ + int i; + + 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, detailed); + } +}