Commit 2bf30818 authored by Lenitra's avatar Lenitra
Browse files

fin des listes

parent b47579de
Loading
Loading
Loading
Loading
+7
Changes for src/list.c: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -72,6 +72,13 @@ void list_destroy(list_t l, void (*free_void)(void *))
// return the found element or NULL
void *list_in(list_t l, void *x, int (*eq)(void *, void *))
{
  while (!list_is_empty(l))
  {
    if (eq(x, l->val))
      return l->val;
    l = l->next;
  }
  return NULL;
}

unsigned long int list_len(list_t l)