Lines Matching full: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) \ argument
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) argument
146 #define sci_fast_list_get_prev(element) ((element)->prev) argument
153 #define sci_fast_list_get_object(element) ((element)->object) argument
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) argument
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) \ argument
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 in sci_fast_list_insert_head() argument
224 element->owning_list = anchor; in sci_fast_list_insert_head()
225 element->prev = NULL; in sci_fast_list_insert_head()
227 anchor->list_tail = element; in sci_fast_list_insert_head()
229 anchor->list_head->prev = element; in sci_fast_list_insert_head()
230 element->next = anchor->list_head; in sci_fast_list_insert_head()
231 anchor->list_head = element; in sci_fast_list_insert_head()
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 in sci_fast_list_insert_tail() argument
251 element->owning_list = anchor; in sci_fast_list_insert_tail()
252 element->next = NULL; in sci_fast_list_insert_tail()
254 anchor->list_head = element; in sci_fast_list_insert_tail()
256 anchor->list_tail->next = element; in sci_fast_list_insert_tail()
258 element->prev = anchor->list_tail; in sci_fast_list_insert_tail()
259 anchor->list_tail = element; in sci_fast_list_insert_tail()
269 * element - A pointer into which to save the address of the structure
278 SCI_FAST_LIST_ELEMENT_T *element; in sci_fast_list_remove_head() local
281 element = anchor->list_head; in sci_fast_list_remove_head()
289 element->next = element->prev = NULL; in sci_fast_list_remove_head()
290 element->owning_list = NULL; in sci_fast_list_remove_head()
301 SCI_FAST_LIST_ELEMENT_T *element; in sci_fast_list_remove_tail() local
304 element = anchor->list_tail; in sci_fast_list_remove_tail()
305 object = element->object; in sci_fast_list_remove_tail()
306 anchor->list_tail = element->prev; in sci_fast_list_remove_tail()
310 element->next = element->prev = NULL; in sci_fast_list_remove_tail()
311 element->owning_list = NULL; in sci_fast_list_remove_tail()
317 * Remove an element from anywhere in the list referenced by name.
321 SCI_FAST_LIST_ELEMENT_T *element in sci_fast_list_remove_element() argument
324 if ( element->next == NULL ) in sci_fast_list_remove_element()
325 element->owning_list->list_tail = element->prev; in sci_fast_list_remove_element()
327 element->next->prev = element->prev; in sci_fast_list_remove_element()
329 if ( element->prev == NULL ) in sci_fast_list_remove_element()
330 element->owning_list->list_head = element->next; in sci_fast_list_remove_element()
332 element->prev->next = element->next; in sci_fast_list_remove_element()
334 element->owning_list->element_count--; in sci_fast_list_remove_element()
335 element->next = element->prev = NULL; in sci_fast_list_remove_element()
336 element->owning_list = NULL; in sci_fast_list_remove_element()