summaryrefslogblamecommitdiffstats
path: root/list.h
blob: 2bfa1e17a69d5284b7710e778ec902f6dfc71462 (plain) (tree)
1
2
3
4
5
6
7
8
            
                                               





                                         





                                             

                                                  
#pragma once
#define LINKEDLIST void *prev, *next, *listhead

struct list {
    void *tail, *head, *end;
};

extern void list_init(struct list *list);
extern int list_empty(struct list *list);
extern int list_singleton(struct list *list);

extern void *list_circular_prev(void *_node);
extern void *list_circular_next(void *_node);

extern void list_insert(void *_next, void *_node);
extern void list_remove(void *_node);