2015-02-24 12:43:01 +00:00
|
|
|
#ifndef DROPBEAR_DROPBEAR_LIST_H
|
|
|
|
#define DROPBEAR_DROPBEAR_LIST_H
|
2009-07-06 12:59:13 +00:00
|
|
|
|
|
|
|
struct _m_list;
|
|
|
|
|
|
|
|
struct _m_list_elem {
|
2016-01-01 14:02:09 +00:00
|
|
|
void *item;
|
2009-07-06 12:59:13 +00:00
|
|
|
struct _m_list_elem *next;
|
|
|
|
struct _m_list_elem *prev;
|
2016-01-01 14:02:09 +00:00
|
|
|
struct _m_list *list;
|
2009-07-06 12:59:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _m_list_elem m_list_elem;
|
|
|
|
|
|
|
|
struct _m_list {
|
2016-01-01 14:02:09 +00:00
|
|
|
m_list_elem *first;
|
|
|
|
m_list_elem *last;
|
2009-07-06 12:59:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _m_list m_list;
|
|
|
|
|
2016-01-01 15:30:31 +00:00
|
|
|
m_list * list_new(void);
|
2009-07-06 12:59:13 +00:00
|
|
|
void list_append(m_list *list, void *item);
|
|
|
|
/* returns the item for the element removed */
|
|
|
|
void * list_remove(m_list_elem *elem);
|
|
|
|
|
|
|
|
|
2015-02-24 12:43:01 +00:00
|
|
|
#endif /* DROPBEAR_DROPBEAR_LIST_H */
|