X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write_common.c;h=8fb6c3d10797c4fc7ea4119de5c990271f177482;hp=3bf5d1199f560e9ce93b7d97a06e278ce495591f;hb=f85e05c0b3951e7d3119983c118c82d71f2662a3;hpb=4a562d17319e990f75ea3bbf5f3e25bfe0aafba7 diff --git a/write_common.c b/write_common.c index 3bf5d119..8fb6c3d1 100644 --- a/write_common.c +++ b/write_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. */ @@ -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); + } +}