summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/tsearch.3
diff options
context:
space:
mode:
authorderaadt <>1999-02-27 21:56:03 +0000
committerderaadt <>1999-02-27 21:56:03 +0000
commit2a942b8fa85b25e91c59f4636ca30de7d0227ae7 (patch)
tree2eebc38452da9b74e0b0629addbf28530b68af52 /src/lib/libc/stdlib/tsearch.3
parent5ea49c86fd68a22175e9718cf7b1c92d23659827 (diff)
downloadopenbsd-2a942b8fa85b25e91c59f4636ca30de7d0227ae7.tar.gz
openbsd-2a942b8fa85b25e91c59f4636ca30de7d0227ae7.tar.bz2
openbsd-2a942b8fa85b25e91c59f4636ca30de7d0227ae7.zip
make function names the correct case
Diffstat (limited to 'src/lib/libc/stdlib/tsearch.3')
-rw-r--r--src/lib/libc/stdlib/tsearch.314
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libc/stdlib/tsearch.3 b/src/lib/libc/stdlib/tsearch.3
index dbdae7943c..c2ef8ae6cb 100644
--- a/src/lib/libc/stdlib/tsearch.3
+++ b/src/lib/libc/stdlib/tsearch.3
@@ -23,7 +23,7 @@
23.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 23.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\" 25.\"
26.\" $OpenBSD: tsearch.3,v 1.2 1998/06/21 22:13:49 millert Exp $ 26.\" $OpenBSD: tsearch.3,v 1.3 1999/02/27 21:56:03 deraadt Exp $
27.\" 27.\"
28.Dd June 15, 1997 28.Dd June 15, 1997
29.Dt TSEARCH 3 29.Dt TSEARCH 3
@@ -53,7 +53,7 @@ from Knuth (6.2.2). The comparison function passed in by
53the user has the same style of return values as 53the user has the same style of return values as
54.Xr strcmp 3 . 54.Xr strcmp 3 .
55.Pp 55.Pp
56.Fn Tfind 56.Fn tfind
57searches for the datum matched by the argument 57searches for the datum matched by the argument
58.Fa key 58.Fa key
59in the binary tree rooted at 59in the binary tree rooted at
@@ -61,7 +61,7 @@ in the binary tree rooted at
61returning a pointer to the datum if it is found and NULL 61returning a pointer to the datum if it is found and NULL
62if it is not. 62if it is not.
63.Pp 63.Pp
64.Fn Tsearch 64.Fn tsearch
65is identical to 65is identical to
66.Fn tfind 66.Fn tfind
67except that if no match is found, 67except that if no match is found,
@@ -70,7 +70,7 @@ is inserted into the tree and a pointer to it is returned. If
70.Fa rootp 70.Fa rootp
71points to a NULL value a new binary search tree is created. 71points to a NULL value a new binary search tree is created.
72.Pp 72.Pp
73.Fn Tdelete 73.Fn tdelete
74deletes a node from the specified binary search tree and returns 74deletes a node from the specified binary search tree and returns
75a pointer to the parent of the node to be deleted. 75a pointer to the parent of the node to be deleted.
76It takes the same arguments as 76It takes the same arguments as
@@ -81,13 +81,13 @@ If the node to be deleted is the root of the binary search tree,
81.Fa rootp 81.Fa rootp
82will be adjusted. 82will be adjusted.
83.Pp 83.Pp
84.Fn Twalk 84.Fn twalk
85walks the binary search tree rooted in 85walks the binary search tree rooted in
86.fa root 86.fa root
87and calls the function 87and calls the function
88.Fa action 88.Fa action
89on each node. 89on each node.
90.Fa Action 90.Fa action
91is called with three arguments: a pointer to the current node, 91is called with three arguments: a pointer to the current node,
92a value from the enum 92a value from the enum
93.Sy "typedef enum { preorder, postorder, endorder, leaf } VISIT;" 93.Sy "typedef enum { preorder, postorder, endorder, leaf } VISIT;"
@@ -103,7 +103,7 @@ The
103function returns NULL if allocation of a new node fails (usually 103function returns NULL if allocation of a new node fails (usually
104due to a lack of free memory). 104due to a lack of free memory).
105.Pp 105.Pp
106.Fn Tfind , 106.Fn tfind ,
107.Fn tsearch , 107.Fn tsearch ,
108and 108and
109.Fn tdelete 109.Fn tdelete