Lines Matching refs:element

64  *        SCI_FAST_LIST_T.  Likewise an element that has been removed from
73 * - element: This is the list element not the actual
74 * object but the list element which has a
98 #define sci_fast_list_element_init(list_object, element) \
100 (element)->object = (list_object); \
101 (element)->next = (element)->prev = NULL; \
102 (element)->owning_list = NULL; \
111 * Return a pointer to the element at the head of the sci_fast_list. The
117 * element - A pointer into which to save the address of the structure
124 * Return a pointer to the element at the tail of the sci_fast_list. The item
130 * element - A pointer into which to save the address of the structure
140 #define sci_fast_list_get_next(element) ((element)->next)
146 #define sci_fast_list_get_prev(element) ((element)->prev)
153 #define sci_fast_list_get_object(element) ((element)->object)
157 * If the element has only one dListField but can be on more than one list,
158 * this will only tell you that it is on one of them. If the element has
162 #define sci_fast_list_is_on_a_list(element) ((element)->owning_list != NULL)
166 * specified list? If the element can be on more than one list, this
173 #define sci_fast_list_is_on_this_list(anchor, element) \
174 ((element)->owning_list == (anchor))
198 * @brief This structure defines what a doubly linked list element contains.
210 * Insert an element to be the new head of the list hanging off of the list
212 * dListAnchor - The name of the SCI_FAST_LIST_T element that is the anchor
221 SCI_FAST_LIST_ELEMENT_T *element
224 element->owning_list = anchor;
225 element->prev = NULL;
227 anchor->list_tail = element;
229 anchor->list_head->prev = element;
230 element->next = anchor->list_head;
231 anchor->list_head = element;
236 * Insert an element at the tail of the list. Since the list is circular we
237 * can add the element at the tail through use the list anchors previous
239 * dListAnchor - The name of the SCI_FAST_LIST_T element that is the anchor
248 SCI_FAST_LIST_ELEMENT_T *element
251 element->owning_list = anchor;
252 element->next = NULL;
254 anchor->list_head = element;
256 anchor->list_tail->next = element;
258 element->prev = anchor->list_tail;
259 anchor->list_tail = element;
269 * element - A pointer into which to save the address of the structure
278 SCI_FAST_LIST_ELEMENT_T *element;
281 element = anchor->list_head;
289 element->next = element->prev = NULL;
290 element->owning_list = NULL;
301 SCI_FAST_LIST_ELEMENT_T *element;
304 element = anchor->list_tail;
305 object = element->object;
306 anchor->list_tail = element->prev;
310 element->next = element->prev = NULL;
311 element->owning_list = NULL;
317 * Remove an element from anywhere in the list referenced by name.
321 SCI_FAST_LIST_ELEMENT_T *element
324 if ( element->next == NULL )
325 element->owning_list->list_tail = element->prev;
327 element->next->prev = element->prev;
329 if ( element->prev == NULL )
330 element->owning_list->list_head = element->next;
332 element->prev->next = element->next;
334 element->owning_list->element_count--;
335 element->next = element->prev = NULL;
336 element->owning_list = NULL;