/* Calls a function for each element of a #GSList.  */
void g_slist_foreach(GSList *list, GFunc func, gpointer user_data)
/* Calls a function for each element of a #GSList.  */
void g_slist_foreach(GSList *list, GFunc func, gpointer user_data)
{
  while (list)
    {
      GSList *next = list->next;
      (*func) (list->data, user_data);
      list = next;
    }
}