X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write_common.c;h=8133577b91fbfdf9665b4d3b1b54dd3ac6fb014f;hp=d66b20ca112dd7cb1135d9211ff880cd2a2fc39c;hb=ac153fd54a0f093581ee863984070a325d5343b8;hpb=2084249288864e17c43570bd9957bd927864b1b7 diff --git a/write_common.c b/write_common.c index d66b20ca..8133577b 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. */ @@ -144,9 +144,9 @@ struct writer_node_group *wng_new(unsigned num_writers) } /** - * call the init function of each supported paraslash writer + * Call the init function of each supported paraslash writer. */ -void init_supported_writers(void) +void writer_init(void) { int i; @@ -211,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); + } +}