Example #1
0
list_iterator_t *
list_iterator_new_from_node(list_node_t *node, list_direction_t direction) {
  list_iterator_t *self;
  if (!(self = LIST_MALLOC(sizeof(list_iterator_t))))
    return NULL;
  self->next = node;
  self->direction = direction;
  return self;
}
Example #2
0
File: list.c Project: brickbtv/CROS
list_t *
list_new() {
  list_t *self;
  if (!(self = LIST_MALLOC(sizeof(list_t))))
    return NULL;
  self->head = NULL;
  self->tail = NULL;
  self->free = NULL;
  self->match = NULL;
  self->len = 0;
  return self;
}