X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=TP_9%2Fexo1%2Fclist.h;fp=TP_9%2Fexo1%2Fclist.h;h=02a59bed76ec8cce69cd59139b4fbd939cf86b45;hb=1c7a8fe964e67bfcdc3e6550d0a090e8686e8387;hp=0000000000000000000000000000000000000000;hpb=fab9c01b7870244a46f86b79d925e5ada1aea243;p=TD_C.git diff --git a/TP_9/exo1/clist.h b/TP_9/exo1/clist.h new file mode 100644 index 0000000..02a59be --- /dev/null +++ b/TP_9/exo1/clist.h @@ -0,0 +1,16 @@ +#ifndef CLIST_H +#define CLIST_H + +/** Linked list of int */ +typedef struct link_s { + int value; + struct link_s* next; +} link_t; + +link_t* list_new(int value); +void list_append(link_t* head, int value); +unsigned list_count(link_t* head); +int list_get(link_t* head, unsigned index); +void list_clear(link_t* link); + +#endif /* CLIST_H */