home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / drdobbs / 1988 / 03 / mathews / mathews.ls1 next >
Text File  |  1979-12-31  |  768b  |  27 lines

  1.  
  2.  
  3.  
  4.  
  5. /*  001  23-Apr-87  tbtree.h
  6.  
  7.    Header file for threaded binary tree functions.
  8.  
  9.    This code is hereby placed into the public domain.
  10.  
  11. */
  12.  
  13. /* define TREE_NODE type */
  14.  
  15. typedef struct _tree_ent {
  16.    char *word;                 /* word ptr for this node    */
  17.    int usage;                  /* usage counter for word    */
  18.    int flags;                  /* word flags                */
  19.    struct _tree_ent *lchild;   /* thread or left child ptr  */
  20.    struct _tree_ent *rchild;   /* thread or right child ptr */
  21. } TREE_NODE;
  22.  
  23. /* define bit values for node flags */
  24.  
  25. #define RBIT (1)         /* right child if set, thread if 0 */
  26. #define LBIT (2)         /* left child if set, thread if 0  */
  27.