Lines Matching refs:anchor

70  *        - anchor : This is the list container and has a
85 * Initialize the double linked list anchor. The other macros require the list
86 * anchor to be set up using this macro.
88 #define sci_fast_list_init(anchor) \
90 (anchor)->list_head = NULL; \
91 (anchor)->list_tail = NULL; \
92 (anchor)->element_count = 0; \
106 * See if there is anything on the list by checking the list anchor.
108 #define sci_fast_list_is_empty(anchor) ((anchor)->list_head == NULL)
120 #define sci_fast_list_get_head(anchor) \
121 ((anchor)->list_head == NULL ? NULL: (anchor)->list_head->object)
133 #define sci_fast_list_get_tail(anchor) \
134 ((anchor)->list_tail == NULL ? NULL: (anchor)->list_head->object)
173 #define sci_fast_list_is_on_this_list(anchor, element) \
174 ((element)->owning_list == (anchor))
185 * @brief the list owner or list anchor for a set of SCI_FAST_LIST
211 * anchor. An empty list has the list anchor pointing to itself.
212 * dListAnchor - The name of the SCI_FAST_LIST_T element that is the anchor
220 SCI_FAST_LIST_T *anchor,
224 element->owning_list = anchor;
226 if ( anchor->list_head == NULL )
227 anchor->list_tail = element;
229 anchor->list_head->prev = element;
230 element->next = anchor->list_head;
231 anchor->list_head = element;
232 anchor->element_count++;
239 * dListAnchor - The name of the SCI_FAST_LIST_T element that is the anchor
247 SCI_FAST_LIST_T *anchor,
251 element->owning_list = anchor;
253 if ( anchor->list_tail == NULL ) {
254 anchor->list_head = element;
256 anchor->list_tail->next = element;
258 element->prev = anchor->list_tail;
259 anchor->list_tail = element;
260 anchor->element_count++;
274 SCI_FAST_LIST_T *anchor
279 if ( anchor->list_head != NULL )
281 element = anchor->list_head;
282 object = anchor->list_head->object;
283 anchor->list_head = anchor->list_head->next;
284 if ( anchor->list_head == NULL )
286 anchor->list_tail = NULL;
288 anchor->element_count--;
297 SCI_FAST_LIST_T *anchor
302 if ( anchor->list_tail != NULL )
304 element = anchor->list_tail;
306 anchor->list_tail = element->prev;
307 if ( anchor->list_tail == NULL )
308 anchor->list_head = NULL;
309 anchor->element_count--;