This module provides several utilities function and data structure to represent and handle efficiently data of the ELF files.
◆ gel_list_add()
Add an element to the list (without adding two times the same element).
- Parameters
-
| desc | List to add to. |
| val | Value to add. |
- Returns
- 0 for success, -1 if there is no more memory.
◆ gel_list_clear()
Remove all elements from the list.
- Parameters
-
◆ gel_list_contains()
| int gel_list_contains |
( |
gel_list_t |
desc, |
|
|
void * |
val |
|
) |
| |
Test if an element is in the list.
- Parameters
-
| desc | List to look in. |
| val | Looked item. |
- Returns
- 1 if the item is in, 0 else.
◆ gel_list_delete()
Delete the list.
- Parameters
-
◆ gel_list_delete_items()
| void gel_list_delete_items |
( |
gel_list_t |
desc, |
|
|
void(*)(void *) |
free_func |
|
) |
| |
Delete the items of the list with the given function.
- Parameters
-
| desc | List to clear. |
| free_func | Function used to delete the items. |
◆ gel_list_empty()
Test if a list is empty.
- Parameters
-
- Returns
- 1 if the list is empty, false.
◆ gel_list_end()
Test if the end of the list is reached.
- Parameters
-
- Returns
- 1 if the end is reached, 0 else.
◆ gel_list_first()
Move to the start of the list.
- Parameters
-
◆ gel_list_get()
Get the value of the current element of the list. Then go to the next element.
- Parameters
-
| desc | List to get element of. |
- Returns
- Got element or null (if at end).
◆ gel_list_length()
Get the length (number of elements) in the list.
- Parameters
-
| desc | List to get length of. |
- Returns
- List length.
◆ gel_list_new()
Build a new linked list.
- Returns
- New list or null.
◆ gel_list_remove()
| int gel_list_remove |
( |
gel_list_t |
desc, |
|
|
void * |
val |
|
) |
| |
Remove an element from the list.
- Parameters
-
| desc | List to remove from. |
| val | Element to remove. |
- Returns
- 1 if the element is in the list, 0 else.