home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_11 / 8n11065a < prev    next >
Text File  |  1990-07-27  |  990b  |  26 lines

  1. /* list.h - List Management Header File
  2.  *          Copyright 1988-90 by Cnapse
  3.  *          Written by: M. de Champlain
  4.  */
  5.  
  6. typedef struct link
  7.             {
  8.             struct link  *previous;
  9.             struct link  *next;
  10.             } LINK;
  11.  
  12. extern void  *List_Allocate(word  theNumberOfNodes, word theNodeSize);
  13. extern void   List_Free(void *theList);
  14. extern void  *List_RemoveHead(void *fromTheList);
  15. extern void  *List_RemoveTail(void *fromTheList);
  16. extern void  *List_Remove(void *theNode);
  17. extern void   List_InsertHead(void *theNode, void *toTheList);
  18. extern void   List_InsertTail(void *theNode, void *toTheList);
  19. extern void   List_InsertAfter(void *theNode, void *afterThisNode);
  20. extern void   List_InsertBefore(void *theNode, void *beforeThisNode);
  21.  
  22. #define List_IsEmpty(theList)     ((bool)                       \
  23.                                    ( ((LINK *)theList) ==       \
  24.                                      ((LINK *)theList)->next )) \
  25.  
  26.