Lines Matching refs:ilist

30 static void int_node__delete(struct int_node *ilist)  in int_node__delete()  argument
32 free(ilist); in int_node__delete()
51 int intlist__add(struct intlist *ilist, int i) in intlist__add() argument
53 return rblist__add_node(&ilist->rblist, (void *)((long)i)); in intlist__add()
56 void intlist__remove(struct intlist *ilist, struct int_node *node) in intlist__remove() argument
58 rblist__remove_node(&ilist->rblist, &node->rb_node); in intlist__remove()
61 static struct int_node *__intlist__findnew(struct intlist *ilist, in __intlist__findnew() argument
67 if (ilist == NULL) in __intlist__findnew()
71 rb_node = rblist__findnew(&ilist->rblist, (void *)((long)i)); in __intlist__findnew()
73 rb_node = rblist__find(&ilist->rblist, (void *)((long)i)); in __intlist__findnew()
81 struct int_node *intlist__find(struct intlist *ilist, int i) in intlist__find() argument
83 return __intlist__findnew(ilist, i, false); in intlist__find()
86 struct int_node *intlist__findnew(struct intlist *ilist, int i) in intlist__findnew() argument
88 return __intlist__findnew(ilist, i, true); in intlist__findnew()
91 static int intlist__parse_list(struct intlist *ilist, const char *s) in intlist__parse_list() argument
101 err = intlist__add(ilist, value); in intlist__parse_list()
112 struct intlist *ilist = malloc(sizeof(*ilist)); in intlist__new() local
114 if (ilist != NULL) { in intlist__new()
115 rblist__init(&ilist->rblist); in intlist__new()
116 ilist->rblist.node_cmp = intlist__node_cmp; in intlist__new()
117 ilist->rblist.node_new = intlist__node_new; in intlist__new()
118 ilist->rblist.node_delete = intlist__node_delete; in intlist__new()
120 if (slist && intlist__parse_list(ilist, slist)) in intlist__new()
124 return ilist; in intlist__new()
126 intlist__delete(ilist); in intlist__new()
130 void intlist__delete(struct intlist *ilist) in intlist__delete() argument
132 if (ilist != NULL) in intlist__delete()
133 rblist__delete(&ilist->rblist); in intlist__delete()
136 struct int_node *intlist__entry(const struct intlist *ilist, unsigned int idx) in intlist__entry() argument
141 rb_node = rblist__entry(&ilist->rblist, idx); in intlist__entry()