X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=filter_common.c;h=20eb02f55ee9c553a49a2c174e69c703a391e797;hb=224ab3f14af8e08a8a7159160eccea75be30ffd1;hp=099d056ef1514e2f606adf30d779308b58bead95;hpb=6aad8ed5fef24cdf2c65cbb193572cb10c2b2c1c;p=paraslash.git diff --git a/filter_common.c b/filter_common.c index 099d056e..20eb02f5 100644 --- a/filter_common.c +++ b/filter_common.c @@ -25,6 +25,16 @@ /** The array of supported filters. */ static struct filter filters[NUM_SUPPORTED_FILTERS] = {FILTER_ARRAY}; +/** + * Obtain a reference to a filter structure. + * + * \param filter_num Between zero and NUM_SUPPORTED_FILTERS, inclusively. + * + * \return Pointer to the filter identified by the given filter number. + * + * It is a fatal error if the given number is out of range. In this case + * the function aborts. + */ const struct filter *filter_get(int filter_num) { assert(filter_num >= 0); @@ -68,11 +78,12 @@ static int parse_filter_args(int filter_num, char *options, void **conf) /** * Check the filter command line options. * - * \param fa The command line options. + * \param fa The filter argument. * \param conf Points to the filter configuration upon successful return. * - * Check if \a fa starts with a the name of a supported filter, followed by - * a colon. If yes, call the command line parser of that filter. + * Check if the given filter argument starts with the name of a supported + * filter, optionally followed by options for this filter. If yes, call the + * command line parser of that filter. * * \return On success, the number of the filter is returned and \a conf * is initialized to point to the filter configuration determined by \a fa.