Rev | Line | |
---|
[9] | 1 | .\" Copyright (c) 1980 Regents of the University of California.
|
---|
| 2 | .\" All rights reserved. The Berkeley software License Agreement
|
---|
| 3 | .\" specifies the terms and conditions for redistribution.
|
---|
| 4 | .\"
|
---|
| 5 | .\" @(#)qsort.3 6.1 (Berkeley) 5/15/85
|
---|
| 6 | .\"
|
---|
| 7 | .TH QSORT 3 "May 15, 1985"
|
---|
| 8 | .UC 4
|
---|
| 9 | .SH NAME
|
---|
| 10 | qsort \- quicker sort
|
---|
| 11 | .SH SYNOPSIS
|
---|
| 12 | .nf
|
---|
| 13 | .ft B
|
---|
| 14 | #include <sys/types.h>
|
---|
| 15 | #include <stdlib.h>
|
---|
| 16 |
|
---|
| 17 | .fi
|
---|
| 18 | .in +.5i
|
---|
| 19 | .ti -.5i
|
---|
| 20 | void qsort(void *\fIbase\fP, size_t \fInel\fP, size_t \fIwidth\fP, int (*\fIcompar\fP)(const void *, const void *))
|
---|
| 21 | .in -.5i
|
---|
| 22 | .ft R
|
---|
| 23 | .SH DESCRIPTION
|
---|
| 24 | .B Qsort
|
---|
| 25 | is an implementation of the quicker-sort algorithm.
|
---|
| 26 | The first argument is a pointer to the base of the data;
|
---|
| 27 | the second is the number of elements;
|
---|
| 28 | the third is the width of an element in bytes;
|
---|
| 29 | the last is the name of the comparison routine
|
---|
| 30 | to be called with two arguments which are pointers
|
---|
| 31 | to the elements being compared.
|
---|
| 32 | The routine must return an integer less than, equal to, or greater than 0
|
---|
| 33 | according as the first argument is to be considered
|
---|
| 34 | less than, equal to, or greater than the second.
|
---|
| 35 | .SH "SEE ALSO"
|
---|
| 36 | .BR sort (1).
|
---|
Note:
See
TracBrowser
for help on using the repository browser.