From bfabb435e5c5bf313005c4636747fce59eb4ca6f Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Mon, 12 Jun 2023 08:52:15 -0700 Subject: Add list library. --- list/src/list.c | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 list/src/list.c (limited to 'list/src') 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 @@ -#include "list.h" - -#include - -void list_make(list* list, size_t size) { - if (size == 0) { - return; - } - assert(list); - for (size_t i = 0; i < size; ++i) { - list[i].prev = (i == 0 ? 0 : &list[i - 1]); - list[i].next = (i == size - 1 ? 0 : &list[i + 1]); - } -} -- cgit v1.2.3