Lines Matching full:elm
122 (struct node *self, struct node *elm, int (*compare)(struct node *lhs, struct node *rhs)) \
125 return elm; \
126 if (compare(elm, self) < 0) \
127 self->field.avl_left= TREE_INSERT_##node##_##field(self->field.avl_left, elm, compare); \
129 self->field.avl_right= TREE_INSERT_##node##_##field(self->field.avl_right, elm, compare); \
134 (struct node *self, struct node *elm, int (*compare)(struct node *lhs, struct node *rhs)) \
138 if (compare(elm, self) == 0) \
140 if (compare(elm, self) < 0) \
141 return TREE_FIND_##node##_##field(self->field.avl_left, elm, compare); \
143 return TREE_FIND_##node##_##field(self->field.avl_right, elm, compare); \
155 (struct node *self, struct node *elm, int (*compare)(struct node *lhs, struct node *rhs)) \
159 if (compare(elm, self) == 0) \
166 if (compare(elm, self) < 0) \
167 self->field.avl_left= TREE_REMOVE_##node##_##field(self->field.avl_left, elm, compare); \
169 self->field.avl_right= TREE_REMOVE_##node##_##field(self->field.avl_right, elm, compare); \
195 #define TREE_INSERT(head, node, field, elm) \ argument
196 ((head)->th_root= TREE_INSERT_##node##_##field((head)->th_root, (elm), (head)->th_cmp))
198 #define TREE_FIND(head, node, field, elm) \ argument
199 (TREE_FIND_##node##_##field((head)->th_root, (elm), (head)->th_cmp))
201 #define TREE_REMOVE(head, node, field, elm) \ argument
202 ((head)->th_root= TREE_REMOVE_##node##_##field((head)->th_root, (elm), (head)->th_cmp))