summaryrefslogtreecommitdiff
path: root/share/man/man3/tree.3
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2009-01-28 10:26:49 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2009-01-28 10:26:49 +0000
commit5d5cfafd03740303c0423b06ea2336373d820235 (patch)
treee4e0f6ecb622d83507963cd8aebc40770598fe48 /share/man/man3/tree.3
parentc6e1ef45bdbb65f2abe64bf51ebfa91fe3250695 (diff)
Document the difference between RB_FIND and RB_NFIND in tree(3).
Added text was copied from comments found in sys/tree.h. "go ahead, if something's wrong with it, jmc will fix it" mcbride@
Diffstat (limited to 'share/man/man3/tree.3')
-rw-r--r--share/man/man3/tree.39
1 files changed, 7 insertions, 2 deletions
diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3
index 8472038df3f..263ad896ef4 100644
--- a/share/man/man3/tree.3
+++ b/share/man/man3/tree.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tree.3,v 1.18 2008/12/21 16:54:12 tedu Exp $
+.\" $OpenBSD: tree.3,v 1.19 2009/01/28 10:26:48 stsp Exp $
.\"/*
.\" * Copyright 2002 Niels Provos <provos@citi.umich.edu>
.\" * All rights reserved.
@@ -23,7 +23,7 @@
.\" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" */
-.Dd $Mdocdate: December 21 2008 $
+.Dd $Mdocdate: January 28 2009 $
.Dt TREE 3
.Os
.Sh NAME
@@ -406,6 +406,11 @@ The
and
.Fn RB_NFIND
macros can be used to find a particular element in the tree.
+.Fn RB_FIND
+finds the node with the same key as
+.Fa elm .
+.Fn RB_NFIND
+finds the first node greater than or equal to the search key.
.Bd -literal -offset indent
struct TYPE find, *res;
find.key = 30;