comparison list.h @ 579:8c737cd7c1af

merge of '48fdaa8706d1acda35e9d564adc9a1fbc96c18c8' and '658fd03abd21e0da7c4c89b9fff9dc693c72daae'
author Matt Johnston <matt@ucc.asn.au>
date Sat, 27 Feb 2010 11:53:18 +0000
parents c3f2ec71e3d4
children 96bcb20e7e03
comparison
equal deleted inserted replaced
577:69e98c45db7c 579:8c737cd7c1af
1 #ifndef _DROPBEAR_LIST_H
2 #define _DROPBEAR_LIST_H
3
4 struct _m_list;
5
6 struct _m_list_elem {
7 void *item;
8 struct _m_list_elem *next;
9 struct _m_list_elem *prev;
10 struct _m_list *list;
11 };
12
13 typedef struct _m_list_elem m_list_elem;
14
15 struct _m_list {
16 m_list_elem *first;
17 m_list_elem *last;
18 };
19
20 typedef struct _m_list m_list;
21
22 m_list * list_new();
23 void list_append(m_list *list, void *item);
24 /* returns the item for the element removed */
25 void * list_remove(m_list_elem *elem);
26
27
28 #endif /* _DROPBEAR_LIST_H */