MGE General C Library - Full Internal Documentation
v1.7.4
Library of general C functions.
|
Doubly linked list header file. More...
Go to the source code of this file.
Data Structures | |
struct | dllistnode |
Doubly linked list node. More... | |
Functions | |
struct dllistnode * | add_dll_node (struct dllistnode *currentnode, const void *object, size_t objsize) |
Add a node to the tail of the doubly linked list. More... | |
static struct dllistnode * | find_prev_dll_node (struct dllistnode *currentnode) |
Find and return the previous node. More... | |
static struct dllistnode * | find_next_dll_node (struct dllistnode *currentnode) |
Find and return the next node. More... | |
struct dllistnode * | free_dllist (struct dllistnode *currentnode) |
Free the entire list. More... | |
Doubly linked list header file.
Header file for doubly linked lists in the libmgec shared library.
Released under the GPLv3 only.
SPDX-License-Identifier: GPL-3.0-only
struct dllistnode* add_dll_node | ( | struct dllistnode * | currentnode, |
const void * | object, | ||
size_t | objsize | ||
) |
Add a node to the tail of the doubly linked list.
On error mge_errno will be set.
currentnode | A pointer to the first node or NULL if list not yet started. |
object | Object to be attached to the node. |
objsize | Size of object. |
|
inlinestatic |
Find and return the next node.
currentnode | The current node. |
|
inlinestatic |
Find and return the previous node.
currentnode | The current node. |
struct dllistnode* free_dllist | ( | struct dllistnode * | currentnode | ) |
Free the entire list.
Remove all nodes and free memory allocated to the dllist. Walks the list deleting nodes.
currentnode | The root node. |