2019-06-09 20:44:26 +00:00
|
|
|
#ifndef DROPBEAR_DROPBEAR_LIST_H
|
|
|
|
#define DROPBEAR_DROPBEAR_LIST_H
|
2014-12-10 21:56:49 +00:00
|
|
|
|
|
|
|
struct _m_list;
|
|
|
|
|
|
|
|
struct _m_list_elem {
|
2019-06-09 20:44:26 +00:00
|
|
|
void *item;
|
2014-12-10 21:56:49 +00:00
|
|
|
struct _m_list_elem *next;
|
|
|
|
struct _m_list_elem *prev;
|
2019-06-09 20:44:26 +00:00
|
|
|
struct _m_list *list;
|
2014-12-10 21:56:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _m_list_elem m_list_elem;
|
|
|
|
|
|
|
|
struct _m_list {
|
2019-06-09 20:44:26 +00:00
|
|
|
m_list_elem *first;
|
|
|
|
m_list_elem *last;
|
2014-12-10 21:56:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _m_list m_list;
|
|
|
|
|
2019-06-09 20:44:26 +00:00
|
|
|
m_list * list_new(void);
|
2014-12-10 21:56:49 +00:00
|
|
|
void list_append(m_list *list, void *item);
|
|
|
|
/* returns the item for the element removed */
|
|
|
|
void * list_remove(m_list_elem *elem);
|
|
|
|
|
|
|
|
|
2019-06-09 20:44:26 +00:00
|
|
|
#endif /* DROPBEAR_DROPBEAR_LIST_H */
|