home *** CD-ROM | disk | FTP | other *** search
/ Graphics Programming Black Book (Special Edition) / BlackBook.bin / disk1 / source / chapter15 / llist.h < prev   
Text File  |  1997-06-18  |  648b  |  20 lines

  1. /* Linked list header file. */
  2.  
  3. #define MAX_TEXT_LENGTH 100   /* longest allowed Text field */
  4. #define SENTINEL  32767       /* largest possible Value field */
  5.  
  6. struct LinkNode {
  7.    struct LinkNode *NextNode;
  8.    int Value;
  9.    char Text[MAX_TEXT_LENGTH+1];
  10.    /* Any number of additional data fields may by present */
  11. };
  12.     /* The first prototype needs to be changed to support
  13.        Listing 15-3.c */
  14. struct LinkNode *DeleteNodeAfter(struct LinkNode *);
  15. struct LinkNode *FindNodeBeforeValue(struct LinkNode *, int);
  16. struct LinkNode *InitLinkedList(void);
  17. struct LinkNode *InsertNodeSorted(struct LinkNode *,
  18.    struct LinkNode *);
  19.  
  20.