Dillo v3.1.1-119-g140d9ebd
Loading...
Searching...
No Matches
klist.h File Reference
#include "../dlib/dlib.h"
Include dependency graph for klist.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  KlistNode_t
 
struct  Klist_t
 

Functions

void * a_Klist_get_data (Klist_t *Klist, int Key)
 Return the data pointer for a given Key (or NULL if not found)
 
int a_Klist_insert (Klist_t **Klist, void *Data)
 Insert a data pointer and return a key for it.
 
void a_Klist_remove (Klist_t *Klist, int Key)
 Remove data by Key.
 
int a_Klist_length (Klist_t *Klist)
 Return the number of elements in the Klist.
 
void a_Klist_free (Klist_t **Klist)
 Free a Klist.
 

Function Documentation

◆ a_Klist_free()

void a_Klist_free ( Klist_t **  Klist)

Free a Klist.

Definition at line 110 of file klist.c.

References dFree(), dList_free(), dList_length(), dList_nth_data(), dList_remove_fast(), and Klist_t::List.

Referenced by a_Http_freeall().

◆ a_Klist_get_data()

◆ a_Klist_insert()

int a_Klist_insert ( Klist_t **  Klist,
void *  Data 
)

Insert a data pointer and return a key for it.

Definition at line 56 of file klist.c.

References a_Klist_get_data(), KlistNode_t::Data, dList_insert_sorted(), dList_new(), dNew, KlistNode_t::Key, and Klist_node_by_node_cmp().

Referenced by Dpi_conn_new(), Http_sock_new(), IO_ins(), Tls_conn_new(), and Tls_make_conn_key().

◆ a_Klist_length()

int a_Klist_length ( Klist_t Klist)

Return the number of elements in the Klist.

Definition at line 102 of file klist.c.

References dList_length(), and Klist_t::List.

Referenced by IO_del(), and IO_ins().

◆ a_Klist_remove()

void a_Klist_remove ( Klist_t Klist,
int  Key 
)