/*
- * Copyright (C) 2005-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2009 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
/**
* Call the init function of each supported filter.
- *
- * \param all_filters the array of all supported filters.
- *
* \sa filter::init
*/
-void filter_init(struct filter *all_filters)
+void filter_init(void)
{
int i;
FOR_EACH_SUPPORTED_FILTER(i)
- all_filters[i].init(all_filters + i);
+ filters[i].init(filters + i);
}
/**
return;
}
again:
- ib = fc->inbuf;
+ ib = *fc->inbufp;
loaded = fc->in_loaded;
conv = 0;
FOR_EACH_FILTER_NODE(fn, fc, i) {
// fc->eof, *fc->out_loaded, conv, conv_total);
if (conv)
goto again;
- if (!*fc->input_error)
+ if (*fc->input_error >= 0)
return;
if (*fc->out_loaded)
return;
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);
+ }
+
+}