#include <assert.h>
#include <stdlib.h>
Go to the source code of this file.
◆ new_numlist()
struct NumList* new_numlist |
( |
void |
| ) |
|
Return a new decimal linked list.
◆ new_ptrlist()
struct PtrList* new_ptrlist |
( |
size_t |
type | ) |
|
Return a new pointer list of specified enumerated type.
◆ numlist_clear()
void numlist_clear |
( |
struct NumList * |
list | ) |
|
Free all nodes in list and reset list head and tail to null.
◆ numlist_free()
void numlist_free |
( |
struct NumList * |
list | ) |
|
Clear list then free the list.
◆ numlist_pushback()
void numlist_pushback |
( |
struct NumList * |
list, |
|
|
double |
val |
|
) |
| |
Append val to linked list.
◆ ptrlist_clear()
void ptrlist_clear |
( |
struct PtrList * |
list, |
|
|
void(*)(void *) |
val_mgr |
|
) |
| |
Frees all node in list and reset list head and tail to null Before freeing for every pointer value x in list call val_mgr(x) if val_mgr is not null
◆ ptrlist_free()
void ptrlist_free |
( |
struct PtrList * |
list, |
|
|
void(*)(void *) |
val_mgr |
|
) |
| |
Clear the list using val_mgr, then free the list.
◆ ptrlist_pushback()
void ptrlist_pushback |
( |
struct PtrList * |
list, |
|
|
void * |
val |
|
) |
| |
Append the pointer to the list.