-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinked_list.h
More file actions
40 lines (28 loc) · 840 Bytes
/
linked_list.h
File metadata and controls
40 lines (28 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef ASM_LINKED_LIST_H
#define ASM_LINKED_LIST_H
typedef struct {
void* prev;
void* next;
void* data;
} node;
typedef struct {
node* begin;
node* end;
unsigned int size;
} list;
list* create_list(unsigned int size);
void delete_list(list* l);
node* create_node(unsigned int size);
node* delete_node(node* n);
node* next(node* n);
node* prev(node* n);
void* data(node* n);
void set_data(node* n, void* data, unsigned int size);
node* begin(list* l);
node* at(list* l, unsigned int at);
node* end(list* l);
node* emplace(list* l, node* at);
// void emplace_back(node at, unsigned int size);
// void emplace_begin(list l, unsigned int size);
// void emplace_end(list l, unsigned int size);
#endif