2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
6 #define RCS_LIST "$Id: list.h,v 2.3 1994/06/24 10:12:49 ceriel Exp $"
10 struct ca_elem *ca_next; /* The link */
11 char *ca_cont; /* The contents */
15 struct ca_elem *ca_first; /* The head */
16 struct ca_elem *ca_last; /* The tail */
19 typedef struct ca_list list_head ; /* The decl. for headers */
20 typedef struct ca_elem list_elem ; /* The decl. for elements */
25 #define l_first(header) (header).ca_first
26 #define l_next(elem) (elem).ca_next
27 #define l_content(elem) (elem).ca_cont
29 /* To be used for scanning lists, ptr is the running variable */
30 #define scanlist(elem,ptr) \
31 for ( ptr= elem ; ptr; ptr= l_next(*ptr) )