Evas_List_General_Group (3) - Linux Manuals
Evas_List_General_Group: Miscellaneous functions that work on linked lists.
NAME
Linked List General Functions - Miscellaneous functions that work on linked lists.
Functions
EAPI void * evas_list_data (const Evas_List *list)
Get the list node data member.
EAPI int evas_list_count (const Evas_List *list)
Get the count of the number of items in a list.
EAPI int evas_list_alloc_error (void)
Return the memory allocation failure flag after any operation needin allocation.
Detailed Description
Miscellaneous functions that work on linked lists.
Function Documentation
EAPI int evas_list_alloc_error (void)
Return the memory allocation failure flag after any operation needin allocation.
Returns:
- The state of the allocation flag
This function returns the state of the memory allocation flag. This flag is set if memory allocations during evas_list_append(), evas_list_prepend(), evas_list_append_relative(), or evas_list_prepend_relative() fail. If they do fail, 1 will be returned, otherwise 0 will be returned. The flag will remain in its current state until the next call that requires allocation is called, and is then reset.
Example:
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.); exit(-1); }
Get the count of the number of items in a list.
Parameters:
Returns:
This function returns how many members in the specified list: list. If the list is empty (NULL), 0 is returned.
NB: This is an order-1 operation and takes the same tiem regardless of the length of the list.
Example:
References _Evas_List::accounting.
Get the list node data member.
Parameters:
Returns:
This function returns the data member of the specified list node list. It is equivalent to list->data.
Example:
Generated automatically by Doxygen for Evas from the source code.
EAPI int evas_list_count (const Evas_List * list)
extern Evas_List *list;
printf('The list has %i members, evas_list_count(list));
EAPI void* evas_list_data (const Evas_List * list)
extern Evas_List *list;
Evas_List *l;
printf('The list:);
for (l = list; l; l = evas_list_next(l))
{
printf('%p, evas_list_data(l));
}
Author