Module Name: src
Committed By: riz
Date: Mon Sep 3 18:41:15 UTC 2012
Modified Files:
src/share/man/man3 [netbsd-6]: rbtree.3
Log Message:
Pull up following revision(s) (requested by dholland in ticket #526):
share/man/man3/rbtree.3: revision 1.7
Add more function argument names to the man page, trying to address
PR 46814 by Lloyd Parkes. Bump date.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.6.1 src/share/man/man3/rbtree.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/man/man3/rbtree.3
diff -u src/share/man/man3/rbtree.3:1.5 src/share/man/man3/rbtree.3:1.5.6.1
--- src/share/man/man3/rbtree.3:1.5 Mon Mar 28 13:46:14 2011
+++ src/share/man/man3/rbtree.3 Mon Sep 3 18:41:15 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: rbtree.3,v 1.5 2011/03/28 13:46:14 ahoka Exp $
+.\" $NetBSD: rbtree.3,v 1.5.6.1 2012/09/03 18:41:15 riz Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd March 17, 2011
+.Dd August 19, 2012
.Dt RBTREE 3
.Os
.Sh NAME
@@ -38,19 +38,19 @@
.Sh SYNOPSIS
.In sys/rbtree.h
.Ft void
-.Fn rb_tree_init "rb_tree_t *" "const rb_tree_ops_t *"
+.Fn rb_tree_init "rb_tree_t *rbt" "const rb_tree_ops_t *ops"
.Ft void *
-.Fn rb_tree_insert_node "rb_tree_t *" "void *"
+.Fn rb_tree_insert_node "rb_tree_t *rbt" "void *rb"
.Ft void
-.Fn rb_tree_remove_node "rb_tree_t *" "void *"
+.Fn rb_tree_remove_node "rb_tree_t *rbt" "void *rb"
.Ft void *
-.Fn rb_tree_find_node "rb_tree_t *" "const void *"
+.Fn rb_tree_find_node "rb_tree_t *rbt" "const void *key"
.Ft void *
-.Fn rb_tree_find_node_geq "rb_tree_t *" "const void *"
+.Fn rb_tree_find_node_geq "rb_tree_t *rbt" "const void *key"
.Ft void *
-.Fn rb_tree_find_node_leq "rb_tree_t *" "const void *"
+.Fn rb_tree_find_node_leq "rb_tree_t *rbt" "const void *key"
.Ft void *
-.Fn rb_tree_iterate "rb_tree_t *" "void *" "const unsigned int"
+.Fn rb_tree_iterate "rb_tree_t *rbt" "void *rb" "const unsigned int direction"
.Sh DESCRIPTION
.Nm
provides red-black trees.
@@ -74,20 +74,39 @@ The maximum height of a red-black tree i
.It Vt rb_tree_t
A red-black tree.
.It Vt typedef signed int \
-(*const rbto_compare_nodes_fn)(void *, const void *, const void *);
+(*const rbto_compare_nodes_fn)(void *context, const void *node1, const void *node2);
The node-comparison operator.
Defines an ordering on nodes.
-Returns a negative value if the first node precedes the second node.
-Returns a positive value if the first node follows the second node.
-Returns 0 if the first node and the second are identical according
-to the ordering.
+Returns a negative value if the first node
+.Ar node1
+precedes the second node
+.Ar node2 .
+Returns a positive value if the first node
+.Ar node1
+follows the second node
+.Ar node2 .
+Returns 0 if the first node
+.Ar node1
+and the second node
+.Ar node2
+are identical according to the ordering.
.It Vt typedef signed int \
-(*const rbto_compare_key_fn)(void *, const void *, const void *);
+(*const rbto_compare_key_fn)(void *context, const void *node, const void *key);
The node-key comparison operator.
Defines the order of nodes and keys.
-Returns a negative value if the node precedes the key.
-Returns a positive value if the node follows the key.
-Returns 0 if the node is identical to the key according to the ordering.
+Returns a negative value if the node
+.Ar node
+precedes the key
+.Ar key .
+Returns a positive value if the node
+.Ar node
+follows the key
+.Ar key .
+Returns 0 if the node
+.Ar node
+is identical to the key
+.Ar key
+according to the ordering.
.It Vt rb_tree_ops_t
Defines the operator for comparing two nodes in the same tree,
the operator for comparing a node in the tree with a key,