suffix_object(child->prev, item);
array->child->prev = item;
}
- else
- {
- while (child->next)
- {
- child = child->next;
- }
- suffix_object(child, item);
- array->child->prev = item;
- }
}
return true;
}
p = n;
}
+ a->child->prev = n;
return a;
}
}
p = n;
}
+ a->child->prev = n;
return a;
}
}
p = n;
}
+ a->child->prev = n;
return a;
}
}
p = n;
}
+ a->child->prev = n;
return a;
}
}
child = child->next;
}
+ if (newitem && newitem->child)
+ {
+ newitem->child->prev = newchild;
+ }
return newitem;
/* item doesn't exist */
return NULL;
}
- if (c->prev)
+ if (c != array->child)
{
/* not the first element */
c->prev->next = c->next;
{
c->next->prev = c->prev;
}
- if (c==array->child)
+ if (c == array->child)
{
array->child = c->next;
}
+ else if (c->next == NULL)
+ {
+ array->child->prev = c->prev;
+ }
/* make sure the detached item doesn't point anywhere anymore */
c->prev = c->next = NULL;