TAVLTREE REVISION HISTORY: 18-feb-91 First version released. 19-oct-91 1) TAVLtree library donated to the public domain. Registration is no longer requested; comments and feedback are. 2) (Aug 31, 1991) Roberto Artigas, Jr. of Memphis, TN informs me that some Standard C compilers do not support signed bit fields. Author BCH rewrote the structure "TAVL_NODE" to accomodate this fact. By default, the flags "Lbit", "Rbit" and "bf" in TAVL_NODE are now chars. To use bit fields instead of chars the library must be compiled with the variable "TAVL_USE_BIT_FIELDS" defined, either as a command line option ( -DTAVL_USE_BIT_FIELDS for Turbo C, Borland C++), or by editing the header file TAVLTREE.H. The space savings gained by using bit fields must be balanced against the more complex code emitted by the compiler; users can make their own choice. 3) File TAVL_INS.C: around line 73: changed if (replace) { (*tree->free_item)(p->dataptr); p->dataptr = (*tree->make_item)(item); } to if (replace) { void *temp = (*tree->make_item)(item); if (temp) { (*tree->free_item)(p->dataptr); p->dataptr = temp; } else p = NULL; } This change prevents tree from being corrupted if there is insufficient dynamic memory to replace the data item. 4) File TAVLREBL.C: lines 93 - 95 Changed TAVL_nodeptr temp = c->Rptr; c->Rptr = a; a->Lptr = temp; to a->Lptr = c->Rptr; c->Rptr = a; and a similar change at lines 154 - 156. The temporary variable is simply unnecessary in the new version. - Bert C. Hughes