4.3BSD-Tahoe/usr/man/cat3f/qsort.0
QSORT(3F) UNIX Programmer's Manual QSORT(3F)
NNAAMMEE
qsort - quick sort
SSYYNNOOPPSSIISS
ssuubbrroouuttiinnee qqssoorrtt ((aarrrraayy,, lleenn,, iissiizzee,, ccoommppaarr))
eexxtteerrnnaall ccoommppaarr
iinntteeggeerr**22 ccoommppaarr
DDEESSCCRRIIPPTTIIOONN
One dimensional _a_r_r_a_y contains the elements to be sorted.
_l_e_n is the number of elements in the array. _i_s_i_z_e is the
size of an element, typically -
4 for iinntteeggeerr and rreeaall
8 for ddoouubbllee pprreecciissiioonn or ccoommpplleexx
16 for ddoouubbllee ccoommpplleexx
(length of character object) for cchhaarraacctteerr arrays
_C_o_m_p_a_r is the name of a user supplied integer*2 function
that will determine the sorting order. This function will
be called with 2 arguments that will be elements of _a_r_r_a_y.
The function must return -
negative if arg 1 is considered to precede arg 2
zero if arg 1 is equivalent to arg 2
positive if arg 1 is considered to follow arg 2
On return, the elements of _a_r_r_a_y will be sorted.
FFIILLEESS
/usr/lib/libU77.a
SSEEEE AALLSSOO
qsort(3)
Printed 7/9/88 May 15, 1985 1