Commit | Line | Data |
---|---|---|
1c7a8fe9 JB |
1 | #ifndef CLIST_H |
2 | #define CLIST_H | |
3 | ||
4 | /** Linked list of int */ | |
5 | typedef struct link_s { | |
6 | int value; | |
7 | struct link_s* next; | |
8 | } link_t; | |
9 | ||
10 | link_t* list_new(int value); | |
11 | void list_append(link_t* head, int value); | |
12 | unsigned list_count(link_t* head); | |
13 | int list_get(link_t* head, unsigned index); | |
14 | void list_clear(link_t* link); | |
15 | ||
16 | #endif /* CLIST_H */ |