Source

randomc / list.h

Full commit
#ifndef SOMEC_LIST_H
#define SOMEC_LIST_H

struct list;

struct list {
    void *data;
    struct list *next;
    struct list *prev;
};

struct list* list_init(void *data);
struct list* list_append(struct list *l, void *data);
struct list* list_head(struct list *l);
struct list* list_tail(struct list *l);
size_t list_len(struct list *l);
void list_free(struct list *l);

#endif /* SOMEC_LIST_H */