diff options
author | aaron <> | 2000-04-20 13:50:03 +0000 |
---|---|---|
committer | aaron <> | 2000-04-20 13:50:03 +0000 |
commit | a4336f357f9e30dffdfad4909b24bd2e82c096a2 (patch) | |
tree | c79a224a41eb2c48668c4b4eda84163d7daadf64 /src/lib/libc/stdlib/qsort.3 | |
parent | 92b3e44bedaf5a5f85880565a47206cdbf9bfa2a (diff) | |
download | openbsd-a4336f357f9e30dffdfad4909b24bd2e82c096a2.tar.gz openbsd-a4336f357f9e30dffdfad4909b24bd2e82c096a2.tar.bz2 openbsd-a4336f357f9e30dffdfad4909b24bd2e82c096a2.zip |
Flesh out stdlib function man pages.
Diffstat (limited to 'src/lib/libc/stdlib/qsort.3')
-rw-r--r-- | src/lib/libc/stdlib/qsort.3 | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/libc/stdlib/qsort.3 b/src/lib/libc/stdlib/qsort.3 index 8d665187bf..632909dd3c 100644 --- a/src/lib/libc/stdlib/qsort.3 +++ b/src/lib/libc/stdlib/qsort.3 | |||
@@ -33,7 +33,7 @@ | |||
33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 | .\" SUCH DAMAGE. | 34 | .\" SUCH DAMAGE. |
35 | .\" | 35 | .\" |
36 | .\" $OpenBSD: qsort.3,v 1.4 1999/06/29 18:36:22 aaron Exp $ | 36 | .\" $OpenBSD: qsort.3,v 1.5 2000/04/20 13:50:02 aaron Exp $ |
37 | .\" | 37 | .\" |
38 | .Dd June 4, 1993 | 38 | .Dd June 4, 1993 |
39 | .Dt QSORT 3 | 39 | .Dt QSORT 3 |
@@ -105,7 +105,9 @@ is stable. | |||
105 | .Pp | 105 | .Pp |
106 | The | 106 | The |
107 | .Fn qsort | 107 | .Fn qsort |
108 | function is an implementation of C.A.R. Hoare's ``quicksort'' algorithm, | 108 | function is an implementation of C.A.R. Hoare's |
109 | .Dq quicksort | ||
110 | algorithm, | ||
109 | a variant of partition-exchange sorting; in particular, see D.E. Knuth's | 111 | a variant of partition-exchange sorting; in particular, see D.E. Knuth's |
110 | Algorithm Q. | 112 | Algorithm Q. |
111 | .Fn qsort | 113 | .Fn qsort |
@@ -115,7 +117,9 @@ O N**2 worst-case behavior. | |||
115 | .Pp | 117 | .Pp |
116 | The | 118 | The |
117 | .Fn heapsort | 119 | .Fn heapsort |
118 | function is an implementation of J.W.J. William's ``heapsort'' algorithm, | 120 | function is an implementation of J.W.J. William's |
121 | .Dq heapsort | ||
122 | algorithm, | ||
119 | a variant of selection sorting; in particular, see D.E. Knuth's Algorithm H. | 123 | a variant of selection sorting; in particular, see D.E. Knuth's Algorithm H. |
120 | .Fn heapsort | 124 | .Fn heapsort |
121 | takes O N lg N worst-case time. | 125 | takes O N lg N worst-case time. |
@@ -143,13 +147,11 @@ is faster than | |||
143 | .Fn mergesort | 147 | .Fn mergesort |
144 | is faster than | 148 | is faster than |
145 | .Fn heapsort . | 149 | .Fn heapsort . |
146 | Memory availability and pre-existing order in the data can make this | 150 | Memory availability and pre-existing order in the data can make this untrue. |
147 | untrue. | ||
148 | .Sh RETURN VALUES | 151 | .Sh RETURN VALUES |
149 | The | 152 | The |
150 | .Fn qsort | 153 | .Fn qsort |
151 | function | 154 | function returns no value. |
152 | returns no value. | ||
153 | .Pp | 155 | .Pp |
154 | Upon successful completion, | 156 | Upon successful completion, |
155 | .Fn heapsort | 157 | .Fn heapsort |
@@ -167,8 +169,7 @@ function succeeds unless: | |||
167 | .It Bq Er EINVAL | 169 | .It Bq Er EINVAL |
168 | The | 170 | The |
169 | .Fa size | 171 | .Fa size |
170 | argument is zero, or, | 172 | argument is zero, or, the |
171 | the | ||
172 | .Fa size | 173 | .Fa size |
173 | argument to | 174 | argument to |
174 | .Fn mergesort | 175 | .Fn mergesort |
@@ -228,6 +229,5 @@ This is no longer true. | |||
228 | .Sh STANDARDS | 229 | .Sh STANDARDS |
229 | The | 230 | The |
230 | .Fn qsort | 231 | .Fn qsort |
231 | function | 232 | function conforms to |
232 | conforms to | ||
233 | .St -ansiC . | 233 | .St -ansiC . |