summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjmc <>2019-01-22 06:49:17 +0000
committerjmc <>2019-01-22 06:49:17 +0000
commit80128d42b7c5e748f386dc5fc37fd9e9c390f20b (patch)
tree024442fb51b80bfcdffe1a9f1a0243e7dc18364d /src
parent12dd907c9eb6221639240bbb404ee162e89db9cb (diff)
downloadopenbsd-80128d42b7c5e748f386dc5fc37fd9e9c390f20b.tar.gz
openbsd-80128d42b7c5e748f386dc5fc37fd9e9c390f20b.tar.bz2
openbsd-80128d42b7c5e748f386dc5fc37fd9e9c390f20b.zip
sort sections, and add a missing verb to the EXAMPLES text;
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/stdlib/qsort.348
1 files changed, 24 insertions, 24 deletions
diff --git a/src/lib/libc/stdlib/qsort.3 b/src/lib/libc/stdlib/qsort.3
index 57678c0ebf..302a5e33c6 100644
--- a/src/lib/libc/stdlib/qsort.3
+++ b/src/lib/libc/stdlib/qsort.3
@@ -29,7 +29,7 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: qsort.3,v 1.23 2019/01/22 06:44:46 otto Exp $ 32.\" $OpenBSD: qsort.3,v 1.24 2019/01/22 06:49:17 jmc Exp $
33.\" 33.\"
34.Dd $Mdocdate: January 22 2019 $ 34.Dd $Mdocdate: January 22 2019 $
35.Dt QSORT 3 35.Dt QSORT 3
@@ -146,28 +146,6 @@ which is faster than
146Memory availability and pre-existing order in the data can make this untrue. 146Memory availability and pre-existing order in the data can make this untrue.
147.Sh RETURN VALUES 147.Sh RETURN VALUES
148.Rv -std heapsort mergesort 148.Rv -std heapsort mergesort
149.Sh ERRORS
150The
151.Fn heapsort
152and
153.Fn mergesort
154functions succeed unless:
155.Bl -tag -width Er
156.It Bq Er EINVAL
157The
158.Fa size
159argument is zero, or the
160.Fa size
161argument to
162.Fn mergesort
163is less than
164.Dq "sizeof(void *) / 2" .
165.It Bq Er ENOMEM
166.Fn heapsort
167or
168.Fn mergesort
169were unable to allocate memory.
170.El
171.Sh EXAMPLES 149.Sh EXAMPLES
172.Bd -literal 150.Bd -literal
173#include <stdio.h> 151#include <stdio.h>
@@ -207,8 +185,30 @@ main()
207 185
208.Ed 186.Ed
209.Pp 187.Pp
210It almost always an error to use subtraction to compute the return value 188It is almost always an error to use subtraction to compute the return value
211of the comparison function. 189of the comparison function.
190.Sh ERRORS
191The
192.Fn heapsort
193and
194.Fn mergesort
195functions succeed unless:
196.Bl -tag -width Er
197.It Bq Er EINVAL
198The
199.Fa size
200argument is zero, or the
201.Fa size
202argument to
203.Fn mergesort
204is less than
205.Dq "sizeof(void *) / 2" .
206.It Bq Er ENOMEM
207.Fn heapsort
208or
209.Fn mergesort
210were unable to allocate memory.
211.El
212.Sh SEE ALSO 212.Sh SEE ALSO
213.Xr sort 1 , 213.Xr sort 1 ,
214.Xr radixsort 3 214.Xr radixsort 3