added function to free list, added function pointer for the use of traversing the list data, and code cleanup
This commit is contained in:
+6
-1
@@ -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*));
|
||||
|
||||
Reference in New Issue
Block a user