31 #ifndef FIRM_ADT_PLIST_H
32 #define FIRM_ADT_PLIST_H
40 typedef struct plist plist_t;
104 #define plist_count(list) \
105 ((list)->element_count)
176 #define plist_first(list) \
177 ((list)->first_element)
184 #define plist_last(list) \
185 ((list)->last_element)
193 #define plist_element_has_next(element) \
194 ((element)->next != NULL)
202 #define plist_element_has_prev(element) \
203 ((element)->prev != NULL)
211 #define plist_element_get_next(element) \
220 #define plist_element_get_prev(element) \
228 #define plist_element_get_value(element) \
234 #define foreach_plist(list, el) \
235 for (el = plist_first(list); el; el = plist_element_get_next(el))