10 list
* make_new(list
* next
, void* item
){
14 ptr
= malloc(sizeof(struct list
));
26 void remove_from_list(list
* prev
, list
* node
){
27 prev
->next
= node
->next
;
29 node
->next
= freelist
;
35 return make_new(NULL
, NULL
);
38 void push(list
* L
, void* item
){
39 list
* ptr
= make_new(L
->next
, item
);
45 void* item
= L
->next
->item
;
46 remove_from_list(L
, L
->next
);
54 void append(list
* L
, void* item
){
59 ptr
->next
= make_new(NULL
, item
);
62 void recycle(list
* L
){
65 ptr
->next
->item
= NULL
;
85 void print_list(list
* L
, void (*print
)(void* item
)){
97 void println_list(list
* L
, void (*print
)(void* item
)){
102 void list_print_free(){
103 list
* ptr
= freelist
;
115 void print(void* item
){