22 lines
459 B
C
22 lines
459 B
C
#pragma once
|
|
|
|
typedef struct Node {
|
|
struct Node* next, * prev;
|
|
void* data;
|
|
} Node;
|
|
|
|
void list_print(Node* head, void (*print_func)(void*));
|
|
|
|
void list_print_pointers(Node* head);
|
|
|
|
void list_push(Node** head, void* data);
|
|
|
|
void list_append(Node** head, void* data);
|
|
|
|
void list_insert(Node* prev_node, void* data);
|
|
|
|
Node* list_get(Node* head, unsigned index);
|
|
|
|
Node* list_search(Node* head, void* elem, int (*eq)(void*, void*));
|
|
|
|
void list_remove(Node* node); |