void list_foo_print(struct _list *list)
{
  struct foo *f;
  struct _node *current;

  if(list==NULL)
    return;

  printf("===== struct foo =====\n");

  current = list->first;
  while(current){
    f = current->data;
    printf("foo : a = %d, b = %d, c = %d\n", f->a,f->b,f->c);
    current = current->next;
  }
}

struct _list *list_new()
{
  struct _list *list;
  if(list = malloc(sizeof(struct _list))){
    list->first = NULL;
    list->last = NULL;
  }
  return list;
}


void list_delete(struct _list *list)
{
  struct _node *next;
  struct _node *current;

  if(list==NULL)
    return;

  current = list->first;
  while(current){
    next = current->next;
    free(current);
    current = next;
  }
}