push
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#ifndef LIST_H
|
||||
#define LIST_H
|
||||
|
||||
typedef void (*acceptor)(void*);
|
||||
|
||||
struct list
|
||||
{
|
||||
void *data;
|
||||
struct list *next;
|
||||
acceptor print;
|
||||
acceptor free;
|
||||
};
|
||||
|
||||
void push_front(struct list **l, void *data, acceptor p, acceptor f);
|
||||
void pop_front(struct list **l);
|
||||
void print_list(struct list *l);
|
||||
void destroy_list(struct list **l);
|
||||
|
||||
#endif /* ! LIST_H */
|
||||
Reference in New Issue
Block a user