Lines Matching refs:root
85 *root; member
165 if (splay_tree->root != (NodeInfo *) NULL) in AddValueToSplayTree()
168 compare=splay_tree->compare(splay_tree->root->key,key); in AddValueToSplayTree()
170 compare=(splay_tree->root->key > key) ? 1 : in AddValueToSplayTree()
171 ((splay_tree->root->key < key) ? -1 : 0); in AddValueToSplayTree()
175 (splay_tree->root->value != (void *) NULL)) in AddValueToSplayTree()
176 splay_tree->root->value=splay_tree->relinquish_value( in AddValueToSplayTree()
177 splay_tree->root->value); in AddValueToSplayTree()
179 (splay_tree->root->key != (void *) NULL)) in AddValueToSplayTree()
180 splay_tree->root->key=splay_tree->relinquish_key( in AddValueToSplayTree()
181 splay_tree->root->key); in AddValueToSplayTree()
182 splay_tree->root->key=(void *) key; in AddValueToSplayTree()
183 splay_tree->root->value=(void *) value; in AddValueToSplayTree()
196 if (splay_tree->root == (NodeInfo *) NULL) in AddValueToSplayTree()
204 node->left=splay_tree->root; in AddValueToSplayTree()
210 node->right=splay_tree->root; in AddValueToSplayTree()
214 splay_tree->root=node; in AddValueToSplayTree()
297 splay_tree->root=LinkSplayTreeNodes(nodes,0,splay_tree->nodes-1); in BalanceSplayTree()
337 node=splay_tree->root; in GetFirstSplayTreeNode()
338 if (splay_tree->root == (NodeInfo *) NULL) in GetFirstSplayTreeNode()
362 if (splay_tree->root == (NodeInfo *) NULL) in CloneSplayTree()
371 (void) AddValueToSplayTree(clone_tree,clone_key(splay_tree->root->key), in CloneSplayTree()
372 clone_value(splay_tree->root->value)); in CloneSplayTree()
374 node=splay_tree->root->right; in CloneSplayTree()
497 if (splay_tree->root == (NodeInfo *) NULL) in DeleteNodeByValueFromSplayTree()
507 node=splay_tree->root->right; in DeleteNodeByValueFromSplayTree()
514 if (splay_tree->root->value == value) in DeleteNodeByValueFromSplayTree()
529 key=splay_tree->root->key; in DeleteNodeByValueFromSplayTree()
533 compare=splay_tree->compare(splay_tree->root->key,key); in DeleteNodeByValueFromSplayTree()
535 compare=(splay_tree->root->key > key) ? 1 : in DeleteNodeByValueFromSplayTree()
536 ((splay_tree->root->key < key) ? -1 : 0); in DeleteNodeByValueFromSplayTree()
542 left=splay_tree->root->left; in DeleteNodeByValueFromSplayTree()
543 right=splay_tree->root->right; in DeleteNodeByValueFromSplayTree()
545 (splay_tree->root->value != (void *) NULL)) in DeleteNodeByValueFromSplayTree()
546 splay_tree->root->value=splay_tree->relinquish_value( in DeleteNodeByValueFromSplayTree()
547 splay_tree->root->value); in DeleteNodeByValueFromSplayTree()
549 (splay_tree->root->key != (void *) NULL)) in DeleteNodeByValueFromSplayTree()
550 splay_tree->root->key=splay_tree->relinquish_key( in DeleteNodeByValueFromSplayTree()
551 splay_tree->root->key); in DeleteNodeByValueFromSplayTree()
552 splay_tree->root=(NodeInfo *) RelinquishMagickMemory(splay_tree->root); in DeleteNodeByValueFromSplayTree()
556 splay_tree->root=right; in DeleteNodeByValueFromSplayTree()
560 splay_tree->root=left; in DeleteNodeByValueFromSplayTree()
616 if (splay_tree->root == (NodeInfo *) NULL) in DeleteNodeFromSplayTree()
622 compare=splay_tree->compare(splay_tree->root->key,key); in DeleteNodeFromSplayTree()
624 compare=(splay_tree->root->key > key) ? 1 : in DeleteNodeFromSplayTree()
625 ((splay_tree->root->key < key) ? -1 : 0); in DeleteNodeFromSplayTree()
631 left=splay_tree->root->left; in DeleteNodeFromSplayTree()
632 right=splay_tree->root->right; in DeleteNodeFromSplayTree()
634 (splay_tree->root->value != (void *) NULL)) in DeleteNodeFromSplayTree()
635 splay_tree->root->value=splay_tree->relinquish_value( in DeleteNodeFromSplayTree()
636 splay_tree->root->value); in DeleteNodeFromSplayTree()
638 (splay_tree->root->key != (void *) NULL)) in DeleteNodeFromSplayTree()
639 splay_tree->root->key=splay_tree->relinquish_key(splay_tree->root->key); in DeleteNodeFromSplayTree()
640 splay_tree->root=(NodeInfo *) RelinquishMagickMemory(splay_tree->root); in DeleteNodeFromSplayTree()
644 splay_tree->root=right; in DeleteNodeFromSplayTree()
648 splay_tree->root=left; in DeleteNodeFromSplayTree()
691 if (splay_tree->root != (NodeInfo *) NULL) in DestroySplayTree()
694 (splay_tree->root->value != (void *) NULL)) in DestroySplayTree()
695 splay_tree->root->value=splay_tree->relinquish_value( in DestroySplayTree()
696 splay_tree->root->value); in DestroySplayTree()
698 (splay_tree->root->key != (void *) NULL)) in DestroySplayTree()
699 splay_tree->root->key=splay_tree->relinquish_key(splay_tree->root->key); in DestroySplayTree()
700 splay_tree->root->key=(void *) NULL; in DestroySplayTree()
701 for (pend=splay_tree->root; pend != (NodeInfo *) NULL; ) in DestroySplayTree()
780 if ((splay_tree->root == (NodeInfo *) NULL) || in GetNextKeyInSplayTree()
786 node=splay_tree->root->right; in GetNextKeyInSplayTree()
793 key=splay_tree->root->key; in GetNextKeyInSplayTree()
834 if ((splay_tree->root == (NodeInfo *) NULL) || in GetNextValueInSplayTree()
840 node=splay_tree->root->right; in GetNextValueInSplayTree()
847 value=splay_tree->root->value; in GetNextValueInSplayTree()
892 if (splay_tree->root == (NodeInfo *) NULL) in GetValueFromSplayTree()
897 compare=splay_tree->compare(splay_tree->root->key,key); in GetValueFromSplayTree()
899 compare=(splay_tree->root->key > key) ? 1 : in GetValueFromSplayTree()
900 ((splay_tree->root->key < key) ? -1 : 0); in GetValueFromSplayTree()
906 value=splay_tree->root->value; in GetValueFromSplayTree()
1003 if (splay_tree->root == (NodeInfo *) NULL) in IterateOverSplayTree()
1013 nodes[0]=splay_tree->root; in IterateOverSplayTree()
1110 splay_tree->root=(NodeInfo *) NULL; in NewSplayTree()
1165 if (splay_tree->root == (NodeInfo *) NULL) in RemoveNodeByValueFromSplayTree()
1173 node=splay_tree->root->right; in RemoveNodeByValueFromSplayTree()
1180 if (splay_tree->root->value == value) in RemoveNodeByValueFromSplayTree()
1192 key=splay_tree->root->key; in RemoveNodeByValueFromSplayTree()
1196 compare=splay_tree->compare(splay_tree->root->key,key); in RemoveNodeByValueFromSplayTree()
1198 compare=(splay_tree->root->key > key) ? 1 : in RemoveNodeByValueFromSplayTree()
1199 ((splay_tree->root->key < key) ? -1 : 0); in RemoveNodeByValueFromSplayTree()
1205 left=splay_tree->root->left; in RemoveNodeByValueFromSplayTree()
1206 right=splay_tree->root->right; in RemoveNodeByValueFromSplayTree()
1208 (splay_tree->root->value != (void *) NULL)) in RemoveNodeByValueFromSplayTree()
1209 splay_tree->root->value=splay_tree->relinquish_value( in RemoveNodeByValueFromSplayTree()
1210 splay_tree->root->value); in RemoveNodeByValueFromSplayTree()
1211 splay_tree->root=(NodeInfo *) RelinquishMagickMemory(splay_tree->root); in RemoveNodeByValueFromSplayTree()
1215 splay_tree->root=right; in RemoveNodeByValueFromSplayTree()
1219 splay_tree->root=left; in RemoveNodeByValueFromSplayTree()
1277 if (splay_tree->root == (NodeInfo *) NULL) in RemoveNodeFromSplayTree()
1283 compare=splay_tree->compare(splay_tree->root->key,key); in RemoveNodeFromSplayTree()
1285 compare=(splay_tree->root->key > key) ? 1 : in RemoveNodeFromSplayTree()
1286 ((splay_tree->root->key < key) ? -1 : 0); in RemoveNodeFromSplayTree()
1292 left=splay_tree->root->left; in RemoveNodeFromSplayTree()
1293 right=splay_tree->root->right; in RemoveNodeFromSplayTree()
1294 value=splay_tree->root->value; in RemoveNodeFromSplayTree()
1296 (splay_tree->root->key != (void *) NULL)) in RemoveNodeFromSplayTree()
1297 splay_tree->root->key=splay_tree->relinquish_key(splay_tree->root->key); in RemoveNodeFromSplayTree()
1298 splay_tree->root=(NodeInfo *) RelinquishMagickMemory(splay_tree->root); in RemoveNodeFromSplayTree()
1302 splay_tree->root=right; in RemoveNodeFromSplayTree()
1306 splay_tree->root=left; in RemoveNodeFromSplayTree()
1354 if (splay_tree->root != (NodeInfo *) NULL) in ResetSplayTree()
1357 (splay_tree->root->value != (void *) NULL)) in ResetSplayTree()
1358 splay_tree->root->value=splay_tree->relinquish_value( in ResetSplayTree()
1359 splay_tree->root->value); in ResetSplayTree()
1361 (splay_tree->root->key != (void *) NULL)) in ResetSplayTree()
1362 splay_tree->root->key=splay_tree->relinquish_key(splay_tree->root->key); in ResetSplayTree()
1363 splay_tree->root->key=(void *) NULL; in ResetSplayTree()
1364 for (pend=splay_tree->root; pend != (NodeInfo *) NULL; ) in ResetSplayTree()
1400 splay_tree->root=(NodeInfo *) NULL; in ResetSplayTree()
1568 if (splay_tree->root == (NodeInfo *) NULL) in SplaySplayTree()
1576 compare=splay_tree->compare(splay_tree->root->key,key); in SplaySplayTree()
1583 (void) Splay(splay_tree,0UL,key,&splay_tree->root,(NodeInfo **) NULL, in SplaySplayTree()
1588 (void) Splay(splay_tree,0UL,key,&splay_tree->root,(NodeInfo **) NULL, in SplaySplayTree()