X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write_common.c;h=5896d91c4d415ee18989574b8e10c68cdf990f3b;hp=3bf5d1199f560e9ce93b7d97a06e278ce495591f;hb=40de1dd2fdbb054444d585aa70e2d50166a66e07;hpb=2b8ac364a9ad11f67bfc1cdd01c113bde30baaf7;ds=sidebyside diff --git a/write_common.c b/write_common.c index 3bf5d119..5896d91c 100644 --- a/write_common.c +++ b/write_common.c @@ -10,6 +10,7 @@ #include "string.h" #include "list.h" #include "sched.h" +#include "ggo.h" #include "write.h" #include "error.h" @@ -210,3 +211,21 @@ struct writer_node_group *setup_default_wng(void) wng->writer_nodes[0].conf = writers[DEFAULT_WRITER].parse_config(""); return wng; } + +void print_writer_helps(int detailed) +{ + int i; + + printf_or_die("\nAvailable writers: \n\t"); + FOR_EACH_WRITER(i) + printf_or_die("%s%s", i? " " : "", writer_names[i]); + printf_or_die("\n\n"); + FOR_EACH_WRITER(i) { + struct writer *w = writers + i; + + if (!w->help.short_help) + continue; + printf_or_die("Options for %s:\n", writer_names[i]); + ggo_print_help(&w->help, detailed); + } +}