summaryrefslogtreecommitdiff
path: root/filter/data.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-11-07 10:09:40 +0100
committerMaria Matejka <mq@ucw.cz>2022-11-07 10:18:19 +0100
commit96d380405701bb01d792ff1c867a607d7fefa001 (patch)
tree08477327585a486667ade126b9bd51713e461608 /filter/data.h
parent34e803c6c32032cffeb9bd230d0f85861acd9222 (diff)
parent8478de8817c58af02f7aed1d621013891115a2dc (diff)
Merge commit '8478de88' into thread-next
Diffstat (limited to 'filter/data.h')
-rw-r--r--filter/data.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/filter/data.h b/filter/data.h
index c1e7c736..ad578208 100644
--- a/filter/data.h
+++ b/filter/data.h
@@ -119,6 +119,7 @@ struct f_tree *f_new_tree(void);
struct f_tree *build_tree(struct f_tree *);
const struct f_tree *find_tree(const struct f_tree *t, const struct f_val *val);
int same_tree(const struct f_tree *t0, const struct f_tree *t2);
+int tree_node_count(const struct f_tree *t);
void tree_format(const struct f_tree *t, buffer *buf);
void tree_walk(const struct f_tree *t, void (*hook)(const struct f_tree *, void *), void *data);
@@ -215,6 +216,10 @@ static inline int lclist_set_type(const struct f_tree *set)
static inline int path_set_type(const struct f_tree *set)
{ return !set || set->from.type == T_INT; }
+int clist_match_set(const struct adata *clist, const struct f_tree *set);
+int eclist_match_set(const struct adata *list, const struct f_tree *set);
+int lclist_match_set(const struct adata *list, const struct f_tree *set);
+
const struct adata *clist_filter(struct linpool *pool, const struct adata *list, const struct f_val *set, int pos);
const struct adata *eclist_filter(struct linpool *pool, const struct adata *list, const struct f_val *set, int pos);
const struct adata *lclist_filter(struct linpool *pool, const struct adata *list, const struct f_val *set, int pos);