libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
gimbal_linked_list.h File Reference

Go to the source code of this file.

Data Structures

struct  GblLinkedListNode
 

Macros

#define GBL_LINKED_LIST_NPOS
 
#define GBL_LINKED_LIST_NODE_INITIALIZER()
 
#define GBL_LINKED_LIST_NODE(name)
 
#define GBL_LINKED_LIST_ENTRY(node, structure, field)
 

Typedefs

typedef int(* GblLinkedListCmpFn) (const void *pA, const void *pb, void *pClosure)
 

Functions

void GblLinkedList_init (GblLinkedListNode *pSelf)
 
void GblLinkedList_move (GblLinkedListNode *pSelf, GblLinkedListNode *pHead)
 
GblBool GblLinkedList_empty (const GblLinkedListNode *pSelf)
 
size_t GblLinkedList_count (const GblLinkedListNode *pSelf)
 
GblLinkedListNodeGblLinkedList_at (const GblLinkedListNode *pSelf, size_t index)
 
GblLinkedListNodeGblLinkedList_front (const GblLinkedListNode *pSelf)
 
GblLinkedListNodeGblLinkedList_back (const GblLinkedListNode *pSelf)
 
GblBool GblLinkedList_contains (const GblLinkedListNode *pSelf, GblLinkedListNode *pNode)
 
size_t GblLinkedList_find (const GblLinkedListNode *pSelf, GblLinkedListNode *PNode)
 
GblLinkedListNodeGblLinkedList_middle (const GblLinkedListNode *pSelf)
 
GblLinkedListNodeGblLinkedList_beforeMiddle (const GblLinkedListNode *pSelf)
 
void GblLinkedList_pushBack (GblLinkedListNode *pSelf, GblLinkedListNode *pNode)
 
void GblLinkedList_pushFront (GblLinkedListNode *pSelf, GblLinkedListNode *pNode)
 
void GblLinkedList_moveBack (GblLinkedListNode *pSelf, GblLinkedListNode *pNode)
 
void GblLinkedList_moveFront (GblLinkedListNode *pSelf, GblLinkedListNode *pNode)
 
void GblLinkedList_joinBack (GblLinkedListNode *pSelf, GblLinkedListNode *pList)
 
void GblLinkedList_joinFront (GblLinkedListNode *pSelf, GblLinkedListNode *pList)
 
void GblLinkedList_joinSorted (GblLinkedListNode *pSelf, GblLinkedListNode *pList, GblLinkedListCmpFn pCmpFn, void *pCl)
 
GblBool GblLinkedList_insert (GblLinkedListNode *pSelf, GblLinkedListNode *pNode, size_t index)
 
void GblLinkedList_insertAfter (GblLinkedListNode *pNode1, GblLinkedListNode *pNode2)
 
GblLinkedListNodeGblLinkedList_popBack (GblLinkedListNode *pSelf)
 
GblLinkedListNodeGblLinkedList_popFront (GblLinkedListNode *pSelf)
 
GblBool GblLinkedList_swap (GblLinkedListNode *pSelf, GblLinkedListNode *pNode1, GblLinkedListNode *pNode2)
 
GblBool GblLinkedList_remove (GblLinkedListNode *pSelf, GblLinkedListNode *pNode)
 
GblBool GblLinkedList_replace (GblLinkedListNode *pSelf, GblLinkedListNode *pNode1, GblLinkedListNode *pNode2)
 
void GblLinkedList_splitAfter (GblLinkedListNode *pSelf, GblLinkedListNode *pHead2, GblLinkedListNode *pAfter)
 
GblLinkedListNodeGblLinkedList_erase (GblLinkedListNode *pSelf, size_t index)
 
void GblLinkedList_clear (GblLinkedListNode *pSelf)
 
void GblLinkedList_mergeSort (GblLinkedListNode *pSelf, GblLinkedListCmpFn pCmpFn, void *pClosure)
 
void GblLinkedList_reverse (GblLinkedListNode *pSelf)
 

Detailed Description

GblLinkedListNode structure and related functions.

Todo:
  • GblLinkedList_insert(): insert into middle by index
  • GblLinkedList_insertAfter(): no list head required
  • Slick KOS/BSD-style macro for() looping over nodes
Author
Falco Girgis

Definition in file gimbal_linked_list.h.

Macro Definition Documentation

◆ GBL_LINKED_LIST_NPOS

#define GBL_LINKED_LIST_NPOS

Definition at line 17 of file gimbal_linked_list.h.

◆ GBL_LINKED_LIST_NODE_INITIALIZER

#define GBL_LINKED_LIST_NODE_INITIALIZER ( )

Definition at line 18 of file gimbal_linked_list.h.

◆ GBL_LINKED_LIST_NODE

#define GBL_LINKED_LIST_NODE (   name)

Definition at line 19 of file gimbal_linked_list.h.

◆ GBL_LINKED_LIST_ENTRY

#define GBL_LINKED_LIST_ENTRY (   node,
  structure,
  field 
)

Definition at line 20 of file gimbal_linked_list.h.

Typedef Documentation

◆ GblLinkedListCmpFn

typedef int(* GblLinkedListCmpFn) (const void *pA, const void *pb, void *pClosure)

Definition at line 24 of file gimbal_linked_list.h.