Lines Matching defs:list

41 const	boolean_t	ASCENDING	= TRUE;	/* list ordering */
43 const boolean_t AT_TAIL = TRUE; /* list insertion location */
47 * determine if the list contains an item
52 dlist_t *list,
56 return (dlist_find(list, obj, compare) != NULL);
60 * locate the item in the list that points at the object
64 dlist_t *list,
70 for (iter = list; iter != NULL; iter = iter->next) {
80 * insert item into list in the desired order (ascending or descending)
83 * In the for loop, iter marks current position in the list
86 * Iterate the list and find the correct place to insert temp.
97 dlist_t *list,
105 if (list == NULL) {
111 head = list;
113 for (iter = list; iter != NULL; iter = iter->next) {
134 /* end of list, so item becomes the new end */
146 * Remove the first node pointing to same content as item from list,
147 * clear it's next and prev pointers, return new list head.
158 * by an item in the list.
163 * @param list
164 * the list containing the item to remove
176 * @return the first element of the resulting list
180 dlist_t *list,
189 if (list == NULL) {
190 return (list);
193 item = dlist_find(list, obj, compare);
195 return (list);
204 * Remove an item from its list. Return the resulting list.
210 * @return the first element of the resulting list
232 /* Find head of list */
240 * append item to list, either beginning or end
245 dlist_t *list,
248 dlist_t *head = list;
250 if (list == NULL) {
256 head = list;
279 * Create a dlist_t element for the given object and append to list.
284 * @param list
285 * the list to which to append the new dlist_t element
289 * (AT_TAIL) of the list
300 dlist_t **list,
309 *list = dlist_append(item, *list, attail);
317 * Returns the resulting list.
342 * compute number of items in list
346 dlist_t *list)
351 for (iter = list; iter != NULL; iter = iter->next)
378 * Traverse the list pointed to by head and free each
379 * list node. If freefunc is non-NULL, call freefunc
400 * Order the given list such that the number of similar elements
408 * 2. Create a new list by iterating through each category and
412 * @param list
413 * the list to order
420 * @return the first element of the resulting list
424 dlist_t *list,
437 for (item = list; item != NULL; ) {
440 /* Remove this item from the list */
441 list = dlist_remove(item);
449 list = dlist_remove_equivalent_item(
450 list, item->obj, compare, &removed);
454 list = dlist_remove_equivalent_item(
455 list, item->obj, compare, &removed);
458 item = list;
462 * Next, create a new list, minimizing the number of adjacent
465 list = NULL;
502 /* Add removed element to resulting list */
503 list = dlist_append(item, list, AT_TAIL);
511 return (list);