aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/qsort.3
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2002-12-18 12:45:11 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2002-12-18 12:45:11 +0000
commit1fae73b137bfc5a237d7258e3c667ba87a36b7ff (patch)
treeee7f7ba4650cadf44410ca9a44676c72c96739b7 /lib/libc/stdlib/qsort.3
parent68eec1f80cd88e91cb92d06ce4ae75fc5077ab13 (diff)
mdoc(7) police: "The .Fn function".
Notes
Notes: svn path=/head/; revision=108037
Diffstat (limited to 'lib/libc/stdlib/qsort.3')
-rw-r--r--lib/libc/stdlib/qsort.312
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3
index a23301fd12fb..a734da2067c5 100644
--- a/lib/libc/stdlib/qsort.3
+++ b/lib/libc/stdlib/qsort.3
@@ -97,7 +97,9 @@ objects, the initial member of which is pointed to by
.Fa base .
The size of each object is specified by
.Fa size .
-.Fn Mergesort
+The
+.Fn mergesort
+function
behaves similarly, but
.Em requires
that
@@ -179,7 +181,9 @@ requires additional memory of size
.Fa nmemb *
.Fa size
bytes; it should be used only when space is not at a premium.
-.Fn Mergesort
+The
+.Fn mergesort
+function
is optimized for data with pre-existing order; its worst case
time is O N lg N; its best case is O N.
.Pp
@@ -218,9 +222,11 @@ argument to
is less than
.Dq "sizeof(void *) / 2" .
.It Bq Er ENOMEM
-.Fn Heapsort
+The
+.Fn heapsort
or
.Fn mergesort
+functions
were unable to allocate memory.
.El
.Sh COMPATIBILITY