3 /* Copyright 1990, 1991, 1999 by the Massachusetts Institute of
6 * Permission to use, copy, modify, and distribute this
7 * software and its documentation for any purpose and without
8 * fee is hereby granted, provided that the above copyright
9 * notice appear in all copies and that both that copyright
10 * notice and this permission notice appear in supporting
11 * documentation, and that the name of M.I.T. not be used in
12 * advertising or publicity pertaining to distribution of the
13 * software without specific, written prior permission.
14 * M.I.T. makes no representations about the suitability of
15 * this software for any purpose. It is provided "as is"
16 * without express or implied warranty.
19 #ifndef AKLOG__LINKED_LIST_H
20 #define AKLOG__LINKED_LIST_H
25 typedef struct _ll_node
{
26 struct _ll_node
*prev
;
27 struct _ll_node
*next
;
37 typedef enum {ll_head
, ll_tail
} ll_end
;
40 /* ll_add_data just assigns the data field of node to be d. */
41 #define ll_add_data(n,d) (((n)->data)=(d))
43 void ll_init(linked_list
*list
);
44 ll_node
*ll_add_node(linked_list
*list
, ll_end which_end
);
45 int ll_delete_node(linked_list
*list
, ll_node
*node
);
46 int ll_string_check(linked_list
*, char *);
47 int ll_add_string(linked_list
*, char *);
49 #endif /* AKLOG__LINKED_LIST_H */