From 501a1c5954e65f51d931803f0145a19a652e5e49 Mon Sep 17 00:00:00 2001 From: Andre Date: Sun, 5 Mar 2006 13:40:43 +0100 Subject: [PATCH] para_filter: Fix and improve help text for --list_filters The old help text still used colons as separators. Mark those filters which have their own command line parser with a star in the filter list. Some trivial whitespace fixes also. --- filter.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/filter.c b/filter.c index 04997cf2..2cd6d09d 100644 --- a/filter.c +++ b/filter.c @@ -95,7 +95,7 @@ static void open_filters(void) static int parse_config(int argc, char *argv[]) { static char *cf; /* config file */ - struct stat statbuf; + struct stat statbuf; int i; if (cmdline_parser(argc, argv, &conf)) @@ -105,7 +105,7 @@ static int parse_config(int argc, char *argv[]) cf = make_message("%s/.paraslash/filter.conf", home); free(home); } - if (!stat(cf, &statbuf)) { + if (!stat(cf, &statbuf)) { if (cmdline_parser_configfile(cf, &conf, 0, 0, 0)) return -E_FILTER_SYNTAX; } @@ -113,8 +113,10 @@ static int parse_config(int argc, char *argv[]) return 1; printf("available filters: "); for (i = 0; filters[i].name; i++) - printf("%s%s", i? " " : "", filters[i].name); - printf("\nTry para_filter -f:-h for help on \n"); + printf("%s%s%s", i? " " : "", filters[i].name, + filters[i].parse_config? "*": ""); + printf("\nFilters marked with \"*\" have further command line options. Try\n" + "\tpara_filter -f ' -h'\nfor more information.\n"); exit(EXIT_SUCCESS); } -- 2.39.5