7 B<#include E<lt>inn/list.hE<gt>>
17 struct node *tailpred;
20 B<void list_new(struct list *>I<list>B<);>
22 B<struct node *list_addhead(struct list *>I<list>B<, struct node *>I<node>B<);>
24 B<struct node *list_addtail(struct list *>I<list>B<, struct node *>I<node>B<);>
26 B<struct node *list_head(struct list *>I<list>B<);>
28 B<struct node *list_tail(struct list *>I<list>B<);>
30 B<struct node *list_succ(struct node *>I<node>B<);>
32 B<struct node *list_pred(struct node *>I<node>B<);>
34 B<struct node *list_remhead(struct list *>I<list>B<);>
36 B<struct node *list_remtail(struct list *>I<list>B<);>
38 B<struct node *list_remove(struct node *>I<node>B<);>
40 B<struct node *list_insert(struct list *>I<list>B<, struct node *>I<node>B<, struct node *>I<pred>B<);>
42 B<bool list_isempty(struct list *>I<list>B<);>
46 B<list_new> initialises the list header I<list> so as to create an
49 B<list_addhead> adds I<node> to the head of I<list>, returning the node
52 B<list_addtail> adds I<node> to the tail of I<list>, returning the node
55 B<list_head> returns a pointer to the the node at the head of I<list>
56 or B<NULL> if the list is empty.
58 B<list_tail> returns a pointer to the the node at the tail of I<list>
59 or B<NULL> if the list is empty.
61 B<list_succ> returns the next (successor) node on the list after
62 I<node> or B<NULL> if I<node> was the final node.
64 B<list_pred> returns the previous (predecessor) node on the list before
65 I<node> or B<NULL> if I<node> was the first node.
67 B<list_remhead> removes the first node from I<list> and returns it to
68 the caller. If the list is empty B<NULL> is returned.
70 B<list_remtail> removes the last node from I<list> and returns it to
71 the caller. If the list is empty B<NULL> is returned.
73 B<list_remove> removes I<node> from the list it is on and returns it
76 B<list_insert> inserts I<node> onto I<list> after the node I<pred>. If
77 I<pred> is B<NULL> then I<node> is added to the head of I<list>.
81 Written by Alex Kiernan <alex.kiernan@thus.net> for InterNetNews 2.4.0.
83 $Id: list.pod 6168 2003-01-21 06:27:32Z alexk $