diff options
author | jmc <> | 2019-01-22 06:49:17 +0000 |
---|---|---|
committer | jmc <> | 2019-01-22 06:49:17 +0000 |
commit | 80128d42b7c5e748f386dc5fc37fd9e9c390f20b (patch) | |
tree | 024442fb51b80bfcdffe1a9f1a0243e7dc18364d /src | |
parent | 12dd907c9eb6221639240bbb404ee162e89db9cb (diff) | |
download | openbsd-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.3 | 48 |
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 | |||
146 | Memory availability and pre-existing order in the data can make this untrue. | 146 | Memory 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 | ||
150 | The | ||
151 | .Fn heapsort | ||
152 | and | ||
153 | .Fn mergesort | ||
154 | functions succeed unless: | ||
155 | .Bl -tag -width Er | ||
156 | .It Bq Er EINVAL | ||
157 | The | ||
158 | .Fa size | ||
159 | argument is zero, or the | ||
160 | .Fa size | ||
161 | argument to | ||
162 | .Fn mergesort | ||
163 | is less than | ||
164 | .Dq "sizeof(void *) / 2" . | ||
165 | .It Bq Er ENOMEM | ||
166 | .Fn heapsort | ||
167 | or | ||
168 | .Fn mergesort | ||
169 | were 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 |
210 | It almost always an error to use subtraction to compute the return value | 188 | It is almost always an error to use subtraction to compute the return value |
211 | of the comparison function. | 189 | of the comparison function. |
190 | .Sh ERRORS | ||
191 | The | ||
192 | .Fn heapsort | ||
193 | and | ||
194 | .Fn mergesort | ||
195 | functions succeed unless: | ||
196 | .Bl -tag -width Er | ||
197 | .It Bq Er EINVAL | ||
198 | The | ||
199 | .Fa size | ||
200 | argument is zero, or the | ||
201 | .Fa size | ||
202 | argument to | ||
203 | .Fn mergesort | ||
204 | is less than | ||
205 | .Dq "sizeof(void *) / 2" . | ||
206 | .It Bq Er ENOMEM | ||
207 | .Fn heapsort | ||
208 | or | ||
209 | .Fn mergesort | ||
210 | were 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 |