Linked List Remove Functions

Functions that remove data from linked lists. More...

Functions

Evas_Listevas_list_remove (Evas_List *list, const void *data)
 Removes the first instance of the specified data from the given list.
Evas_Listevas_list_remove_list (Evas_List *list, Evas_List *remove_list)
 Removes the specified data.
Evas_Listevas_list_free (Evas_List *list)
 Free an entire list and all the nodes, ignoring the data contained.

Detailed Description

Functions that remove data from linked lists.


Function Documentation

Evas_List* evas_list_free Evas_List list  ) 
 

Free an entire list and all the nodes, ignoring the data contained.

Parameters:
list The list to free
Returns:
A NULL pointer
This function will free all the list nodes in list specified by list.

Example:

 extern Evas_List *list;

 list = evas_list_free(list);

Evas_List* evas_list_remove Evas_List list,
const void *  data
 

Removes the first instance of the specified data from the given list.

If the specified data is not in the given list, nothing is done.

Parameters:
list The given list.
data The specified data.
Returns:
A new list pointer that should be used in place of the one passed to this functions.

Evas_List* evas_list_remove_list Evas_List list,
Evas_List remove_list
 

Removes the specified data.

Remove a specified member from a list

Parameters:
list The list handle to remove remove_list from
remove_list The list node which is to be removed
Returns:
A new list handle to replace the old one
Calling this function takes the list note remove_list and removes it from the list list, freeing the list node structure remove_list.

Example:

 extern Evas_List *list;
 Evas_List *l;
 extern void *my_data;

 for (l = list; l; l= l->next)
   {
     if (l->data == my_data)
       {
         list = evas_list_remove_list(list, l);
         break;
       }
   }