Home | History | Annotate | Download | only in utils

Lines Matching refs:entry

19  * - List entries contain references to the next, and the previous entry in the
21 * - The list is circular, i.e. the "last" list entry references the "list head"
22 * in its 'next' reference, and the "list head" references the "last" entry in
29 /* Next entry in the list */
31 /* Previous entry in the list */
49 /* Inserts an entry to the head of the list */
51 alist_insert_head(ACList* list, ACList* entry)
54 entry->next = next;
55 entry->prev = list;
56 next->prev = entry;
57 list->next = entry;
59 /* Inserts an entry to the tail of the list */
61 alist_insert_tail(ACList* list, ACList* entry)
64 entry->next = list;
65 entry->prev = prev;
66 prev->next = entry;
67 list->prev = entry;
70 /* Removes an entry from the list. NOTE: Entry must be in the list when this
73 alist_remove(ACList* entry)
75 ACList* const next = entry->next;
76 ACList* const prev = entry->prev;
79 entry->next = entry->prev = entry;
82 /* Returns an entry removed from the head of the list. If the list was empty,
87 ACList* entry = NULL;
89 entry = list->next;
90 list->next = entry->next;
91 entry->next->prev = list;
92 entry->next = entry->prev = entry;
94 return entry;
97 /* Returns an entry removed from the tail of the list. If the list was empty,
102 ACList* entry = NULL;
104 entry = list->prev;
105 list->prev = entry->prev;
106 entry->prev->next = list;
107 entry->next = entry->prev = entry;
109 return entry;