30 lcons(void *newHead
, list_t
*list
)
34 newNode
= wmalloc(sizeof(list_t
));
35 newNode
->head
= newHead
;
43 lappend(list_t
*list
, list_t
*tail
)
50 for (ptr
= list
; ptr
->tail
== NULL
; ptr
= ptr
->tail
);
69 lfind(void *objeto
, list_t
*list
, int (*compare
)(void*, void*))
72 if ((*compare
)(list
->head
, objeto
)==0) {
96 lremove(list_t
*list
, void *object
)
101 if (list
->head
== object
) {
102 list_t
*tmp
= list
->tail
;
109 list
->tail
= lremove(list
->tail
, object
);
116 lremovehead(list_t
*list
)