diff options
Diffstat (limited to 'src/lib/libc/stdlib/tsearch.3')
| -rw-r--r-- | src/lib/libc/stdlib/tsearch.3 | 14 | 
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 | |||
| 53 | the user has the same style of return values as | 53 | the 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 | 
| 57 | searches for the datum matched by the argument | 57 | searches for the datum matched by the argument | 
| 58 | .Fa key | 58 | .Fa key | 
| 59 | in the binary tree rooted at | 59 | in the binary tree rooted at | 
| @@ -61,7 +61,7 @@ in the binary tree rooted at | |||
| 61 | returning a pointer to the datum if it is found and NULL | 61 | returning a pointer to the datum if it is found and NULL | 
| 62 | if it is not. | 62 | if it is not. | 
| 63 | .Pp | 63 | .Pp | 
| 64 | .Fn Tsearch | 64 | .Fn tsearch | 
| 65 | is identical to | 65 | is identical to | 
| 66 | .Fn tfind | 66 | .Fn tfind | 
| 67 | except that if no match is found, | 67 | except 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 | 
| 71 | points to a NULL value a new binary search tree is created. | 71 | points to a NULL value a new binary search tree is created. | 
| 72 | .Pp | 72 | .Pp | 
| 73 | .Fn Tdelete | 73 | .Fn tdelete | 
| 74 | deletes a node from the specified binary search tree and returns | 74 | deletes a node from the specified binary search tree and returns | 
| 75 | a pointer to the parent of the node to be deleted. | 75 | a pointer to the parent of the node to be deleted. | 
| 76 | It takes the same arguments as | 76 | It 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 | 
| 82 | will be adjusted. | 82 | will be adjusted. | 
| 83 | .Pp | 83 | .Pp | 
| 84 | .Fn Twalk | 84 | .Fn twalk | 
| 85 | walks the binary search tree rooted in | 85 | walks the binary search tree rooted in | 
| 86 | .fa root | 86 | .fa root | 
| 87 | and calls the function | 87 | and calls the function | 
| 88 | .Fa action | 88 | .Fa action | 
| 89 | on each node. | 89 | on each node. | 
| 90 | .Fa Action | 90 | .Fa action | 
| 91 | is called with three arguments: a pointer to the current node, | 91 | is called with three arguments: a pointer to the current node, | 
| 92 | a value from the enum | 92 | a 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 | |||
| 103 | function returns NULL if allocation of a new node fails (usually | 103 | function returns NULL if allocation of a new node fails (usually | 
| 104 | due to a lack of free memory). | 104 | due to a lack of free memory). | 
| 105 | .Pp | 105 | .Pp | 
| 106 | .Fn Tfind , | 106 | .Fn tfind , | 
| 107 | .Fn tsearch , | 107 | .Fn tsearch , | 
| 108 | and | 108 | and | 
| 109 | .Fn tdelete | 109 | .Fn tdelete | 
