Subversion Repositories HelenOS

Rev

Rev 2431 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2431 Rev 2450
Line 82... Line 82...
82
    return NULL;
82
    return NULL;
83
}
83
}
84
                                   
84
                                   
85
/** Insert new node into ExtAVL tree.
85
/** Insert new node into ExtAVL tree.
86
 *
86
 *
87
 * New node's key must be set.
87
 * New node's key must be set - to that key will be added base (default 0).
88
 *
88
 *
89
 * @param t ExtAVL tree structure.
89
 * @param t ExtAVL tree structure.
90
 * @param newnode New node to be inserted.
90
 * @param newnode New node to be inserted.
91
 */
91
 */
92
void extavltree_insert(extavltree_t *t, extavltree_node_t *newnode)
92
void extavltree_insert(extavltree_t *t, extavltree_node_t *newnode)
Line 703... Line 703...
703
        dir = dir2;
703
        dir = dir2;
704
    }
704
    }
705
}
705
}
706
 
706
 
707
 
707
 
708
/** Delete node from ExtAVL tree with the smallest key and set base of tree to that key.
708
/** Delete node from ExtAVL tree with the smallest key.
709
 *
709
 *
710
 * @param t ExtAVL tree structure.
710
 * @param t ExtAVL tree structure.
711
 */
711
 */
712
bool extavltree_delete_min(extavltree_t *t)
712
bool extavltree_delete_min(extavltree_t *t)
713
{
713
{
Line 751... Line 751...
751
        /*
751
        /*
752
         * Special case of deleting last node with key equal 0.
752
         * Special case of deleting last node with key equal 0.
753
         */
753
         */
754
        t->root = NULL;
754
        t->root = NULL;
755
    }
755
    }
756
 
756
   
757
    /*
757
    /*
758
     * Delete node from the list.
758
     * Delete node from the list.
759
     */
759
     */
760
    t->head.next = expnode->next;
760
    t->head.next = expnode->next;
761
    expnode->next->prev = &t->head;
761
    expnode->next->prev = &t->head;