Subject: lib/34984: minor problems with tsearch.3
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Denis Lagno <dlagno@rambler.ru>
List: netbsd-bugs
Date: 11/03/2006 12:35:00
>Number:         34984
>Category:       lib
>Synopsis:       minor problems with tsearch.3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 03 12:35:00 +0000 2006
>Originator:     Denis Lagno
>Release:        NetBSD 4.99.3
>Organization:
>Environment:
System: NetBSD flam.gado 4.99.3 NetBSD 4.99.3 (FLAM) #0: Tue Sep 26 21:12:59 MSD 2006 dina@flam.gado:/volatile/worksrc/netbsd-current/obj/sys/arch/i386/compile/FLAM i386
Architecture: i386
Machine: i386
>Description:
tsearch(3), twalk(3).. manpages say about compar argument to twalk, it should be action.
Also they capitalize names of functions.
>How-To-Repeat:
man tsearch
>Fix:
Index: src/lib/libc/stdlib/tsearch.3
===================================================================
RCS file: /cvsroot/src/lib/libc/stdlib/tsearch.3,v
retrieving revision 1.7
diff -u -r1.7 tsearch.3
--- src/lib/libc/stdlib/tsearch.3       22 Mar 2005 20:13:42 -0000      1.7
+++ src/lib/libc/stdlib/tsearch.3       3 Nov 2006 12:28:33 -0000
@@ -41,7 +41,7 @@
 .Ft void *
 .Fn tsearch "const void *key" "void **rootp" "int (*compar) (const void *, const void *)"
 .Ft void
-.Fn twalk "const void *root" "void (*compar) (const void *, VISIT, int)"
+.Fn twalk "const void *root" "void (*action) (const void *, VISIT, int)"
 .Sh DESCRIPTION
 The
 .Fn tdelete ,
@@ -55,7 +55,7 @@
 the user has the same style of return values as
 .Xr strcmp 3 .
 .Pp
-.Fn Tfind
+.Fn tfind
 searches for the datum matched by the argument
 .Fa key
 in the binary tree rooted at
@@ -63,7 +63,7 @@
 returning a pointer to the datum if it is found and NULL
 if it is not.
 .Pp
-.Fn Tsearch
+.Fn tsearch
 is identical to
 .Fn tfind
 except that if no match is found,
@@ -73,7 +73,7 @@
 .Fa rootp
 points to a NULL value a new binary search tree is created.
 .Pp
-.Fn Tdelete
+.Fn tdelete
 deletes a node from the specified binary search tree and returns
 a pointer to the parent of the node to be deleted.
 It takes the same arguments as
@@ -84,7 +84,7 @@
 .Fa rootp
 will be adjusted.
 .Pp
-.Fn Twalk
+.Fn twalk
 walks the binary search tree rooted in
 .fa root
 and calls the function
@@ -102,7 +102,7 @@
 function returns NULL if allocation of a new node fails (usually
 due to a lack of free memory).
 .Pp
-.Fn Tfind ,
+.Fn tfind ,
 .Fn tsearch ,
 and
 .Fn tdelete