home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 347_01 / history.txt < prev    next >
Text File  |  1991-10-22  |  2KB  |  61 lines

  1. TAVLTREE REVISION HISTORY:
  2.  
  3. 18-feb-91  First version released.
  4.  
  5. 19-oct-91  1) TAVLtree library donated to the public domain.
  6.               Registration is no longer requested; comments
  7.               and feedback are.
  8.  
  9.            2) (Aug 31, 1991) Roberto Artigas, Jr. of Memphis, TN
  10.               informs me that some Standard C compilers do not
  11.               support signed bit fields.  Author BCH rewrote the
  12.               structure "TAVL_NODE" to accomodate this fact.  By
  13.               default, the flags "Lbit", "Rbit" and "bf" in
  14.               TAVL_NODE are now chars.  To use bit fields instead
  15.               of chars the library must be compiled with the variable
  16.               "TAVL_USE_BIT_FIELDS" defined, either as a command line
  17.               option ( -DTAVL_USE_BIT_FIELDS for Turbo C, Borland C++),
  18.               or by editing the header file TAVLTREE.H.
  19.  
  20.               The space savings gained by using bit fields must be
  21.               balanced against the more complex code emitted by the
  22.               compiler; users can make their own choice.
  23.  
  24.            3) File TAVL_INS.C: around line 73:
  25.  
  26.               changed
  27.  
  28.                  if (replace) {
  29.                    (*tree->free_item)(p->dataptr);
  30.                    p->dataptr = (*tree->make_item)(item);
  31.                  }
  32.  
  33.               to
  34.  
  35.                  if (replace) {
  36.                      void *temp = (*tree->make_item)(item);
  37.                      if (temp) {
  38.                          (*tree->free_item)(p->dataptr);
  39.                          p->dataptr = temp;
  40.                      }
  41.                      else p = NULL;
  42.                  }
  43.  
  44.               This change prevents tree from being corrupted if
  45.               there is insufficient dynamic memory to replace the
  46.               data item.
  47.  
  48.            4) File TAVLREBL.C: lines 93 - 95
  49.               Changed
  50.                 TAVL_nodeptr temp = c->Rptr;
  51.                 c->Rptr = a;
  52.                 a->Lptr = temp;
  53.               to
  54.                 a->Lptr = c->Rptr;
  55.                 c->Rptr = a;
  56.  
  57.               and a similar change at lines 154 - 156.  The temporary
  58.               variable is simply unnecessary in the new version.
  59.  
  60.   - Bert C. Hughes
  61.