diff options
| author | jruoho <jruoho@NetBSD.org> | 2010-04-30 10:06:52 +0000 |
|---|---|---|
| committer | jruoho <jruoho@NetBSD.org> | 2010-04-30 10:06:52 +0000 |
| commit | cb375ee477ee4bf4eceafae759ad5d3e59556b8e (patch) | |
| tree | fb434563a1d2a3406daf0dde6400a8642ad4daad /lib/libc/stdlib | |
| parent | 6e3fa8db540a1d107aa66bc3506b998b3bf2d0e7 (diff) | |
Add STANDARDS and CAVEATS. The latter notes the ambiguity of tdelete() when
deleting the root node.
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/tsearch.3 | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/lib/libc/stdlib/tsearch.3 b/lib/libc/stdlib/tsearch.3 index 6a4521828e8..9ce0cbe69d8 100644 --- a/lib/libc/stdlib/tsearch.3 +++ b/lib/libc/stdlib/tsearch.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: tsearch.3,v 1.10 2009/04/11 16:17:26 joerg Exp $ +.\" $NetBSD: tsearch.3,v 1.11 2010/04/30 10:06:52 jruoho Exp $ .\" Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> .\" All rights reserved. .\" @@ -26,7 +26,7 @@ .\" .\" OpenBSD: tsearch.3,v 1.2 1998/06/21 22:13:49 millert Exp .\" -.Dd November 26, 2006 +.Dd April 30, 2010 .Dt TSEARCH 3 .Os .Sh NAME @@ -117,3 +117,25 @@ function returns no value. .Xr bsearch 3 , .Xr hsearch 3 , .Xr lsearch 3 +.Sh STANDARDS +These functions conform to +.St -p1003.1-2001 . +.Sh CAVEATS +The +.St -p1003.1-2001 +standard does not specify what value should be returned when deleting +the root node. +Since implementations vary, user of +.Fn tdelete +should not rely on any specific behaviour. +The +.St -p1003.1-2008 +revision tried to clarify the issue with the following wording: +.Do +the +.Fn tdelete +function shall return a pointer to the parent of the deleted node, +or an unspecified non-NULL pointer if the deleted node was the root node, or a +.Dv NULL +pointer if the node is not found. +.Dc |
