Changeset 3212 for trunk/tools/fastdep/avl.c
- Timestamp:
- Mar 24, 2000, 2:40:52 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/fastdep/avl.c
r3129 r3212 1 /* $Id: avl.c,v 1. 1 2000-03-16 21:10:10bird Exp $1 /* $Id: avl.c,v 1.2 2000-03-24 01:40:52 bird Exp $ 2 2 * 3 3 * AVL-Tree (lookalike) implementation. … … 93 93 { 94 94 assert(AVLStack.cEntries < AVL_MAX_HEIGHT); 95 assert(pNode != pCurNode); 95 96 AVLStack.aEntries[AVLStack.cEntries++] = ppCurNode; 97 #ifdef AVL_MAY_TRY_INSERT_EQUAL 98 /* check if equal */ 99 if (AVL_E(pCurNode->Key, Key)) 100 return FALSE; 101 #endif 96 102 if (AVL_G(pCurNode->Key, Key)) 97 103 ppCurNode = &pCurNode->pLeft; … … 99 105 ppCurNode = &pCurNode->pRight; 100 106 } 101 102 #ifdef AVL_MAY_TRY_INSERT_EQUAL103 /* check if equal */104 if (AVLStack.cEntries > 0 && AVL_E((*AVLStack.aEntries[AVLStack.cEntries-1])->Key, pNode->Key))105 return FALSE;106 #endif107 107 108 108 pNode->pLeft = pNode->pRight = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.