|
HTP
0.5
|
Go to the source code of this file.
Macros | |
| #define | htp_list_t htp_list_array_t |
| #define | htp_list_add htp_list_array_push |
| #define | htp_list_create htp_list_array_create |
| #define | htp_list_clear htp_list_array_clear |
| #define | htp_list_destroy htp_list_array_destroy |
| #define | htp_list_get htp_list_array_get |
| #define | htp_list_pop htp_list_array_pop |
| #define | htp_list_push htp_list_array_push |
| #define | htp_list_replace htp_list_array_replace |
| #define | htp_list_size htp_list_array_size |
| #define | htp_list_shift htp_list_array_shift |
Typedefs | |
| typedef struct htp_list_array_t | htp_list_array_t |
| typedef struct htp_list_linked_t | htp_list_linked_t |
Functions | |
| htp_list_array_t * | htp_list_array_create (size_t size) |
| void | htp_list_array_clear (htp_list_array_t *l) |
| void | htp_list_array_destroy (htp_list_array_t *l) |
| void * | htp_list_array_get (const htp_list_array_t *l, size_t idx) |
| void * | htp_list_array_pop (htp_list_array_t *l) |
| htp_status_t | htp_list_array_push (htp_list_array_t *l, void *e) |
| htp_status_t | htp_list_array_replace (htp_list_array_t *l, size_t idx, void *e) |
| size_t | htp_list_array_size (const htp_list_array_t *l) |
| void * | htp_list_array_shift (htp_list_array_t *l) |
| htp_list_linked_t * | htp_list_linked_create (void) |
| void | htp_list_linked_destroy (htp_list_linked_t *l) |
| int | htp_list_linked_empty (const htp_list_linked_t *l) |
| void * | htp_list_linked_pop (htp_list_linked_t *l) |
| htp_status_t | htp_list_linked_push (htp_list_linked_t *l, void *e) |
| void * | htp_list_linked_shift (htp_list_linked_t *l) |
| #define htp_list_add htp_list_array_push |
| #define htp_list_clear htp_list_array_clear |
| #define htp_list_create htp_list_array_create |
| #define htp_list_destroy htp_list_array_destroy |
| #define htp_list_get htp_list_array_get |
| #define htp_list_pop htp_list_array_pop |
| #define htp_list_push htp_list_array_push |
| #define htp_list_replace htp_list_array_replace |
| #define htp_list_shift htp_list_array_shift |
| #define htp_list_size htp_list_array_size |
| #define htp_list_t htp_list_array_t |
| typedef struct htp_list_array_t htp_list_array_t |
| typedef struct htp_list_linked_t htp_list_linked_t |
| void htp_list_array_clear | ( | htp_list_array_t * | l | ) |
Remove all elements from the list. It is the responsibility of the caller to iterate over list elements and deallocate them if necessary, prior to invoking this function.
| [in] | l |
| htp_list_array_t* htp_list_array_create | ( | size_t | size | ) |
Create new array-backed list.
| [in] | size |
| void htp_list_array_destroy | ( | htp_list_array_t * | l | ) |
Free the memory occupied by this list. This function assumes the elements held by the list were freed beforehand.
| [in] | l |
| void* htp_list_array_get | ( | const htp_list_array_t * | l, |
| size_t | idx | ||
| ) |
Find the element at the given index.
| [in] | l | |
| [in] | idx |
| void* htp_list_array_pop | ( | htp_list_array_t * | l | ) |
Remove one element from the end of the list.
| [in] | l |
| htp_status_t htp_list_array_push | ( | htp_list_array_t * | l, |
| void * | e | ||
| ) |
Add new element to the end of the list, expanding the list as necessary.
| [in] | l | |
| [in] | e |
| htp_status_t htp_list_array_replace | ( | htp_list_array_t * | l, |
| size_t | idx, | ||
| void * | e | ||
| ) |
Replace the element at the given index with the provided element.
| [in] | l | |
| [in] | idx | |
| [in] | e |
| void* htp_list_array_shift | ( | htp_list_array_t * | l | ) |
Remove one element from the beginning of the list.
| [in] | l |
| size_t htp_list_array_size | ( | const htp_list_array_t * | l | ) |
Returns the size of the list.
| [in] | l |
| htp_list_linked_t* htp_list_linked_create | ( | void | ) |
Create a new linked list.
| void htp_list_linked_destroy | ( | htp_list_linked_t * | l | ) |
Destroy list. This function will not destroy any of the data stored in it. You'll have to do that manually beforehand.
| [in] | l |
| int htp_list_linked_empty | ( | const htp_list_linked_t * | l | ) |
Is the list empty?
| [in] | l |
| void* htp_list_linked_pop | ( | htp_list_linked_t * | l | ) |
Remove one element from the end of the list.
| [in] | l |
| htp_status_t htp_list_linked_push | ( | htp_list_linked_t * | l, |
| void * | e | ||
| ) |
Add element to list.
| [in] | l | |
| [in] | e |
| void* htp_list_linked_shift | ( | htp_list_linked_t * | l | ) |
Remove one element from the beginning of the list.
| [in] | l |
1.8.9.1