diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2020-01-09 16:41:57 +0100 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2020-01-09 16:41:57 +0100 |
commit | 7891fda413ff314ff5cd977d96392988c16216e3 (patch) | |
tree | de7497fb57b567ac57c3f6f0451f09a219b69d14 /linked_list.h | |
download | csnake-7891fda413ff314ff5cd977d96392988c16216e3.tar.gz csnake-7891fda413ff314ff5cd977d96392988c16216e3.tar.bz2 csnake-7891fda413ff314ff5cd977d96392988c16216e3.zip |
initial commit
Diffstat (limited to 'linked_list.h')
-rw-r--r-- | linked_list.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/linked_list.h b/linked_list.h new file mode 100644 index 0000000..fcea7a0 --- /dev/null +++ b/linked_list.h @@ -0,0 +1,25 @@ +#ifndef _LINKED_LIST_H +#define _LINKED_LIST_H + +typedef struct Node +{ + int x, y; + struct Node *next, *prev; +} Node; + +typedef struct LinkedList +{ + Node* head, *tail; +} LinkedList; + +Node *initialise_node(void); +void free_node(Node *); +LinkedList *initialise_linked_list(void); +void free_linked_list(LinkedList *); +void append_linked_list(LinkedList *, int, int); +void remove_tail_linked_list(LinkedList *); +void print_linked_list(LinkedList *, void (*)(void *)); + + +#endif + |