ec1c13a47aefd378e52a4634c940539e9c99c0b4
[TD_C.git] / clist.h
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 link_t* list_append(link_t* head, int value);
12 link_t* list_prepend(link_t* head, int value);
13 unsigned list_count(link_t* head);
14 void list_set(link_t* head, unsigned index, int value);
15 int list_get(link_t* head, unsigned index);
16 void list_clear(link_t* link);
17
18 #endif /* CLIST_H */