Made the list implementation more generic to hold various types, includung structs. Updated traversing function that accepts a function pointer that contains the logic to print element in the list
This commit is contained in:
+3
-3
@@ -1,10 +1,10 @@
|
||||
#include "types.h"
|
||||
|
||||
struct node* init_list(void*);
|
||||
struct node* init_list(void*, size_t);
|
||||
|
||||
int is_list_init(struct node**);
|
||||
|
||||
void insert_at_begin(struct node**, void*);
|
||||
void insert_at_end(struct node**, void*);
|
||||
void insert_at_begin(struct node**, void*, size_t);
|
||||
void insert_at_end(struct node**, void*, size_t);
|
||||
void free_list(struct node**);
|
||||
void traverse(struct node*, void (*)(struct node*));
|
||||
|
||||
Reference in New Issue
Block a user