60 int smf_list_new(SMFList_T **list,
void (*destroy)(
void *data));
68 int smf_list_free(SMFList_T *list);
78 int smf_list_remove(SMFList_T *list, SMFListElem_T *elem,
void **data);
87 int smf_list_append(SMFList_T *list,
void *data);
96 int smf_list_prepend(SMFList_T *list,
void *data);
104 void *smf_list_pop_tail(SMFList_T *list);
112 void *smf_list_pop_head(SMFList_T *list);
122 int smf_list_insert_next(SMFList_T *list, SMFListElem_T *elem,
void *data);
132 int smf_list_insert_prev(SMFList_T *list, SMFListElem_T *elem,
void *data);
141 void smf_list_map(SMFList_T *list,
void(*func)(SMFListElem_T *elem,
void *args),
void *args);
152 int smf_list_map_new(SMFList_T *list, SMFList_T **
new,
void *(*func)(SMFListElem_T *elem,
void *args),
void *args);
158 #define smf_list_size(list) ((list)->size)
164 #define smf_list_head(list) ((list)->head)
170 #define smf_list_tail(list) ((list)->tail)
176 #define smf_list_is_head(elem) ((elem)->prev == NULL ? 1 : 0)
182 #define smf_list_is_tail(elem) ((elem)->next == NULL ? 1 : 0)
188 #define smf_list_data(elem) ((elem)->data)
194 #define smf_list_next(elem) ((elem)->next)
200 #define smf_list_prev(elem) ((elem)->prev)