mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-11-06 19:07:14 +00:00
26 lines
533 B
C
26 lines
533 B
C
|
|
#ifndef __LIST_H__
|
|
#define __LIST_H__
|
|
|
|
struct list {
|
|
struct elem *first, *last;
|
|
int size, elems;
|
|
};
|
|
|
|
struct elem {
|
|
struct elem *next;
|
|
void *data;
|
|
};
|
|
|
|
struct list *list_new(int size);
|
|
int list_push(struct list *list, void *data);
|
|
void *list_pop(struct list *list);
|
|
void *list_first(struct list *list);
|
|
int list_elems(struct list *list);
|
|
int list_elems(struct list *list);
|
|
void list_delete(struct list *list);
|
|
int list_remove(struct list *list, void *elem);
|
|
void list_map(struct list *list, void (* func)(void *arg));
|
|
|
|
#endif
|