126 #define NIL_LIST (LIST) 0
138 #define list_rest(l) ((l) ? (l)->next : NIL_LIST)
139 #define first_node(l) ((l) ? (l)->node : NIL_LIST)
149 #define copy_first(l1,l2) \
150 (l2=push(l2, first_node(l1)))
160 for (; (l) != NIL_LIST; (l) = list_rest (l))
170 #define iterate_list(x,l) \
171 for ((x)=(l); (x)!=0; (x)=list_rest(x))
180 #define JOIN_ON(list1,list2) \
181 ((list1) = join ((list1), (list2)))
190 #define pop_off(list) \
191 ((list) = pop (list))
200 #define push_on(list,thing) \
201 ((list) = push (list, (LIST) (thing)))
211 #define second_node(l) \
212 first_node (list_rest (l))
222 #define set_rest(l,cell)\
234 first_node (list_rest (list_rest (l)))
254 int is_same(
void *item1,
void *item2);
LIST push_last(LIST list, void *item)
int is_same_node(void *item1, void *item2)
int(* int_compare)(void *, void *)
void insert(LIST list, void *node)
LIST join(LIST list1, LIST list2)
LIST search(LIST list, void *key, int_compare is_equal)
void destroy_nodes(LIST list, void_dest destructor)
LIST s_adjoin(LIST var_list, void *variable, int_compare compare)
LIST delete_d(LIST list, void *key, int_compare is_equal)
int is_same(void *item1, void *item2)
LIST reverse_d(LIST list)
void(* void_dest)(void *)
LIST push(LIST list, void *element)
void * nth_cell(LIST var_list, int item_num)