return list;
}
+GList*
+g_list_remove_all (GList *list, gconstpointer data)
+{
+ GList *current = g_list_find (list, data);
+
+ if (!current)
+ return list;
+
+ while (current) {
+ if (current == list)
+ list = list->next;
+ g_list_free_1 (disconnect_node (current));
+
+ current = g_list_find (list, data);
+ }
+
+ return list;
+}
+
GList*
g_list_remove_link (GList *list, GList *link)
{
return NULL;
}
+GList*
+g_list_find_custom (GList *list, gconstpointer data, GCompareFunc func)
+{
+ if (!func)
+ return NULL;
+
+ while (list) {
+ if (func (list->data, data) == 0)
+ return list;
+
+ list = list->next;
+ }
+
+ return NULL;
+}
+
GList*
g_list_reverse (GList *list)
{
{
GList *prev = NULL;
GList *current;
-
+ GList *node;
+
if (!func)
return list;
prev = current;
}
- GList *node = new_node (prev, data, current);
+ node = new_node (prev, data, current);
return list == current ? node : list;
}