some meshgen and map rendering updates
[voxelands-alt.git] / inc / list.h
blobe75ad33cfecbec249a40ce40b24fa991c1f2e500
1 #ifndef _LIST_H_
2 #define _LIST_H_
4 #ifndef _HAVE_REF_TYPE
5 #define _HAVE_REF_TYPE
6 typedef struct ref_s {
7 struct ref_s *prev;
8 struct ref_s *next;
9 void *ref;
10 } ref_t;
11 #endif
13 /* defined in list.c */
14 void *list_last(void *list);
15 void *list_push(void *list, void *el);
16 void *list_append(void *list, void *el);
17 void *list_shove(void *list, void *el);
18 void *list_remove(void *list, void *el);
19 void *list_pop(void *list);
20 void *list_pull(void *list);
21 void *list_insert(void *list, void *el, void *n);
22 void *list_insert_cmp(void *list, void *el, int (*list_cmp)(void *e1, void *e2));
23 void *list_resort_cmp(void *list, int (*list_cmp)(void *e1, void* e2));
25 #endif