|
MGE General C Library - API Documentation v1.9.0
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. | |
| static struct dllistnode * | find_prev_dll_node (struct dllistnode *currentnode) |
| Find and return the previous node. | |
| static struct dllistnode * | find_next_dll_node (struct dllistnode *currentnode) |
| Find and return the next node. | |
| struct dllistnode * | free_dllist (struct dllistnode *currentnode) |
| Free the entire list. | |
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. |