QSORT(3C) UNIX Programmer's Manual QSORT(3C) NAME qsort - quicker sort SYNOPSIS qsort (base, nel, width, compar) char *base; int nel, width; int (*compar)( ); HP-UX COMPATIBILITY Level: HP-UX/RUN ONLY Origin: System III DESCRIPTION _Q_s_o_r_t is an implementation of the quicker-sort algorithm. It sorts vectors of arbitrarily-sized elements based on user-supplied size information and a comparison routine. The first argument is a pointer to the base of the data; the second is the number of elements; the third is the width of an element in bytes; the last is a user-supplied reference to the comparison routine that _q_s_o_r_t will use. It is called with two arguments which are pointers to the elements being compared. The routine must return an integer less than, equal to, or greater than 0 according as the first argument is to be considered less than, equal to, or greater than the second. This is the same return convention that _s_t_r_c_m_p (see _s_t_r_i_n_g(3C)) uses. SEE ALSO sort(1), string(3C). BUGS If _w_i_d_t_h is zero, a divide-by-zero error is generated.