#include "htp_core.h"
#include "bstr.h"
Go to the source code of this file.
§ htp_list_add
§ htp_list_clear
§ htp_list_create
§ htp_list_destroy
§ htp_list_get
§ htp_list_pop
§ htp_list_push
§ htp_list_replace
§ htp_list_shift
§ htp_list_size
§ htp_list_t
§ htp_list_array_t
§ htp_list_linked_t
§ htp_list_array_clear()
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.
- Parameters
-
§ htp_list_array_create()
Create new array-backed list.
- Parameters
-
- Returns
- Newly created list.
§ htp_list_array_destroy()
Free the memory occupied by this list. This function assumes the elements held by the list were freed beforehand.
- Parameters
-
§ htp_list_array_get()
Find the element at the given index.
- Parameters
-
- Returns
- the desired element, or NULL if the list is too small, or if the element at that position carries a NULL
§ htp_list_array_pop()
Remove one element from the end of the list.
- Parameters
-
- Returns
- The removed element, or NULL if the list is empty.
§ htp_list_array_push()
Add new element to the end of the list, expanding the list as necessary.
- Parameters
-
- Returns
- HTP_OK on success or HTP_ERROR on failure.
§ htp_list_array_replace()
Replace the element at the given index with the provided element.
- Parameters
-
- Returns
- HTP_OK if an element with the given index was replaced; HTP_ERROR if the desired index does not exist.
§ htp_list_array_shift()
Remove one element from the beginning of the list.
- Parameters
-
- Returns
- The removed element, or NULL if the list is empty.
§ htp_list_array_size()
Returns the size of the list.
- Parameters
-
- Returns
- List size.
§ htp_list_linked_create()
Create a new linked list.
- Returns
- The newly created list, or NULL on memory allocation failure
§ htp_list_linked_destroy()
Destroy list. This function will not destroy any of the data stored in it. You'll have to do that manually beforehand.
- Parameters
-
§ htp_list_linked_empty()
Is the list empty?
- Parameters
-
- Returns
- 1 if the list is empty, 0 if it is not
§ htp_list_linked_pop()
Remove one element from the end of the list.
- Parameters
-
- Returns
- Pointer to the removed element, or NULL if the list is empty.
§ htp_list_linked_push()
Add element to list.
- Parameters
-
- Returns
- HTP_OK on success, HTP_ERROR on error.
§ htp_list_linked_shift()
Remove one element from the beginning of the list.
- Parameters
-
- Returns
- Pointer to the removed element, or NULL if the list is empty.