BSD 3 development
[unix-history] / usr / man / man3 / qsort.3
CommitLineData
e6817382
BJ
1.TH QSORT 3
2.SH NAME
3qsort \- quicker sort
4.SH SYNOPSIS
5.B qsort(base, nel, width, compar)
6.br
7.B char *base;
8.br
9.B int (*compar)( );
10.SH DESCRIPTION
11.I Qsort
12is an implementation
13of the quicker-sort algorithm.
14The first argument is a pointer to the base of the data;
15the second is the number of elements;
16the third is the width of an element
17in bytes;
18the last is the name of the comparison routine
19to be called with two arguments which are pointers
20to the elements being compared.
21The routine must return
22an integer less than, equal to, or greater than 0
23according as the first argument is to be considered
24less than, equal to, or greater than the second.
25.SH "SEE ALSO"
26sort(1)