Ignore:
Timestamp:
Nov 1, 2001, 6:43:18 PM (24 years ago)
Author:
umoeller
Message:

More updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/tree.c

    r113 r116  
    285285 *      initializes the root of a tree.
    286286 *
     287 *      If (plCount != NULL), *plCount is set to null also.
     288 *      This same plCount pointer can then be passed to
     289 *      treeInsert and treeDelete also to automatically
     290 *      maintain a tree item count.
     291 *
    287292 *@@changed V0.9.16 (2001-10-19) [umoeller]: added plCount
    288293 */
     
    509514 *      "x" specifies the new tree node which must
    510515 *      have been allocated by the caller. x->ulKey
    511  *      must already contain the node's key (data).
     516 *      must already contain the node's key (data)
     517 *      which the sort function can understand.
     518 *
    512519 *      This function will then set the parent,
    513  *      left, right, and color members.
     520 *      left, right, and color members. In addition,
     521 *      if (plCount != NULL), *plCount is raised by
     522 *      one.
    514523 *
    515524 *      Returns 0 if no error. Might return
     
    521530
    522531int treeInsert(TREE **root,                     // in: root of the tree
    523                PLONG plCount,                 // in/out: item count (ptr can be NULL)
     532               PLONG plCount,                   // in/out: item count (ptr can be NULL)
    524533               TREE *x,                         // in: new node to insert
    525534               FNTREE_COMPARE *pfnCompare)      // in: comparison func
     
    750759 *      Does not free() the node though.
    751760 *
     761 *      In addition, if (plCount != NULL), *plCount is
     762 *      decremented.
     763 *
    752764 *      Returns 0 if the node was deleted or
    753765 *      STATUS_INVALID_NODE if not.
     
    757769
    758770int treeDelete(TREE **root,         // in: root of the tree
    759                PLONG plCount,     // in/out: item count (ptr can be NULL)
     771               PLONG plCount,       // in/out: item count (ptr can be NULL)
    760772               TREE *tree)          // in: tree node to delete
    761773{
Note: See TracChangeset for help on using the changeset viewer.