2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2015 Joyent, Inc.
19 .Nd find the nearest node in an AVL tree
25 .Fa "avl_tree_t *tree"
26 .Fa "avl_index_t where"
32 function returns the closest node in
34 before or after the insertion point specified by
41 pointer is passed in to the
45 and it fails to find an entry in the tree.
51 then the node that would logically have followed it will be returned. If
55 then the node that would have logically preceded it is returned.
57 When there is no nearest node, for example,
59 is specified and the entry would have been the last node in the tree,
61 .Sy NULL is returned .
63 If the tree is modified between a call to
71 will no longer be valid and
77 function returns the node that is closest or
79 if there is not a matching one.
85 .Sh INTERFACE STABILITY