/* Header file for node structure.
   Written by: Nadeem Abdul Hamid
   Date: 9/5/2006
*/

/* Data structures */
typedef struct node
{
  void* pdata;
  struct node* pnext;
} NODE;

typedef NODE* LIST;

#define EMPTYLIST 0


/* Functions */
NODE* createNode (void* itemPtr);
LIST insertNode(NODE* np, LIST l);


void printList(LIST l);
void applyToList(LIST l, void (*nodeFunc)(NODE*));

int lengthList(LIST l);
LIST bubbleSort(LIST l, int (*comp)(void*, void*));

