mgsort
int mgsort(void*data
, intsize
, intesize
, inti
, intk
, int (*compare
) (const void *key1
, const void *key2
));
Uses merge sort to sort the array of elements in
data
. The number of elements in
data
is specified by
size
. The size of each element is
specified by esize
. The arguments
i
and k
define the current division being sorted and initially should be
and size
- 1, respectively. The
function pointer compare
specifies a
user-defined function to compare elements. It should perform in a
manner similar to that described for issort.
When mgsort returns,
data
contains the sorted
elements.