added function to free list, added function pointer for the use of traversing the list data, and code cleanup

This commit is contained in:
amazing-username
2019-07-22 21:58:03 -04:00
parent 1867267b06
commit 729f87fee0
2 changed files with 45 additions and 8 deletions
+6 -1
View File
@@ -1,5 +1,10 @@
#include "types.h"
struct node* init_list(void*);
int is_list_init(struct node**);
void insert_at_begin(struct node**, void*);
void insert_at_end(struct node**, void*);
void traverse(struct node**);
void free_list(struct node**);
void traverse(struct node*, void (*)(struct node*));