Lines Matching refs:entry
23 * - List entries contain references to the next, and the previous entry in the
25 * - The list is circular, i.e. the "last" list entry references the "list head"
26 * in its 'next' reference, and the "list head" references the "last" entry in
33 /* Next entry in the list */
35 /* Previous entry in the list */
53 /* Inserts an entry to the head of the list */
55 alist_insert_head(ACList* list, ACList* entry)
58 entry->next = next;
59 entry->prev = list;
60 next->prev = entry;
61 list->next = entry;
63 /* Inserts an entry to the tail of the list */
65 alist_insert_tail(ACList* list, ACList* entry)
68 entry->next = list;
69 entry->prev = prev;
70 prev->next = entry;
71 list->prev = entry;
74 /* Removes an entry from the list. NOTE: Entry must be in the list when this
77 alist_remove(ACList* entry)
79 ACList* const next = entry->next;
80 ACList* const prev = entry->prev;
83 entry->next = entry->prev = entry;
86 /* Returns an entry removed from the head of the list. If the list was empty,
91 ACList* entry = NULL;
93 entry = list->next;
94 list->next = entry->next;
95 entry->next->prev = list;
96 entry->next = entry->prev = entry;
98 return entry;
101 /* Returns an entry removed from the tail of the list. If the list was empty,
106 ACList* entry = NULL;
108 entry = list->prev;
109 list->prev = entry->prev;
110 entry->prev->next = list;
111 entry->next = entry->prev = entry;
113 return entry;