A(filter_param_t) params;
- /* Internal: to check the filter tree structure.
+ /* Loop checking flags.
*/
- unsigned safe :1;
- unsigned seen :1;
+ int last_seen;
} filter_t;
ARRAY(filter_t)
-#define FILTER_INIT { NULL, FTK_UNKNOWN, ARRAY_INIT, NULL, ARRAY_INIT, false, false }
+#define FILTER_INIT { NULL, FTK_UNKNOWN, ARRAY_INIT, NULL, ARRAY_INIT, -1 }
#define CHECK_FILTER(Filter) \
assert(Filter != FTK_UNKNOWN && Filter != FTK_count \
&& "Unknown filter type")
bool filter_build(filter_t *filter);
__attribute__((nonnull(1,2)))
-static inline int filter_find_with_name(A(filter_t) *array, const char *name)
+static inline int filter_find_with_name(const A(filter_t) *array, const char *name)
{
int start = 0;
int end = array->len;
__attribute__((nonnull(1,2)))
const filter_hook_t *filter_run(const filter_t *filter, const query_t *query);
+__attribute__((nonnull(1,2)))
+bool filter_test(const filter_t *filter, const query_t *query, filter_result_t expt);
+
/* Helpers
*/