X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=filter_common.c;h=df4f3bfaad71084d59c60dde9bd020bc3991bc8d;hb=a6cbab95272b31c55b2b41e1d3dd55743c7c774f;hp=45f576050c6f34a56dfb8f6cfff495478466f212;hpb=6442f07bb08eb6e557086587f997b1785ea18ef7;p=paraslash.git diff --git a/filter_common.c b/filter_common.c index 45f57605..df4f3bfa 100644 --- a/filter_common.c +++ b/filter_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2008 Andre Noll + * Copyright (C) 2005-2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -263,3 +263,22 @@ int check_filter_arg(char *fa, void **conf) return -E_UNSUPPORTED_FILTER; } +void print_filter_helps(int detailed) +{ + int i; + + printf_or_die("\nAvailable filters: \n\t"); + FOR_EACH_SUPPORTED_FILTER(i) + printf_or_die("%s%s", i? " " : "", filters[i].name); + printf_or_die("\n\n"); + + FOR_EACH_SUPPORTED_FILTER(i) { + struct filter *f = filters + i; + + if (!f->help.short_help) + continue; + printf_or_die("Options for %s:\n", f->name); + ggo_print_help(&f->help, detailed); + } + +}