Added entities. Rewrote stage, half 'working'.
[cantaveria.git] / list.h
blob4972f6ccab240d1be103b4a01dad5e721a19d6d1
1 typedef struct list list;
2 struct list {
3 void* item;
4 list* next;
5 };
7 typedef int (*compare_func)(void* v1, void* v2);
9 list* empty(void);
10 void push(list* L, void* item);
11 void* pop(list* L);
12 void append(list* L, void* item);
13 void recycle(list* L);
14 void print_list(list* L, void (*print)(void* item));
15 int length(list* L);
16 void sort(list* L, compare_func cmp);