Lines Matching refs:name

64 #define SPLAY_HEAD(name, type)                                                \
65 struct name { \
121 #define SPLAY_PROTOTYPE(name, type, field, cmp) \
122 void name##_SPLAY(struct name *, struct type *); \
123 void name##_SPLAY_MINMAX(struct name *, int); \
124 struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
125 struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
129 name##_SPLAY_FIND(struct name *head, struct type *elm) \
133 name##_SPLAY(head, elm); \
140 name##_SPLAY_NEXT(struct name *head, struct type *elm) \
142 name##_SPLAY(head, elm); \
154 name##_SPLAY_MIN_MAX(struct name *head, int val) \
156 name##_SPLAY_MINMAX(head, val); \
163 #define SPLAY_GENERATE(name, type, field, cmp) \
165 name##_SPLAY_INSERT(struct name *head, struct type *elm) \
171 name##_SPLAY(head, elm); \
189 name##_SPLAY_REMOVE(struct name *head, struct type *elm) \
194 name##_SPLAY(head, elm); \
201 name##_SPLAY(head, elm); \
210 name##_SPLAY(struct name *head, struct type *elm) \
247 void name##_SPLAY_MINMAX(struct name *head, int __comp) \
283 #define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y)
284 #define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y)
285 #define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y)
286 #define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y)
287 #define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \
288 : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
289 #define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \
290 : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
292 #define SPLAY_FOREACH(x, name, head) \
293 for ((x) = SPLAY_MIN(name, head); \
295 (x) = SPLAY_NEXT(name, head, x))
298 #define RB_HEAD(name, type) \
299 struct name { \
383 #define RB_PROTOTYPE(name, type, field, cmp) \
384 RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
385 #define RB_PROTOTYPE_STATIC(name, type, field, cmp) \
386 RB_PROTOTYPE_INTERNAL(name, type, field, cmp, UV__UNUSED static)
387 #define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \
388 attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \
389 attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
390 attr struct type *name##_RB_REMOVE(struct name *, struct type *); \
391 attr struct type *name##_RB_INSERT(struct name *, struct type *); \
392 attr struct type *name##_RB_FIND(struct name *, struct type *); \
393 attr struct type *name##_RB_NFIND(struct name *, struct type *); \
394 attr struct type *name##_RB_NEXT(struct type *); \
395 attr struct type *name##_RB_PREV(struct type *); \
396 attr struct type *name##_RB_MINMAX(struct name *, int); \
402 #define RB_GENERATE(name, type, field, cmp) \
403 RB_GENERATE_INTERNAL(name, type, field, cmp,)
404 #define RB_GENERATE_STATIC(name, type, field, cmp) \
405 RB_GENERATE_INTERNAL(name, type, field, cmp, UV__UNUSED static)
406 #define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \
408 name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
452 name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, \
531 name##_RB_REMOVE(struct name *head, struct type *elm) \
593 name##_RB_REMOVE_COLOR(head, parent, child); \
599 name##_RB_INSERT(struct name *head, struct type *elm) \
624 name##_RB_INSERT_COLOR(head, elm); \
630 name##_RB_FIND(struct name *head, struct type *elm) \
648 name##_RB_NFIND(struct name *head, struct type *elm) \
669 name##_RB_NEXT(struct type *elm) \
691 name##_RB_PREV(struct type *elm) \
712 name##_RB_MINMAX(struct name *head, int val) \
729 #define RB_INSERT(name, x, y) name##_RB_INSERT(x, y)
730 #define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y)
731 #define RB_FIND(name, x, y) name##_RB_FIND(x, y)
732 #define RB_NFIND(name, x, y) name##_RB_NFIND(x, y)
733 #define RB_NEXT(name, x, y) name##_RB_NEXT(y)
734 #define RB_PREV(name, x, y) name##_RB_PREV(y)
735 #define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF)
736 #define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF)
738 #define RB_FOREACH(x, name, head) \
739 for ((x) = RB_MIN(name, head); \
741 (x) = name##_RB_NEXT(x))
743 #define RB_FOREACH_FROM(x, name, y) \
745 ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
748 #define RB_FOREACH_SAFE(x, name, head, y) \
749 for ((x) = RB_MIN(name, head); \
750 ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
753 #define RB_FOREACH_REVERSE(x, name, head) \
754 for ((x) = RB_MAX(name, head); \
756 (x) = name##_RB_PREV(x))
758 #define RB_FOREACH_REVERSE_FROM(x, name, y) \
760 ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
763 #define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \
764 for ((x) = RB_MAX(name, head); \
765 ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \