#ifndef _LIST_H #define _LIST_H #include "node.h" // list relies on node to work struct list { Node *start; // pointer to start of list Node *end; // pointer to end of list }; typedef struct list List; // because we deserve nice things List *mklist(void ); // create/allocate new list struct List *cplist(List *); // copy (duplicate) list List *rmlist(List *); // remove all nodes from list List *insert (List *, Node *, Node *); // add node before given node List *append (List *, Node *, Node *); // add node after given node List *obtain (List *, Node ** ); // obtain/disconnect node from list void display(List *, int); // display list according to mode Node *findnode(List *, int); // locate node containing value List *sortlist(List *, int); // sort list (according to mode) List *swapnode(List *, Node *, Node *); // swap positions of given nodes in list #endif