=head1 NAME list - list routines =head1 SYNOPSIS B<#include Einn/list.hE> struct node { struct node *succ; struct node *pred; }; struct list { struct node *head; struct node *tail; struct node *tailpred; }; BIB<);> BIB<, struct node *>IB<);> BIB<, struct node *>IB<);> BIB<);> BIB<);> BIB<);> BIB<);> BIB<);> BIB<);> BIB<);> BIB<, struct node *>IB<, struct node *>IB<);> BIB<);> =head1 DESCRIPTION B initialises the list header I so as to create an empty list. B adds I to the head of I, returning the node just added. B adds I to the tail of I, returning the node just added. B returns a pointer to the the node at the head of I or B if the list is empty. B returns a pointer to the the node at the tail of I or B if the list is empty. B returns the next (successor) node on the list after I or B if I was the final node. B returns the previous (predecessor) node on the list before I or B if I was the first node. B removes the first node from I and returns it to the caller. If the list is empty B is returned. B removes the last node from I and returns it to the caller. If the list is empty B is returned. B removes I from the list it is on and returns it to the caller. B inserts I onto I after the node I. If I is B then I is added to the head of I. =head1 HISTORY Written by Alex Kiernan for InterNetNews 2.4.0. $Id: list.pod 6168 2003-01-21 06:27:32Z alexk $