4 * This is the header file for a general list linked package.
6 * Copyright 1990,1991 by the Massachusetts Institute of Technology
7 * For distribution and copying rights, see the file "mit-copyright.h"
10 #ifndef __LINKED_LIST_H__
11 #define __LINKED_LIST_H__
16 typedef struct _ll_node {
17 struct _ll_node *prev;
18 struct _ll_node *next;
28 typedef enum {ll_head, ll_tail} ll_end;
29 typedef enum {ll_s_add, ll_s_check} ll_s_action;
33 * ll_add_data just assigns the data field of node to be d.
34 * If this were c++, this would be an inline function and d
35 * would be a void *, but we'll take what we can get...
37 #define ll_add_data(n,d) (((n)->data)=(char*)(d))
41 void ll_init(linked_list *list);
42 ll_node *ll_add_node(linked_list *list, ll_end which_end);
43 int ll_delete_node(linked_list *list, ll_node *node);
44 int ll_string(linked_list *, ll_s_action, char *);
49 ll_node *ll_add_node();
55 #endif /* __LINKED_LIST_H__ */