#ifndef _LIST_H #define _LIST_H #include "node.h" // list relies on node to work #define DLL_SUCCESS 0 #define DLL_MALLOC_FAIL 1 #define DLL_ALREADY_ALLOC 2 #define DLL_NULL 4 #define DLL_EMPTY 8 #define DLL_DEFAULT_FAIL 64 #define DLL_FAIL 128 struct list { Node *first; // pointer to start of list Node *last; // pointer to end of list }; typedef struct list List; // because we deserve nice things int mklist (List **); // create/allocate new list struct int cplist (List *, List **); // duplicate list contents int insert (List **, Node *, Node *); // add node before given node int append (List **, Node *, Node *); // add node after given node int display(List *, int); // display list from start to end int find (List *, int, Node **); // locate node containing value #endif