Refactored.

This commit is contained in:
2021-04-22 13:55:34 +10:00
parent c10754f31b
commit f7c1380f06
62 changed files with 1033 additions and 1391 deletions

31
include/dawn/util/list.h Normal file
View File

@ -0,0 +1,31 @@
// Copyright (c) 2021 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "../libs.h"
/**
* Entry within a given linked list.
* @param data* The pointer to the data that is within the entry.
* @param prev* Pointer to the previous entry in the list.
* @param next* Pointer to the next entry in the list.
*/
typedef struct listentry_t {
void *data;
struct listentry_t *prev;
struct listentry_t *next;
} listentry_t;
/**
* Linked List of elements, Doubly Linked.
* @param size The count of elements currently within the list
* @param start* First element within the list.
* @param end* Last element within the list.
*/
typedef struct {
uint32_t size;
listentry_t *start;
listentry_t *end;
} list_t;