Functions | |
EAPI Evas_List * | evas_list_append (Evas_List *list, const void *data) |
Appends the given data to the given linked list. | |
EAPI Evas_List * | evas_list_prepend (Evas_List *list, const void *data) |
Prepends the given data to the given linked list. | |
EAPI Evas_List * | evas_list_append_relative (Evas_List *list, const void *data, const void *relative) |
Inserts the given data into the given linked list after the specified data. | |
EAPI Evas_List * | evas_list_prepend_relative (Evas_List *list, const void *data, const void *relative) |
Prepend a data pointer to a linked list before the memeber specified. |
Appends the given data to the given linked list.
The following example code demonstrates how to ensure that the given data has been successfully appended.
Evas_List *list = NULL; extern void *my_data; list = evas_list_append(list, my_data); if (evas_list_alloc_error()) { fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n"); exit(-1); }
list | The given list. If NULL is given, then a new list is created. | |
data | The data to append. |
EAPI Evas_List* evas_list_append_relative | ( | Evas_List * | list, | |
const void * | data, | |||
const void * | relative | |||
) |
Inserts the given data into the given linked list after the specified data.
If relative
is not in the list, data
is appended to the end of the list. If there are multiple instances of relative
in the list, data
is inserted after the first instance.
The following example code demonstrates how to ensure that the given data has been successfully inserted.
Evas_List *list = NULL; extern void *my_data; extern void *relative_member; list = evas_list_append(list, relative_member); if (evas_list_alloc_error()) { fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n"); exit(-1); } list = evas_list_append_relative(list, my_data, relative_member); if (evas_list_alloc_error()) { fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n"); exit(-1); }
list | The given linked list. | |
data | The given data. | |
relative | The data to insert after. |
Prepends the given data to the given linked list.
The following example code demonstrates how to ensure that the given data has been successfully prepended.
Example:
Evas_List *list = NULL; extern void *my_data; list = evas_list_prepend(list, my_data); if (evas_list_alloc_error()) { fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n"); exit(-1); }
list | The given list. | |
data | The given data. |
EAPI Evas_List* evas_list_prepend_relative | ( | Evas_List * | list, | |
const void * | data, | |||
const void * | relative | |||
) |
Prepend a data pointer to a linked list before the memeber specified.
list | The list handle to prepend data too | |
data | The data pointer to prepend to list list before relative | |
relative | The data pointer before which to insert data |
If relative
is not in the list, data
is prepended to the start of the list. If there are multiple instances of relative
in the list, data
is inserted before the first instance.
The following code example demonstrates how to ensure that the given data has been successfully inserted.
Evas_List *list = NULL; extern void *my_data; extern void *relative_member; list = evas_list_append(list, relative_member); if (evas_list_alloc_error()) { fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n"); exit(-1); } list = evas_list_prepend_relative(list, my_data, relative_member); if (evas_list_alloc_error()) { fprintf(stderr, "ERROR: Memory is low. List allocation failed.\n"); exit(-1); }
list | The given linked list. | |
data | The given data. | |
relative | The data to insert before. |