diff options
Diffstat (limited to 'list/src')
-rw-r--r-- | list/src/list.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/list/src/list.c b/list/src/list.c deleted file mode 100644 index f5b6507..0000000 --- a/list/src/list.c +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #include "list.h" | ||
2 | |||
3 | #include <assert.h> | ||
4 | |||
5 | void list_make(list* list, size_t size) { | ||
6 | if (size == 0) { | ||
7 | return; | ||
8 | } | ||
9 | assert(list); | ||
10 | for (size_t i = 0; i < size; ++i) { | ||
11 | list[i].prev = (i == 0 ? 0 : &list[i - 1]); | ||
12 | list[i].next = (i == size - 1 ? 0 : &list[i + 1]); | ||
13 | } | ||
14 | } | ||