summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2019-01-22 06:49:18 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2019-01-22 06:49:18 +0000
commit8b07d12ac26e6769a1fbfcc78addacf45ebcfdfd (patch)
treefd370963cc6067a3290bedc6a1b7323d9eb7ed84
parent6ca64db209a83e07a2d9c02f571d4c7c80ec67f4 (diff)
sort sections, and add a missing verb to the EXAMPLES text;
-rw-r--r--lib/libc/stdlib/qsort.348
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3
index 57678c0ebf2..302a5e33c62 100644
--- a/lib/libc/stdlib/qsort.3
+++ b/lib/libc/stdlib/qsort.3
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: qsort.3,v 1.23 2019/01/22 06:44:46 otto Exp $
+.\" $OpenBSD: qsort.3,v 1.24 2019/01/22 06:49:17 jmc Exp $
.\"
.Dd $Mdocdate: January 22 2019 $
.Dt QSORT 3
@@ -146,28 +146,6 @@ which is faster than
Memory availability and pre-existing order in the data can make this untrue.
.Sh RETURN VALUES
.Rv -std heapsort mergesort
-.Sh ERRORS
-The
-.Fn heapsort
-and
-.Fn mergesort
-functions succeed unless:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The
-.Fa size
-argument is zero, or the
-.Fa size
-argument to
-.Fn mergesort
-is less than
-.Dq "sizeof(void *) / 2" .
-.It Bq Er ENOMEM
-.Fn heapsort
-or
-.Fn mergesort
-were unable to allocate memory.
-.El
.Sh EXAMPLES
.Bd -literal
#include <stdio.h>
@@ -207,8 +185,30 @@ main()
.Ed
.Pp
-It almost always an error to use subtraction to compute the return value
+It is almost always an error to use subtraction to compute the return value
of the comparison function.
+.Sh ERRORS
+The
+.Fn heapsort
+and
+.Fn mergesort
+functions succeed unless:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The
+.Fa size
+argument is zero, or the
+.Fa size
+argument to
+.Fn mergesort
+is less than
+.Dq "sizeof(void *) / 2" .
+.It Bq Er ENOMEM
+.Fn heapsort
+or
+.Fn mergesort
+were unable to allocate memory.
+.El
.Sh SEE ALSO
.Xr sort 1 ,
.Xr radixsort 3